public bool ThreatDisabled(IAttackTargetSearcher disabledFor)
        {
            CompPowerTrader comp = GetComp <CompPowerTrader>();

            if (comp != null && !comp.PowerOn)
            {
                return(true);
            }
            CompMannable comp2 = GetComp <CompMannable>();

            if (comp2 != null && !comp2.MannedNow)
            {
                return(true);
            }
            CompCanBeDormant comp3 = GetComp <CompCanBeDormant>();

            if (comp3 != null && !comp3.Awake)
            {
                return(true);
            }
            CompInitiatable comp4 = GetComp <CompInitiatable>();

            if (comp4 != null && !comp4.Initiated)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        public bool ThreatDisabled(IAttackTargetSearcher disabledFor)
        {
            CompPowerTrader comp = base.GetComp <CompPowerTrader>();

            if (comp != null && !comp.PowerOn)
            {
                return(true);
            }
            CompMannable comp2 = base.GetComp <CompMannable>();

            return(comp2 != null && !comp2.MannedNow);
        }
Esempio n. 3
0
 public override void SpawnSetup(Map map, bool respawningAfterLoad)
 {
     base.SpawnSetup(map, respawningAfterLoad);
     dormantComp     = GetComp <CompCanBeDormant>();
     initiatableComp = GetComp <CompInitiatable>();
     powerComp       = GetComp <CompPowerTrader>();
     mannableComp    = GetComp <CompMannable>();
     if (!respawningAfterLoad)
     {
         top.SetRotationFromOrientation();
         burstCooldownTicksLeft = def.building.turretInitialCooldownTime.SecondsToTicks();
     }
 }
		public bool ThreatDisabled()
		{
			CompPowerTrader comp = base.GetComp<CompPowerTrader>();
			if (comp != null && !comp.PowerOn)
			{
				return true;
			}
			CompMannable comp2 = base.GetComp<CompMannable>();
			if (comp2 != null && !comp2.MannedNow)
			{
				return true;
			}
			return false;
		}
Esempio n. 5
0
        public bool ThreatDisabled(IAttackTargetSearcher disabledFor)
        {
            CompPowerTrader comp = base.GetComp <CompPowerTrader>();
            bool            result;

            if (comp != null && !comp.PowerOn)
            {
                result = true;
            }
            else
            {
                CompMannable comp2 = base.GetComp <CompMannable>();
                result = (comp2 != null && !comp2.MannedNow);
            }
            return(result);
        }
Esempio n. 6
0
 public override void SpawnSetup(Map map, bool respawningAfterLoad)
 {
     base.SpawnSetup(map, respawningAfterLoad);
     this.powerComp    = base.GetComp <CompPowerTrader>();
     this.mannableComp = base.GetComp <CompMannable>();
 }