Esempio n. 1
0
        public override void SetUpPowerVars()
        {
            base.SetUpPowerVars();
            CompProperties_Pipe props = base.Props;

            this.PowerOutput        = -1f * props.basePowerConsumption;
            this.powerLastOutputted = (props.basePowerConsumption <= 0f);
        }
Esempio n. 2
0
        private void StartSustainerPoweredIfInactive()
        {
            CompProperties_Pipe props = base.Props;

            if (!props.soundAmbientPowered.NullOrUndefined() && this.sustainerPowered == null)
            {
                SoundInfo info = SoundInfo.InMap(this.parent, MaintenanceType.None);
                this.sustainerPowered = props.soundAmbientPowered.TrySpawnSustainer(info);
            }
        }
Esempio n. 3
0
 public bool EverTransmitsPipe(ThingDef thingdef)
 {
     for (int i = 0; i < thingdef.comps.Count; i++)
     {
         CompProperties_Pipe compProperties_Pipe = thingdef.comps[i] as CompProperties_Pipe;
         if (compProperties_Pipe != null && compProperties_Pipe.transmitsPower)
         {
             return(true);
         }
     }
     return(false);
 }