コード例 #1
0
        public override void SetUpWaterVars()
        {
            base.SetUpWaterVars();
            CompProperties_Water props = base.Props;

            this.WaterOutput        = -1f * props.baseWaterConsumption;
            this.waterLastOutputted = (props.baseWaterConsumption <= 0f);
        }
コード例 #2
0
        private void StartSustainerWateredIfInactive()
        {
            CompProperties_Water props = base.Props;

            if (!props.soundAmbientWatered.NullOrUndefined() && this.sustainerWatered == null)
            {
                SoundInfo info = SoundInfo.InMap(this.parent, MaintenanceType.None);
                this.sustainerWatered = props.soundAmbientWatered.TrySpawnSustainer(info);
            }
        }
コード例 #3
0
 public static bool EverTransmitsWater(this ThingDef def)
 {
     for (int i = 0; i < def.comps.Count; i++)
     {
         CompProperties_Water compProperties_Water = def.comps[i] as CompProperties_Water;
         if (compProperties_Water != null && compProperties_Water.transmitsWater)
         {
             return(true);
         }
     }
     return(false);
 }