public override bool ShouldSkip(Pawn pawn, bool forced = false) { List <Building> allBuildingsColonist = pawn.Map.listerBuildings.allBuildingsColonist; for (int i = 0; i < allBuildingsColonist.Count; i++) { Building building = allBuildingsColonist[i]; if (building.def == ThingDef.Named("VPE_GasDrill")) { CompGasTrader comp = building.GetComp <CompGasTrader>(); if ((comp == null || comp.GasOn) && building.Map.designationManager.DesignationOn(building, DesignationDefOf.Uninstall) == null) { return(false); } } } return(true); }
public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); gasComp = parent.GetComp <CompGasTrader>(); }
public override void SpawnSetup(Map map, bool respawningAfterLoad) { base.SpawnSetup(map, respawningAfterLoad); gasComp = GetComp <CompGasTrader>(); }