Exemple #1
0
        public override void PostSpawnSetup(bool respawningAfterLoad)
        {
            compFlickable = parent.GetComp <CompFlickable>();

            compPowerTrader = parent.GetComp <CompPowerTrader>();

            GasManager = parent.Map.GetComponent <GasManager>();

            GasManager.RegisterPipe(this, respawningAfterLoad);

            pipeTypeInt = (int)PipeType;

            base.PostSpawnSetup(respawningAfterLoad);
        }
        public override AcceptanceReport AllowsPlacing(BuildableDef checkingDef, IntVec3 loc, Rot4 rot, Map map, Thing thingToIgnore = null, Thing thing = null)
        {
            List <Thing> thingList = loc.GetThingList(map);

            for (int i = 0; i < thingList.Count; i++)
            {
                GasManager             manager = map.GetComponent <GasManager>();
                ThingDef               val     = checkingDef as ThingDef;
                CompProperties_GasPipe pipe    = val.GetCompProperties <CompProperties_GasPipe>();
                if (manager.PipeNetAt(loc) != null)
                {
                    return(false);
                }
            }
            return(true);
        }