Closed emipa606 closed 3 years ago
You could also use the DefGenerator.AddImpliedDef(); function to add it to the database instead of adding it to the menu manually.
I guess only Avius can answer to your question. However, I don't see a blocker to try xml approach. Will check this out and hopeful it will be change in next update. Thanks for pointing that out!
Great, as of now I just added this patch to my mod as a temporary solution:
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>/Defs/DesignationCategoryDef[defName = "Zone"]/specialDesignatorClasses</xpath>
<value>
<li>PrisonLabor.Core.LaborArea.Designator_AreaLaborExpand</li>
<li>PrisonLabor.Core.LaborArea.Designator_AreaLaborClear</li>
</value>
</Operation>
</Patch>
Why are the Zone-designators not added via xml but in the C#-code? This causes them to disappear if another mod reloads/sorts the tab-menu. If possible, can they be added as other areas via a xml-definition, or add a postfix to the menu-reload that readds them if they need to be added in C#?