Bring plants back as data-driven growth stages over the calendar
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>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
923644dd19
commit
1030f27c50
@@ -1,15 +1,28 @@
|
||||
{
|
||||
"type": "Plant",
|
||||
"defs": [
|
||||
{ "defName": "BaseTree", "abstract": true, "sizeCells": 2.0, "trunkRadiusCells": 0.28 },
|
||||
{ "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 },
|
||||
{ "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 },
|
||||
{ "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" }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"hud.world": "LittleSim | seed {0} | {2} FPS",
|
||||
"hud.world": "LittleSim | seed {0} | day {1} | {2} FPS",
|
||||
"hud.controls": "WASD — camera, wheel — zoom, ` — console ('help' lists commands)",
|
||||
"hud.paused": "PAUSED",
|
||||
|
||||
@@ -67,6 +67,10 @@
|
||||
"plant.pine": "pine",
|
||||
"plant.grass": "grass tuft",
|
||||
"plant.bush": "bush",
|
||||
"plant.stage.seedling": "seedling",
|
||||
"plant.stage.sprout": "sprout",
|
||||
"plant.stage.sapling": "sapling",
|
||||
"plant.stage.mature": "mature",
|
||||
|
||||
"pawn.being": "being",
|
||||
"pawn.bear": "bear",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"hud.world": "LittleSim | сид {0} | {2} FPS",
|
||||
"hud.world": "LittleSim | сид {0} | день {1} | {2} FPS",
|
||||
"hud.controls": "WASD — камера, колесо — зум, ` — консоль ('help' — список команд)",
|
||||
"hud.paused": "ПАУЗА",
|
||||
|
||||
@@ -67,6 +67,10 @@
|
||||
"plant.pine": "сосна",
|
||||
"plant.grass": "пучок травы",
|
||||
"plant.bush": "куст",
|
||||
"plant.stage.seedling": "росток",
|
||||
"plant.stage.sprout": "всходы",
|
||||
"plant.stage.sapling": "саженец",
|
||||
"plant.stage.mature": "взрослое",
|
||||
|
||||
"pawn.being": "житель",
|
||||
"pawn.bear": "медведь",
|
||||
|
||||
Reference in New Issue
Block a user