Engine pointer -> d044caf (formula gene grouping, content patches, def
field validation). Game-side demonstration of all three:
- genes.json: GeneHardiness whose effect is gsum('Gene.*Tolerance') — a
derived trait summing all tolerance genes via regex grouping.
- patches.json: a content patch giving every Bush* plant a wood harvest
product, applied to Core's own defs at load.
- GameContent registers load-time validators: Gene/Product defNames must
carry their type prefix.
- Program: a --check-content headless mode that loads all mod defs (running
patches + validators) and computes a sample genome's traits (compiling
every gene formula, grouping included) — a CI-friendly content lint.
Verified: --check-content reports 6 def types, 18 genes, 8 plants, 18
traits with hardiness computed from the gene group. Full suite green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9 lines
438 B
JSON
9 lines
438 B
JSON
{
|
|
"type": "Patch",
|
|
// Контент-патчи (фаза G5): применяются ко всем дефам типа defType, чьё имя подходит под regex match,
|
|
// проставляя поля set. Демонстрация: даём кустам древесину при сборе (веточки).
|
|
"patches": [
|
|
{ "defType": "Plant", "match": "Bush.*", "set": { "harvestProduct": "ProductWood" } }
|
|
]
|
|
}
|