Hediffs with Prerequisites - SmArtKar/AthenaFramework GitHub Wiki
HediffCompProperties_PrerequisiteHediff
can be used to make hediffs that require a certain other hediff to be implanted or to work.
Similarly to disableable hediffs, replacementDef
must contain HediffCompProperties_HediffRestorer
comp that acts as a temporary holder.
public class HediffCompProperties_PrerequisiteHediff : HediffCompProperties
{
public List<HediffDef> prerequisites;
// List of genes that the pawn should have for the item to be equipped
public List<GeneDef> genePrerequisites;
// If hediff can be implanted without prerequisites
public bool applyWithoutPrerequisites = false;
// Wherever prerequisite hediffs must be located on the same bodypart
public bool samePartPrerequisites = false;
// If hediff should be disabled if one or multiple prerequisites are missing
public bool disableIfMissing = true;
//Def of a hediff that will replace this hediff upon being disabled
public HediffDef replacementDef;
}