Beispiel #1
0
        public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
        {
            GeneratedBuildings.RegisterSingleLogicInputPort(go);
            go.AddOrGet <LogicOperationalController>();
            go.AddOrGet <RotatableExhaust>();
            Vent vent = go.AddOrGet <Vent>();

            vent.conduitType      = ConduitType.Gas;
            vent.endpointType     = Endpoint.Sink;
            vent.overpressureMass = WallPumpsConfig.GetConfig().gasWallPressureVent.maxPressure;
            ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>();

            conduitConsumer.conduitType        = ConduitType.Gas;
            conduitConsumer.ignoreMinMassCheck = true;
            Storage storage = BuildingTemplates.CreateDefaultStorage(go, false);

            storage.showInUI = true;
            go.AddOrGet <SimpleVent>();
            SimCellOccupier simCellOccupier = go.AddOrGet <SimCellOccupier>();

            simCellOccupier.notifyOnMelt = true;
            go.AddOrGet <Insulator>();
            go.AddOrGet <TileTemperature>();
            BuildingHP buildingHP = go.AddOrGet <BuildingHP>();

            buildingHP.destroyOnDamaged = true;
        }
Beispiel #2
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            //go.AddOrGetDef<StorageController.Def>();

            GeneratedBuildings.RegisterSingleLogicInputPort(go);
            go.AddOrGet <LogicOperationalController>();
            go.AddOrGet <EnergyConsumer>();
            go.AddOrGet <RotatablePump>();
            Storage storage = go.AddOrGet <Storage>();

            storage.capacityKg = WallPumpsConfig.GetConfig().gasWallPump.pumpRate * 2;
            RotatableElementConsumer elementConsumer = go.AddOrGet <RotatableElementConsumer>();

            elementConsumer.configuration       = ElementConsumer.Configuration.AllGas;
            elementConsumer.consumptionRate     = WallPumpsConfig.GetConfig().gasWallPump.pumpRate;
            elementConsumer.storeOnConsume      = true;
            elementConsumer.showInStatusPanel   = false;
            elementConsumer.rotatableCellOffset = new Vector3(0, 1);
            elementConsumer.consumptionRadius   = 2;
            ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>();

            conduitDispenser.conduitType    = ConduitType.Gas;
            conduitDispenser.alwaysDispense = true;
            conduitDispenser.elementFilter  = null;
            go.AddOrGetDef <OperationalController.Def>();
            AddVisualizer(go, false);

            GeneratedBuildings.RemoveLoopingSounds(go);
        }
Beispiel #3
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            GeneratedBuildings.RegisterSingleLogicInputPort(go);
            go.AddOrGet <LogicOperationalController>();
            go.AddOrGet <Operational>();

            Object.DestroyImmediate(go.GetComponent <RequireInputs>());
            Object.DestroyImmediate(go.GetComponent <ConduitConsumer>());
            Object.DestroyImmediate(go.GetComponent <ConduitDispenser>());

            BuildingTemplates.DoPostConfigure(go);
        }
 public override void DoPostConfigureComplete(GameObject go)
 {
     GeneratedBuildings.RegisterSingleLogicInputPort(go);
     go.AddOrGet <LogicOperationalController>();
     go.AddOrGetDef <PoweredActiveController.Def>();
 }
 public override void DoPostConfigureUnderConstruction(GameObject go)
 {
     GeneratedBuildings.RegisterSingleLogicInputPort(go);
 }
 public override void DoPostConfigurePreview(BuildingDef def, GameObject go)
 {
     GeneratedBuildings.RegisterSingleLogicInputPort(go);
 }