class_name CropUnit extends Node3D ## One stealable crop unit: a cluster of plants (this node's children) with one ID in FarmState. ## The original crop field holds 6 plots of 5 units; each unit is one row segment of its plot. ## #13: two more fields (lettuce/cabbage, corn), each 2 plots of 5 units, sprout later in the ## campaign: dormant (hidden, unclaimable) until FarmState.nights_survived reaches sprout_night, ## then home like any other crop (LootSystem.sync_from_state derives this every morning). @export var unit_id: int = 0 @export var plot: int = 0 ## "sunflower" (the original field), "lettuce", or "corn" (#13). Cosmetic only: it picks the ## token a carried or dropped unit shows (#20, LootSystem.CROP_TOKENS), while theft rules go by ## category, not by this. The plants under the unit are the scene's (sunflowers plant_007/008, ## cabbage heads plant_004/005, corn stalks plant_001). @export var crop: String = "sunflower" ## The night that must be survived (FarmState.nights_survived) before this unit sprouts and ## becomes stealable. 0 = already grown, in play from the first morning. @export var sprout_night: int = 0