Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
https://steamcommunity.com/sharedfiles/filedetails/?id=3018955558
In order to make the XML patching obsolete one would need to change the code from being a comp to a thingClass and patch the base class (GeneSetHolderBase) via Harmony.
Wouldn't do that. Comps are better than thingClass since you can stack the former until you puke, while a thingDef can only be one thingClass.
However, the XML patches can be simplified. Currently every thingDef gets its own patch operation.
Changing the XPath from
Defs/ThingDef[defName="Genepack"]
to
Defs/ThingDef[thingClass="Genepack"]
in
AddGeneToGenepacks.xml
removes the need for all other patches.
In other words: currently the patches target every item separately, like the Biotech Genepack, the Alpha Genes Alphapack and Mixedpack, and so on. With the changed XPath one patch targets the whole item category.
the reference to the Genepack class in GetCompleteGeneList() should be replaced with ..parent.GetType().BaseType == typeof(GeneSetHolderBase).
This way your code becomes compatible with any ThingClass that can hold genes, like Xenogerm injectors. For ppl like me, who like to craft an injector first, instead of chugging down raw genepacks. ;)