Exemplo n.º 1
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);
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
 public static void AddToMenus()
 {
     if (WallPumpsConfig.GetConfig().gasWallVent.enabled)
     {
         AddBuilding.AddBuildingToPlanScreen("HVAC", ID, "GasVent");
         AddBuilding.IntoTechTree("GasPiping", ID);
     }
 }
Exemplo n.º 4
0
        public static void Prefix()
        {
            Debug.Log(" === WallPumps v. 2.6 Db_Initialize Prefix === ");

            AddTags.AddStrings(WallPumps.WallMachineRefinedMetals, "Wall Machine Refined Metals");
            AddTags.AddStrings(WallPumps.WallMachineMetals, "Wall Machine Metals");
            WallPumpsConfig config = WallPumpsConfig.GetConfig();
        }
Exemplo n.º 5
0
 public static void AddToMenus()
 {
     if (WallPumpsConfig.GetConfig().liquidWallVent.enabled)
     {
         AddBuilding.AddBuildingToPlanScreen("Plumbing", ID, "LiquidVent");
         AddBuilding.IntoTechTree("LiquidPiping", ID);
     }
 }
Exemplo n.º 6
0
 public static WallPumpsConfig GetConfig()
 {
     if (_instance == null)
     {
         _instance = ConfigUtils.LoadConfig("WallPumps", new WallPumpsConfig());
     }
     return(_instance);
 }
Exemplo n.º 7
0
 public static void Setup()
 {
     AddBuilding.AddStrings(ID, "High Pressure Gas Wall Vent", "A high pressure gas vent that's also a wall", "Releases high pressure " + UI.FormatAsLink("Gas", "ELEMENTS_GAS") + " into a room");
     if (WallPumpsConfig.GetConfig().gasWallPressureVent.enabled)
     {
         AddBuilding.AddBuildingToPlanScreen("HVAC", ID, "GasVentHighPressure");
         AddBuilding.IntoTechTree("ImprovedGasPiping", ID);
     }
 }
Exemplo n.º 8
0
 public static void Setup()
 {
     AddBuilding.AddStrings(ID, "Liquid Wall Pump", "A liquid pump that's also a wall", "Pumps out " + UI.FormatAsLink("Liquid", "ELEMENTS_LIQUID") + " from a room");
     if (WallPumpsConfig.GetConfig().liquidWallPump.enabled)
     {
         AddBuilding.AddBuildingToPlanScreen("Plumbing", ID, "LiquidPump");
         AddBuilding.IntoTechTree("ImprovedLiquidPiping", ID);
     }
 }
Exemplo n.º 9
0
 public static void Setup()
 {
     AddBuilding.AddStrings(ID, "Liquid Wall Vent", "A liquid vent that's also a wall", "Releases " + UI.FormatAsLink("Liquid", "ELEMENTS_LIQUID") + " into a room");
     if (WallPumpsConfig.GetConfig().liquidWallVent.enabled)
     {
         AddBuilding.AddBuildingToPlanScreen("Plumbing", ID, "LiquidVent");
         AddBuilding.IntoTechTree("LiquidPiping", ID);
     }
 }
Exemplo n.º 10
0
 public static void Setup()
 {
     AddBuilding.AddStrings(ID, "Gas Wall Pump", "A gas pump that's also a wall", "Pumps out " + UI.FormatAsLink("Gas", "ELEMENTS_GAS") + " from a room");
     if (WallPumpsConfig.GetConfig().gasWallPump.enabled)
     {
         AddBuilding.AddBuildingToPlanScreen("HVAC", ID, "GasPump");
         AddBuilding.IntoTechTree("ImprovedGasPiping", ID);
     }
 }
Exemplo n.º 11
0
        public static void Prefix()
        {
            Debug.Log(" === WallPumps v. 2.2 LoadGeneratedBuildings === ");

            AddTags.AddStrings(WallPumps.WallMachineRefinedMetals, "Wall Machine Refined Metals");
            AddTags.AddStrings(WallPumps.WallMachineMetals, "Wall Machine Metals");
            WallPumpsConfig config = WallPumpsConfig.GetConfig();

            GasWallPump.Setup();
            LiquidWallPump.Setup();
            GasWallVent.Setup();
            GasWallVentHighPressure.Setup();
            LiquidWallVent.Setup();
        }
Exemplo n.º 12
0
        public override BuildingDef CreateBuildingDef()
        {
            string[] constructionMats =
            {
                WallPumps.WallMachineRefinedMetals.Name,
                MATERIALS.PLASTIC
            };
            float[] constructionMass =
            {
                TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER3[0],
                TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER1[0]
            };
            BuildingDef def = BuildingTemplates.CreateBuildingDef(
                ID,
                1,
                1,
                "fairgaswallventhighpressure_kanim",
                30,
                30f,
                constructionMass,
                constructionMats,
                1600f,
                BuildLocationRule.Tile,
                TUNING.BUILDINGS.DECOR.PENALTY.TIER1,
                NOISE_POLLUTION.NONE,
                0.2f);

            BuildingTemplates.CreateFoundationTileDef(def);

            def.InputConduitType    = ConduitType.Gas;
            def.Floodable           = false;
            def.Overheatable        = false;
            def.ViewMode            = OverlayModes.GasConduits.ID;
            def.AudioCategory       = "Metal";
            def.UtilityInputOffset  = new CellOffset(0, 0);
            def.UtilityOutputOffset = new CellOffset(0, 1);
            def.PermittedRotations  = PermittedRotations.R360;
            // Tile properties
            def.ThermalConductivity     = WallPumpsConfig.GetConfig().gasWallPressureVent.thermalConductivity;
            def.UseStructureTemperature = false;
            def.Entombable          = false;
            def.BaseTimeUntilRepair = -1f;
            def.ObjectLayer         = ObjectLayer.Building;
            def.SceneLayer          = Grid.SceneLayer.TileMain;
            def.ForegroundLayer     = Grid.SceneLayer.TileMain;
            def.isSolidTile         = true;
            return(def);
        }
Exemplo n.º 13
0
        public override BuildingDef CreateBuildingDef()
        {
            string[]    constructionMats = { WallPumps.WallMachineRefinedMetals.Name };
            BuildingDef def = BuildingTemplates.CreateBuildingDef(
                ID,
                1,
                1,
                "fairliquidwallpump_kanim",
                30,
                30f,
                TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER2,
                constructionMats,
                1600f,
                BuildLocationRule.Tile,
                TUNING.BUILDINGS.DECOR.PENALTY.TIER1,
                NOISE_POLLUTION.NOISY.TIER2,
                0.2f);

            BuildingTemplates.CreateFoundationTileDef(def);

            def.RequiresPowerInput          = true;
            def.EnergyConsumptionWhenActive = WallPumpsConfig.GetConfig().liquidWallPump.energyConsumption;
            def.ExhaustKilowattsWhenActive  = 0f;
            def.SelfHeatKilowattsWhenActive = 0f;
            def.OutputConduitType           = ConduitType.Liquid;
            def.Floodable           = false;
            def.ViewMode            = OverlayModes.LiquidConduits.ID;
            def.AudioCategory       = "Metal";
            def.PowerInputOffset    = new CellOffset(0, 0);
            def.UtilityOutputOffset = new CellOffset(0, 0);
            def.PermittedRotations  = PermittedRotations.R360;
            // Tile properties
            def.ThermalConductivity     = WallPumpsConfig.GetConfig().liquidWallPump.thermalConductivity;
            def.UseStructureTemperature = false;
            def.Entombable          = false;
            def.BaseTimeUntilRepair = -1f;
            def.ObjectLayer         = ObjectLayer.Building;
            def.SceneLayer          = Grid.SceneLayer.TileMain;
            def.ForegroundLayer     = Grid.SceneLayer.TileMain;
            def.isSolidTile         = true;
            return(def);
        }