I was trying to get an install Brain as a Surgery, but it never showed up. The code I had was simply based off of other surgeries.
(Yes I did create a BodyPartDef and ThingDef for Brain.)
It didn't work until I saw that EPOE created an Abstract def called SurgeryNatural
I believe the important part is <recipeUsers> but I don't know why that's needed simply because vanilla surgeries just use SurgeryFlesh without having that tag.Can anyone explain?
Code Select
<RecipeDef ParentName="SurgeryFlesh">
<defName>InstallNaturalBrain</defName>
<label>install brain</label>
<description>Installs brain.</description>
<workerClass>Recipe_InstallNaturalBodyPart</workerClass>
<jobString>Installing brain.</jobString>
<workAmount>1200</workAmount>
<ingredients>
<li>
<filter>
<categories>
<li>Medicine</li>
</categories>
</filter>
<count>3</count>
</li>
<li>
<filter>
<thingDefs>
<li>Brain</li>
</thingDefs>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>Medicine</li>
</categories>
<thingDefs>
<li>Brain</li>
</thingDefs>
</fixedIngredientFilter>
<appliedOnFixedBodyParts>
<li>Brain</li>
</appliedOnFixedBodyParts>
</RecipeDef>
(Yes I did create a BodyPartDef and ThingDef for Brain.)
It didn't work until I saw that EPOE created an Abstract def called SurgeryNatural
Code Select
<RecipeDef Name="SurgeryNatural" ParentName="SurgeryFlesh" Abstract="True">
<surgerySuccessChanceFactor>0.8</surgerySuccessChanceFactor>
<deathOnFailedSurgeryChance>0.3</deathOnFailedSurgeryChance>
<recipeUsers>
<li>Human</li>
</recipeUsers>
</RecipeDef>
I believe the important part is <recipeUsers> but I don't know why that's needed simply because vanilla surgeries just use SurgeryFlesh without having that tag.Can anyone explain?