Game as the Core mod: data-driven content and localization

The whole game is now described by Mods/Core — the first consumer of
the engine's new MrGameEng.Mods module:

- textures/ moved to Mods/Core/Textures; atlases are built at game
  start from the merged texture tree of all active mods into Cache/
  (gitignored, incremental) instead of being committed, and the
  GameAssets atlas handles are gone with them
- terrain, plants and pawns are JSON defs (Mods/Core/Defs) with parent
  inheritance; scenes read TerrainDef/PlantDef/PawnDef instead of
  hardcoded arrays, and the TerrainKind enum is retired
- HUD strings come from Mods/Core/Languages (ru default, en fallback)
  through LanguageManager; the language switches at runtime
- new console commands: mods, lang [code], defs [type]; atlas now
  inspects the runtime-built cache
- bump engine: MrGameEng.Mods module and the explicit-sources
  AtlasBuilder overload

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-06-11 21:51:46 +03:00
co-authored by Claude Fable 5
parent 218973ae60
commit 8b531bcd7e
4266 changed files with 723 additions and 54164 deletions
+22
View File
@@ -0,0 +1,22 @@
{
"type": "Pawn",
"defs": [
{ "defName": "BaseBeing", "abstract": true, "kind": "being", "sizeCells": 1.1 },
{ "defName": "BeingMale", "parent": "BaseBeing", "label": "pawn.being", "texture": "things/pawn/humanlike/bodies/FurCovered_Male_south" },
{ "defName": "BeingFemale", "parent": "BaseBeing", "label": "pawn.being", "texture": "things/pawn/humanlike/bodies/FurCovered_Female_south" },
{ "defName": "BeingThin", "parent": "BaseBeing", "label": "pawn.being", "texture": "things/pawn/humanlike/bodies/FurCovered_Thin_south" },
{ "defName": "BeingFat", "parent": "BaseBeing", "label": "pawn.being", "texture": "things/pawn/humanlike/bodies/FurCovered_Fat_south" },
{ "defName": "BeingHulk", "parent": "BaseBeing", "label": "pawn.being", "texture": "things/pawn/humanlike/bodies/FurCovered_Hulk_south" },
{ "defName": "BaseAnimal", "abstract": true, "kind": "animal" },
{ "defName": "Bear", "parent": "BaseAnimal", "label": "pawn.bear", "texture": "things/pawn/animal/bear/Bear_east", "sizeCells": 1.7 },
{ "defName": "DeerDoe", "parent": "BaseAnimal", "label": "pawn.deer", "texture": "things/pawn/animal/deer/DeerFemale_east", "sizeCells": 1.4 },
{ "defName": "DeerBuck", "parent": "BaseAnimal", "label": "pawn.deer", "texture": "things/pawn/animal/deer/DeerMale_east", "sizeCells": 1.6 },
{ "defName": "FoxRed", "parent": "BaseAnimal", "label": "pawn.fox", "texture": "things/pawn/animal/fox_red/Fox_Red_east", "sizeCells": 1.0 },
{ "defName": "Hare", "parent": "BaseAnimal", "label": "pawn.hare", "texture": "things/pawn/animal/hare/Hare_east", "sizeCells": 0.7 },
{ "defName": "WildBoar", "parent": "BaseAnimal", "label": "pawn.boar", "texture": "things/pawn/animal/wildboar/WildBoar_east", "sizeCells": 1.2 },
{ "defName": "Wolf", "parent": "BaseAnimal", "label": "pawn.wolf", "texture": "things/pawn/animal/wolf_timber/Wolf_Timber_east", "sizeCells": 1.4 },
{ "defName": "Muffalo", "parent": "BaseAnimal", "label": "pawn.muffalo", "texture": "things/pawn/animal/muffalo/Muffalo_east", "sizeCells": 1.8 },
{ "defName": "Squirrel", "parent": "BaseAnimal", "label": "pawn.squirrel", "texture": "things/pawn/animal/squirrel/Squirrel_east", "sizeCells": 0.6 }
]
}
+17
View File
@@ -0,0 +1,17 @@
{
"type": "Plant",
"defs": [
{ "defName": "BaseTree", "abstract": true, "sizeCells": 2.0, "trunkRadiusCells": 0.28 },
{ "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": "BaseBush", "abstract": true, "label": "plant.bush", "sizeCells": 1.4 },
{ "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" }
]
}
+22
View File
@@ -0,0 +1,22 @@
{
"type": "Terrain",
"defs": [
{ "defName": "DeepWater", "label": "terrain.deepwater", "maxHeight": 0.30, "color": [23, 63, 95] },
{ "defName": "Water", "label": "terrain.water", "maxHeight": 0.42, "color": [32, 99, 155] },
{ "defName": "Sand", "label": "terrain.sand", "maxHeight": 0.48, "color": [237, 201, 120],
"isLand": true, "surface": "terrain/surfaces/sand" },
{ "defName": "Grass", "label": "terrain.grass", "maxHeight": 0.68, "color": [90, 160, 70],
"isLand": true, "surface": "terrain/surfaces/mossy",
"scatter": [
{ "chance": 0.35, "options": ["GrassA"] },
{ "chance": 0.07, "options": ["BushA", "BushB", "BushC"] }
] },
{ "defName": "Forest", "label": "terrain.forest", "maxHeight": 0.85, "color": [44, 110, 50],
"isLand": true, "surface": "terrain/surfaces/soil",
"scatter": [
{ "chance": 0.35, "options": ["TreeOakA", "TreeOakB", "TreeBirchA", "TreeGrayPineA"] }
] },
{ "defName": "Mountain", "label": "terrain.mountain", "maxHeight": 1.01, "color": [136, 132, 128],
"surface": "terrain/surfaces/roughhewnrock" }
]
}