Birth type gene (live-bearing vs egg-laying) + hybrid-creation foundation
GeneEggLaying (species-fixed) selects the conception cycle: viviparous animals carry to a live birth (existing path); oviparous animals, after the same gravid period, LAY eggs instead. New Egg entity (carries the already-bred offspring genome) + EggSystem incubates and hatches it into a baby. AnimalPregnancySystem branches on the mother's birth type. Adds an oviparous showcase species, Chicken. Eggs are serialized (WorldSave.Eggs) like corpses, so clutches survive save/load. Also lays the foundation for creating any species or hybrid (full command/UI deferred): AnimalSet.HybridGenome(base, other) produces a cross anchored to a base species' body/gene-set with shared genes blended Mendelian-style — so Create(species, GenerateGenome) makes any species and Create(species, HybridGenome) makes any hybrid. EggTexture on AnimalDef (defaults to the seed dot placeholder); reproduction line added to the `animal` console command. Build + --check-content clean (41 genes, 40 traits). Not GUI-verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
e6b1367a3a
commit
b2e3eb490e
@@ -101,6 +101,36 @@
|
||||
"GeneOmnivory": 0.85,
|
||||
"GeneToxinTolerance": 0.25
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"defName": "Chicken",
|
||||
"label": "pawn.chicken",
|
||||
"kind": "animal",
|
||||
"texture": "things/pawn/animal/chicken/Chicken_east",
|
||||
"body": "Quadruped",
|
||||
"diet": ["plant"],
|
||||
"spawnPer1000Cells": 1.5,
|
||||
"baseSpeed": 22,
|
||||
"visionCells": 10,
|
||||
"genome": {
|
||||
"GeneMaxBodySize": 0.5,
|
||||
"GeneMetabolism": 1.3,
|
||||
"GeneMoveSpeed": 0.9,
|
||||
"GeneBloodVolume": 0.7,
|
||||
"GeneVision": 1.1,
|
||||
"GeneBrainSize": 0.3,
|
||||
"GeneInsulation": 0.45,
|
||||
"GeneFurColor": 0.6,
|
||||
"GeneMaturityAge": 50,
|
||||
"GeneLifespan": 180,
|
||||
"GeneBreedingSeason": 1,
|
||||
"GeneGestationDays": 12,
|
||||
"GeneLitterSize": 6,
|
||||
"GeneHerbivory": 0.8,
|
||||
"GeneToxinTolerance": 0.15,
|
||||
"GeneEggLaying": 1.0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -59,6 +59,13 @@
|
||||
{ "defName": "GeneSex", "kind": "Discrete", "label": "gene.sex",
|
||||
"variants": 2, "variantWeights": [0.5, 0.5], "mutationChance": 0, "tags": ["animal", "sex"] },
|
||||
|
||||
// Тип рождения (цикл зачатия): живородящие (eggLaying < 0.5) вынашивают и рожают живых детёнышей;
|
||||
// яйцекладущие (≥ 0.5) после вынашивания ОТКЛАДЫВАЮТ яйца-сущности, которые инкубируются и
|
||||
// вылупляются (см. AnimalPregnancySystem/EggSystem). Признак фиксирован по виду (spread/mutation 0).
|
||||
{ "defName": "GeneEggLaying", "parent": "BaseNumericGene", "label": "gene.eggLaying",
|
||||
"default": 0.0, "min": 0.0, "max": 1.0, "spread": 0, "mutationChance": 0, "tags": ["animal", "reproduction"],
|
||||
"effects": { "eggLaying": "value" } },
|
||||
|
||||
// Размножение (фаза A4): сезон гона фиксирован по виду (0 весна … 3 зима), срок вынашивания и помёт.
|
||||
{ "defName": "GeneBreedingSeason", "parent": "BaseNumericGene", "label": "gene.breedingSeason",
|
||||
"default": 2, "min": 0, "max": 3, "spread": 0, "mutationChance": 0, "tags": ["animal", "reproduction"],
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
"pawn.hare": "hare",
|
||||
"pawn.boar": "boar",
|
||||
"pawn.wolf": "wolf",
|
||||
"pawn.chicken": "chicken",
|
||||
"pawn.muffalo": "muffalo",
|
||||
"pawn.squirrel": "squirrel",
|
||||
"thought.gaveBirth": "gave birth",
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
"pawn.hare": "заяц",
|
||||
"pawn.boar": "кабан",
|
||||
"pawn.wolf": "волк",
|
||||
"pawn.chicken": "курица",
|
||||
"pawn.muffalo": "муффало",
|
||||
"pawn.squirrel": "белка",
|
||||
"thought.gaveBirth": "родила потомство",
|
||||
|
||||
Reference in New Issue
Block a user