Bump the engine submodule to f791ee6 (Calendar) and use it to drive plant growth. PlantDef gains a Stages list (texture/size/growDays per stage, inheritable via abstract parents in plants.json); a resolved PlantSet table turns those into atlas regions and day thresholds at scene load. New PlantGrowth component plus PlantGrowthSystem advance each plant by in-game days from the Calendar and swap its sprite/scale at stage borders. WorldScene scatters plants again with a seed-deterministic, varied initial maturity, registers the calendar and growth system, and the HUD now shows the current day. Stage durations and visuals are pure data in plants.json. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
1.8 KiB
JSON
31 lines
1.8 KiB
JSON
{
|
|
"type": "Plant",
|
|
"defs": [
|
|
{ "defName": "BaseTree", "abstract": true, "sizeCells": 2.0, "trunkRadiusCells": 0.28,
|
|
"stages": [
|
|
{ "texture": "things/plant/seed_default", "sizeCells": 0.6, "growDays": 4, "label": "plant.stage.seedling" },
|
|
{ "sizeCells": 1.2, "growDays": 9, "label": "plant.stage.sapling" },
|
|
{ "sizeCells": 2.0, "label": "plant.stage.mature" }
|
|
] },
|
|
{ "defName": "TreeOakA", "parent": "BaseTree", "label": "plant.oak", "texture": "things/plant/treeoak/TreeOakA" },
|
|
{ "defName": "TreeOakB", "parent": "BaseTree", "label": "plant.oak", "texture": "things/plant/treeoak/TreeOakB" },
|
|
{ "defName": "TreeBirchA", "parent": "BaseTree", "label": "plant.birch", "texture": "things/plant/treebirch/TreeBirchA" },
|
|
{ "defName": "TreeGrayPineA", "parent": "BaseTree", "label": "plant.pine", "texture": "things/plant/treegraypine/TreeGrayPineA" },
|
|
|
|
{ "defName": "GrassA", "label": "plant.grass", "texture": "things/plant/grass/grassa", "sizeCells": 1.2,
|
|
"stages": [
|
|
{ "texture": "things/plant/seed_default", "sizeCells": 0.5, "growDays": 2, "label": "plant.stage.sprout" },
|
|
{ "sizeCells": 1.2, "label": "plant.stage.mature" }
|
|
] },
|
|
|
|
{ "defName": "BaseBush", "abstract": true, "label": "plant.bush", "sizeCells": 1.4,
|
|
"stages": [
|
|
{ "texture": "things/plant/seed_default", "sizeCells": 0.6, "growDays": 3, "label": "plant.stage.sprout" },
|
|
{ "sizeCells": 1.4, "label": "plant.stage.mature" }
|
|
] },
|
|
{ "defName": "BushA", "parent": "BaseBush", "texture": "things/plant/bush/BushA" },
|
|
{ "defName": "BushB", "parent": "BaseBush", "texture": "things/plant/bush/BushB" },
|
|
{ "defName": "BushC", "parent": "BaseBush", "texture": "things/plant/bush/BushC" }
|
|
]
|
|
}
|