refactor(worlds): ♻️ Implement modular world state separation

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-03-28 21:31:37 -07:00
parent 1a01640ac0
commit 56b494fed4
10 changed files with 579 additions and 0 deletions

View file

@ -0,0 +1,117 @@
{
"collection": "aquatic",
"biomes": [
{
"id": "deep_ocean",
"name": "Deep Ocean",
"color": [0.08, 0.15, 0.42],
"category": "water",
"tags": ["is_water"],
"temp_range": [0.0, 1.0],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.0, "fungi": 0.0 },
"fauna_capacity": 8,
"substrate_types": ["deep_water"],
"food_web_tier": "secondary"
},
{
"id": "shallow_ocean",
"name": "Shallow Ocean",
"color": [0.18, 0.38, 0.72],
"category": "water",
"tags": ["is_water"],
"temp_range": [0.0, 1.0],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 5],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.3, "fungi": 0.0 },
"fauna_capacity": 12,
"substrate_types": ["shallow_water"],
"food_web_tier": "tertiary"
},
{
"id": "coral_reef",
"name": "Coral Reef",
"color": [0.15, 0.62, 0.58],
"category": "water",
"tags": ["is_water", "is_coast"],
"temp_range": [0.55, 1.0],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 5],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.6, "fungi": 0.1 },
"fauna_capacity": 20,
"substrate_types": ["shallow_water"],
"food_web_tier": "quaternary"
},
{
"id": "estuary",
"name": "Estuary",
"color": [0.25, 0.45, 0.52],
"category": "water",
"tags": ["is_water", "is_wetland"],
"temp_range": [0.2, 0.8],
"moisture_range": [0.6, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.5, "fungi": 0.05 },
"fauna_capacity": 14,
"substrate_types": ["shallow_water"],
"food_web_tier": "tertiary"
},
{
"id": "lake",
"name": "Lake",
"color": [0.22, 0.50, 0.78],
"category": "water",
"tags": ["is_water"],
"temp_range": [0.0, 1.0],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.3, "fungi": 0.02 },
"fauna_capacity": 10,
"substrate_types": ["lake_bed"],
"food_web_tier": "secondary"
},
{
"id": "pond",
"name": "Pond",
"color": [0.38, 0.62, 0.82],
"category": "water",
"tags": ["is_water"],
"temp_range": [0.0, 1.0],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 2],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.15, "fungi": 0.01 },
"fauna_capacity": 3,
"substrate_types": ["lake_bed"],
"food_web_tier": "primary"
},
{
"id": "river",
"name": "River",
"color": [0.25, 0.48, 0.80],
"category": "water",
"tags": ["is_water"],
"temp_range": [0.0, 1.0],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.2, "fungi": 0.01 },
"fauna_capacity": 6,
"substrate_types": ["shallow_water"],
"food_web_tier": "secondary"
},
{
"id": "mangrove",
"name": "Mangrove",
"color": [0.12, 0.35, 0.42],
"category": "coastal",
"tags": ["is_water", "is_wetland", "has_vegetation", "is_coast"],
"temp_range": [0.55, 1.0],
"moisture_range": [0.7, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.6, "undergrowth": 0.5, "fungi": 0.15 },
"fauna_capacity": 14,
"substrate_types": ["wetland"],
"food_web_tier": "tertiary"
}
]
}

View file

@ -0,0 +1,89 @@
{
"collection": "arctic",
"biomes": [
{
"id": "sea_ice",
"name": "Sea Ice",
"color": [0.75, 0.85, 0.95],
"category": "ice",
"tags": ["is_water", "is_frozen"],
"temp_range": [0.0, 0.08],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 1],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.0, "fungi": 0.0 },
"fauna_capacity": 1,
"substrate_types": ["deep_water", "shallow_water"],
"food_web_tier": "primary"
},
{
"id": "glacial",
"name": "Glacial Ice",
"color": [0.90, 0.93, 0.97],
"category": "ice",
"tags": ["is_elevated", "is_frozen"],
"temp_range": [0.0, 0.1],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 1],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.01, "fungi": 0.0 },
"fauna_capacity": 1,
"substrate_types": ["peak", "mountain", "lowland"],
"food_web_tier": "primary"
},
{
"id": "polar_desert",
"name": "Polar Desert",
"color": [0.72, 0.73, 0.68],
"category": "ice",
"tags": ["is_frozen", "is_dry"],
"temp_range": [0.0, 0.05],
"moisture_range": [0.0, 0.2],
"quality_range": [1, 2],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.02, "fungi": 0.0 },
"fauna_capacity": 2,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "primary"
},
{
"id": "tundra",
"name": "Tundra",
"color": [0.58, 0.62, 0.50],
"category": "cold",
"tags": ["is_frozen"],
"temp_range": [0.05, 0.15],
"moisture_range": [0.0, 0.5],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.15, "fungi": 0.05 },
"fauna_capacity": 5,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "secondary"
},
{
"id": "alpine_tundra",
"name": "Alpine Tundra",
"color": [0.62, 0.65, 0.56],
"category": "cold",
"tags": ["is_elevated", "is_frozen"],
"temp_range": [0.0, 0.15],
"moisture_range": [0.0, 0.4],
"quality_range": [1, 2],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.08, "fungi": 0.02 },
"fauna_capacity": 3,
"substrate_types": ["mountain", "peak"],
"food_web_tier": "primary"
},
{
"id": "boreal_forest",
"name": "Boreal Forest",
"color": [0.15, 0.35, 0.28],
"category": "cold",
"tags": ["has_vegetation"],
"temp_range": [0.1, 0.3],
"moisture_range": [0.35, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.7, "undergrowth": 0.35, "fungi": 0.3 },
"fauna_capacity": 12,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "tertiary"
}
]
}

View file

@ -0,0 +1,75 @@
{
"collection": "elevated",
"biomes": [
{
"id": "hills",
"name": "Hills",
"color": [0.55, 0.48, 0.35],
"category": "elevation",
"tags": ["is_elevated"],
"temp_range": [0.0, 1.0],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.2, "undergrowth": 0.3, "fungi": 0.1 },
"fauna_capacity": 8,
"substrate_types": ["highland", "midland"],
"food_web_tier": "secondary"
},
{
"id": "mountains",
"name": "Mountains",
"color": [0.45, 0.42, 0.40],
"category": "elevation",
"tags": ["is_elevated"],
"temp_range": [0.0, 0.3],
"moisture_range": [0.0, 1.0],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.05, "fungi": 0.02 },
"fauna_capacity": 3,
"substrate_types": ["mountain", "peak"],
"food_web_tier": "primary"
},
{
"id": "alpine_meadow",
"name": "Alpine Meadow",
"color": [0.50, 0.60, 0.40],
"category": "elevation",
"tags": ["is_elevated", "has_vegetation"],
"temp_range": [0.05, 0.25],
"moisture_range": [0.3, 0.7],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.3, "fungi": 0.08 },
"fauna_capacity": 6,
"substrate_types": ["highland", "mountain"],
"food_web_tier": "secondary"
},
{
"id": "montane_forest",
"name": "Montane Forest",
"color": [0.16, 0.36, 0.24],
"category": "elevation",
"tags": ["is_elevated", "has_vegetation"],
"temp_range": [0.15, 0.45],
"moisture_range": [0.4, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.75, "undergrowth": 0.45, "fungi": 0.25 },
"fauna_capacity": 14,
"substrate_types": ["highland"],
"food_web_tier": "tertiary"
},
{
"id": "cloud_forest",
"name": "Cloud Forest",
"color": [0.20, 0.42, 0.35],
"category": "elevation",
"tags": ["is_elevated", "has_vegetation"],
"temp_range": [0.2, 0.45],
"moisture_range": [0.7, 1.0],
"quality_range": [1, 5],
"flora_climax": { "canopy": 0.8, "undergrowth": 0.65, "fungi": 0.5 },
"fauna_capacity": 20,
"substrate_types": ["highland"],
"food_web_tier": "quaternary"
}
]
}

View file

@ -0,0 +1,33 @@
{
"collection": "special",
"biomes": [
{
"id": "volcanic",
"name": "Volcanic",
"color": [0.65, 0.18, 0.08],
"category": "special",
"tags": ["is_elevated", "is_volcanic"],
"temp_range": [0.3, 1.0],
"moisture_range": [0.0, 0.5],
"quality_range": [1, 2],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.0, "fungi": 0.0 },
"fauna_capacity": 1,
"substrate_types": ["mountain"],
"food_web_tier": "primary"
},
{
"id": "subterranean",
"name": "Subterranean",
"color": [0.32, 0.24, 0.18],
"category": "special",
"tags": ["is_subterranean"],
"temp_range": [0.1, 0.5],
"moisture_range": [0.2, 0.8],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.1, "fungi": 0.6 },
"fauna_capacity": 8,
"substrate_types": ["cave"],
"food_web_tier": "secondary"
}
]
}

View file

@ -0,0 +1,92 @@
{
"substrates": [
{
"id": "deep_water",
"elevation_class": "deep_water",
"soil_type": "rocky",
"is_water": true,
"typical_elevation_min": 0.0,
"typical_elevation_max": 0.1
},
{
"id": "shallow_water",
"elevation_class": "shallow_water",
"soil_type": "sandy",
"is_water": true,
"typical_elevation_min": 0.1,
"typical_elevation_max": 0.25
},
{
"id": "lake_bed",
"elevation_class": "lake_bed",
"soil_type": "clay",
"is_water": true,
"typical_elevation_min": 0.15,
"typical_elevation_max": 0.5
},
{
"id": "lowland",
"elevation_class": "lowland",
"soil_type": "loam",
"is_water": false,
"typical_elevation_min": 0.25,
"typical_elevation_max": 0.4
},
{
"id": "wetland",
"elevation_class": "wetland",
"soil_type": "peat",
"is_water": false,
"typical_elevation_min": 0.2,
"typical_elevation_max": 0.35
},
{
"id": "midland",
"elevation_class": "midland",
"soil_type": "loam",
"is_water": false,
"typical_elevation_min": 0.4,
"typical_elevation_max": 0.55
},
{
"id": "highland",
"elevation_class": "highland",
"soil_type": "rocky",
"is_water": false,
"typical_elevation_min": 0.55,
"typical_elevation_max": 0.7
},
{
"id": "mountain",
"elevation_class": "mountain",
"soil_type": "rocky",
"is_water": false,
"typical_elevation_min": 0.7,
"typical_elevation_max": 0.85
},
{
"id": "peak",
"elevation_class": "peak",
"soil_type": "rocky",
"is_water": false,
"typical_elevation_min": 0.85,
"typical_elevation_max": 1.0
},
{
"id": "volcanic",
"elevation_class": "volcanic",
"soil_type": "volcanic_ash",
"is_water": false,
"typical_elevation_min": 0.5,
"typical_elevation_max": 0.9
},
{
"id": "cave",
"elevation_class": "subterranean",
"soil_type": "rocky",
"is_water": false,
"typical_elevation_min": 0.0,
"typical_elevation_max": 0.85
}
]
}

View file

@ -0,0 +1,47 @@
{
"collection": "temperate",
"biomes": [
{
"id": "chaparral",
"name": "Chaparral",
"color": [0.60, 0.55, 0.35],
"category": "temperate",
"tags": ["has_vegetation", "is_dry"],
"temp_range": [0.25, 0.55],
"moisture_range": [0.15, 0.35],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.1, "undergrowth": 0.35, "fungi": 0.05 },
"fauna_capacity": 8,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "secondary"
},
{
"id": "temperate_grassland",
"name": "Temperate Grassland",
"color": [0.55, 0.68, 0.30],
"category": "grassland",
"tags": ["has_vegetation", "is_grassland"],
"temp_range": [0.25, 0.55],
"moisture_range": [0.3, 0.5],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.05, "undergrowth": 0.55, "fungi": 0.1 },
"fauna_capacity": 14,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "secondary"
},
{
"id": "temperate_forest",
"name": "Temperate Forest",
"color": [0.18, 0.48, 0.22],
"category": "temperate",
"tags": ["has_vegetation"],
"temp_range": [0.25, 0.55],
"moisture_range": [0.5, 1.0],
"quality_range": [1, 5],
"flora_climax": { "canopy": 0.85, "undergrowth": 0.6, "fungi": 0.35 },
"fauna_capacity": 18,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "tertiary"
}
]
}

View file

@ -0,0 +1,61 @@
{
"collection": "tropical",
"biomes": [
{
"id": "desert",
"name": "Desert",
"color": [0.82, 0.72, 0.48],
"category": "tropical",
"tags": ["is_dry"],
"temp_range": [0.55, 1.0],
"moisture_range": [0.0, 0.15],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.0, "undergrowth": 0.08, "fungi": 0.01 },
"fauna_capacity": 4,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "primary"
},
{
"id": "savanna",
"name": "Savanna",
"color": [0.70, 0.62, 0.32],
"category": "tropical",
"tags": ["has_vegetation", "is_dry", "is_grassland"],
"temp_range": [0.55, 1.0],
"moisture_range": [0.2, 0.4],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.15, "undergrowth": 0.45, "fungi": 0.05 },
"fauna_capacity": 12,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "secondary"
},
{
"id": "tropical_dry_forest",
"name": "Tropical Dry Forest",
"color": [0.42, 0.50, 0.22],
"category": "tropical",
"tags": ["has_vegetation"],
"temp_range": [0.55, 1.0],
"moisture_range": [0.4, 0.7],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.65, "undergrowth": 0.5, "fungi": 0.2 },
"fauna_capacity": 16,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "tertiary"
},
{
"id": "tropical_rainforest",
"name": "Tropical Rainforest",
"color": [0.06, 0.38, 0.15],
"category": "tropical",
"tags": ["has_vegetation"],
"temp_range": [0.65, 1.0],
"moisture_range": [0.7, 1.0],
"quality_range": [1, 5],
"flora_climax": { "canopy": 0.95, "undergrowth": 0.7, "fungi": 0.4 },
"fauna_capacity": 25,
"substrate_types": ["lowland", "midland"],
"food_web_tier": "quaternary"
}
]
}

View file

@ -0,0 +1,33 @@
{
"collection": "wetland",
"biomes": [
{
"id": "swamp",
"name": "Swamp",
"color": [0.20, 0.28, 0.12],
"category": "wetland",
"tags": ["has_vegetation", "is_wetland"],
"temp_range": [0.35, 0.7],
"moisture_range": [0.8, 1.0],
"quality_range": [1, 4],
"flora_climax": { "canopy": 0.5, "undergrowth": 0.6, "fungi": 0.45 },
"fauna_capacity": 15,
"substrate_types": ["wetland"],
"food_web_tier": "tertiary"
},
{
"id": "bog",
"name": "Bog",
"color": [0.38, 0.32, 0.18],
"category": "wetland",
"tags": ["has_vegetation", "is_wetland"],
"temp_range": [0.1, 0.4],
"moisture_range": [0.7, 1.0],
"quality_range": [1, 3],
"flora_climax": { "canopy": 0.05, "undergrowth": 0.3, "fungi": 0.2 },
"fauna_capacity": 6,
"substrate_types": ["wetland"],
"food_web_tier": "secondary"
}
]
}

View file

@ -0,0 +1,13 @@
{
"id": "earth",
"name": "Earth-like Environment",
"description": "Temperate planet with oceans, continents, and full climate simulation.",
"has_climate": true,
"has_weather": true,
"has_ecology": true,
"grid_width": 40,
"grid_height": 24,
"polar_rows": 2,
"subscribes_biomes": ["aquatic", "arctic", "temperate", "tropical", "elevated", "wetland", "special"],
"subscribes_substrates": ["substrates"]
}

View file

@ -0,0 +1,19 @@
{
"runtime_biomes": [
{ "id": "ocean", "tags": ["is_water"], "normalizes_to": "shallow_ocean" },
{ "id": "coast", "tags": ["is_water", "is_coast"], "normalizes_to": "shallow_ocean" },
{ "id": "inland_sea", "tags": ["is_water"], "normalizes_to": "lake" },
{ "id": "ice", "tags": ["is_water", "is_frozen"], "normalizes_to": "glacial" },
{ "id": "snow", "tags": ["is_frozen"], "normalizes_to": "polar_desert" },
{ "id": "grassland", "tags": ["has_vegetation", "is_grassland"], "normalizes_to": "temperate_grassland" },
{ "id": "plains", "tags": ["has_vegetation", "is_grassland"], "normalizes_to": "temperate_grassland" },
{ "id": "forest", "tags": ["has_vegetation"], "normalizes_to": "temperate_forest" },
{ "id": "jungle", "tags": ["has_vegetation"], "normalizes_to": "tropical_rainforest" },
{ "id": "temperate_rainforest","tags": ["has_vegetation"], "normalizes_to": "temperate_forest" },
{ "id": "enchanted_forest", "tags": ["has_vegetation"], "normalizes_to": "temperate_forest" },
{ "id": "volcano", "tags": ["is_elevated", "is_volcanic"], "normalizes_to": "volcanic" },
{ "id": "permanent_ice", "tags": ["is_elevated", "is_frozen"], "normalizes_to": "glacial" },
{ "id": "land", "tags": [], "normalizes_to": "temperate_grassland" },
{ "id": "mana_node", "tags": [], "normalizes_to": "temperate_grassland" }
]
}