Jump to content

disease idx

Recommended Posts

i'm trying a mod to detect disease and filter the input content, like the liquid pipe germ detector.

my problem is when i extract the input-content.diseaseIdx, what value is considered as valid disease?

i reviewed the codes of LiquidConduitDiseaseSensorConfig -> ConduitDiseaseSensor -> ConduitThresholdSensor.ConduitUpdate()

    if (this.activateAboveThreshold)
      if (((double) currentValue <= (double) this.threshold || this.IsSwitchedOn) && ((double) currentValue > (double) this.threshold || !this.IsSwitchedOn))


looks like zero is considered as valid disease data.

anyone know otherwise?


Link to comment
Share on other sites

I believe the valid disease indices are 0 and 1, from WorldGen.

public static List<string> diseaseIds = new List<string>()

Also, Sim.DiseaseCell has byte.MaxValue as invalid, which could be a consideration for mod compatibility:

public static readonly Sim.DiseaseCell Invalid = new Sim.DiseaseCell()
      diseaseIdx = byte.MaxValue,
      elementCount = 0


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...