Remove Hediffs on Removal - KonradHeinser/EBSGFramework GitHub Wiki
This comp causes other hediffs to be removed when the parent is removed. This is what the base of the comp looks like:
<comps>
<li Class="EBSGFramework.HediffCompProperties_RemoveHediffsOnRemoval">
</li>
</comps>
These are the options available:
- hediffs : A special list of items that have these options available in each li:
- hediff : The HediffDef to remove
- bodyParts : The BodypartDefs to check the hediff for. Usually only relevant if the hediff is going to pop up multiple places
- validSeverity : Default (0~99999) : Causes the comp to only activate if the parent hediff has a severity in this range. If a single value is entered, then any severity above that number will be considered valid. Mostly intended for situations where severity loss isn't the only way that the parent can be removed
This example removes blood loss, malnutrition, and cryptosleep sickness shortly when removed, usually due to the severity per day:
<HediffDef>
<defName>Refresh</defName>
<label>refresh</label>
<description>.</description>
<everCurableByItem>false</everCurableByItem>
<initialSeverity>0.001</initialSeverity>
<stages />
<hediffClass>HediffWithComps</hediffClass>
<scenarioCanAdd>false</scenarioCanAdd>
<comps>
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>-20</severityPerDay>
</li>
<li Class="EBSGFramework.HediffCompProperties_RemoveHediffsOnRemoval">
<hediffs>
<li>
<hediff>BloodLoss</hediff>
</li>
<li>
<hediff>Malnutrition</hediff>
</li>
<li>
<hediff>CryptosleepSickness</hediff>
</li>
</hediffs>
</li>
</comps>
</HediffDef>