pub struct NodeSpec {
pub lot: TreeCoord,
pub box_x: i32,
pub box_y: i32,
pub box_w: u16,
pub box_h: u16,
pub rarity: Rarity,
pub primitives: Vec<Primitive>,
pub cost: f64,
pub title: String,
pub dominant_target: Target,
pub is_anchor: bool,
}Expand description
A single tree node, regenerated from (TREE_SEED, lot) on demand.
Fields§
§lot: TreeCoord§box_x: i32Absolute position+size of the rendered box, in terminal cells, in “canvas” coordinates. The renderer translates these into screen coords by subtracting the pan offset.
box_y: i32§box_w: u16§box_h: u16§rarity: Rarity§primitives: Vec<Primitive>§cost: f64§title: String§dominant_target: TargetDominant target hint — used by the renderer for biome-color tinting. Picked as the target of the first primitive in the rolled stack.
is_anchor: booltrue only for the (0, 0) lot — the “anchor” cuque-sprite node.
Anchors carry no primitives, no cost, are auto-owned at startup,
and the renderer paints BISCUIT_TINY instead of a regular box.
Every other node in the tree branches outward from this anchor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeSpec
impl RefUnwindSafe for NodeSpec
impl Send for NodeSpec
impl Sync for NodeSpec
impl Unpin for NodeSpec
impl UnsafeUnpin for NodeSpec
impl UnwindSafe for NodeSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more