Пример #1
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 3,
                height: 3,
                anim: "smelter_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER1,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER3,
                construction_mass: new float[] { BUILDINGS.CONSTRUCTION_MASS_KG.TIER3[0], BUILDINGS.CONSTRUCTION_MASS_KG.TIER4[0] },
                construction_materials: new string[] { MATERIALS.METAL, MATERIALS.BUILDABLERAW },
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER2,
                build_location_rule: BuildLocationRule.OnFloor,
                decor: BUILDINGS.DECOR.PENALTY.TIER2,
                noise: NOISE_POLLUTION.NOISY.TIER6
                );

            buildingDef.RequiresPowerInput          = false;
            buildingDef.SelfHeatKilowattsWhenActive = BUILDINGS.SELF_HEAT_KILOWATTS.TIER4;
            buildingDef.ExhaustKilowattsWhenActive  = BUILDINGS.EXHAUST_ENERGY_ACTIVE.TIER8;
            buildingDef.OverheatTemperature         = BUILDINGS.OVERHEAT_TEMPERATURES.HIGH_2;
            buildingDef.InputConduitType            = ConduitType.Liquid;
            buildingDef.UtilityInputOffset          = new CellOffset(1, 0);
            buildingDef.OutputConduitType           = ConduitType.None;
            buildingDef.ViewMode        = OverlayModes.LiquidConduits.ID;
            buildingDef.AudioCategory   = "HollowMetal";
            buildingDef.AudioSize       = "large";
            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            return(buildingDef);
        }
Пример #2
0
 private static void Postfix(ref BuildingDef __result)
 {
     __result.ViewMode         = OverlayModes.GasConduits.ID;
     __result.MaterialCategory = MATERIALS.REFINED_METALS.AddItem(ID).ToArray();
     __result.Mass             = __result.Mass.AddItem(2).ToArray();
     if (ReBuildableAETNOptions.Instance.AddLogicPort)
     {
         __result.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(1, 0));
     }
 }
Пример #3
0
 protected override void ConfigureBuildingDef(BuildingDef buildingDef)
 {
     base.ConfigureBuildingDef(buildingDef);
     buildingDef.Floodable                   = false;
     buildingDef.AudioCategory               = "Metal";
     buildingDef.RequiresPowerInput          = true;
     buildingDef.EnergyConsumptionWhenActive = BUILDINGS.ENERGY_CONSUMPTION_WHEN_ACTIVE.TIER3;
     buildingDef.ExhaustKilowattsWhenActive  = BUILDINGS.SELF_HEAT_KILOWATTS.TIER0;
     buildingDef.SelfHeatKilowattsWhenActive = BUILDINGS.SELF_HEAT_KILOWATTS.TIER0;
     buildingDef.PermittedRotations          = PermittedRotations.R360;
     buildingDef.LogicInputPorts             = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
 }
Пример #4
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef(ID, 1, 1, "zliquidrecver_kanim", 100, 120f, TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER2, MATERIALS.ALL_METALS, 800f, BuildLocationRule.Anywhere, TUNING.BUILDINGS.DECOR.PENALTY.TIER1, TUNING.NOISE_POLLUTION.NOISY.TIER0, 0.2f);

            buildingDef.OutputConduitType   = ConduitType.Liquid;
            buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
            buildingDef.AudioCategory       = "HollowMetal";
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.Entombable          = false;

            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));

            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
            return(buildingDef);
        }
Пример #5
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef("MeteorDefenseLaser", 2, 2, "auto_miner_kanim", 10, 10f, BUILDINGS.CONSTRUCTION_MASS_KG.TIER3, MATERIALS.REFINED_METALS, 1600f, BuildLocationRule.OnFoundationRotatable, BUILDINGS.DECOR.PENALTY.TIER2, NOISE_POLLUTION.NOISY.TIER0);

            buildingDef.Floodable                   = false;
            buildingDef.AudioCategory               = "Metal";
            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = 1000f;
            buildingDef.ExhaustKilowattsWhenActive  = 0f;
            buildingDef.SelfHeatKilowattsWhenActive = 10f;
            buildingDef.PermittedRotations          = PermittedRotations.R360;
            buildingDef.Entombable                  = true;
            buildingDef.Floodable                   = true;
            buildingDef.LogicInputPorts             = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SolidConveyorIDs, "AutoMiner");
            return(buildingDef);
        }
Пример #6
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef(ID, 1, 1, "zpowersender_1kw_kanim", 30, 30f, BUILDINGS.CONSTRUCTION_MASS_KG.TIER3, MATERIALS.RAW_METALS, 800f, BuildLocationRule.Anywhere, BUILDINGS.DECOR.PENALTY.TIER1, NOISE_POLLUTION.NONE, 0.2f);

            buildingDef.RequiresPowerInput          = true;
            buildingDef.PowerInputOffset            = new CellOffset(0, 0);
            buildingDef.ViewMode                    = OverlayModes.Power.ID;
            buildingDef.AudioCategory               = "Metal";
            buildingDef.ExhaustKilowattsWhenActive  = 0f;
            buildingDef.SelfHeatKilowattsWhenActive = 0f;
            buildingDef.Floodable                   = false;
            buildingDef.Overheatable                = false;
            buildingDef.Entombable                  = false;

            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));

            return(buildingDef);
        }
Пример #7
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef def = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 1,
                height: 1,
                anim: "tec_block_kanim",
                hitpoints: 100,
                construction_time: 30f,
                construction_mass: new float[] {
                200f,
                100f
            },
                construction_materials: new string[] {
                MATERIALS.REFINED_METALS[0],
                "Ceramic"
            },
                melting_point: 1600f,
                build_location_rule: BuildLocationRule.Tile,
                decor: TUNING.BUILDINGS.DECOR.PENALTY.TIER2,
                noise: NOISE_POLLUTION.NONE);

            BuildingTemplates.CreateFoundationTileDef(def);

            def.RequiresPowerInput          = true;
            def.EnergyConsumptionWhenActive = Mathf.Max(0f, ModSettings.Instance.Wattage);
            def.Floodable               = false;
            def.Entombable              = false;
            def.Overheatable            = true;
            def.OverheatTemperature     = 523.15f;         // +250C
            def.ForegroundLayer         = Grid.SceneLayer.BuildingBack;
            def.ViewMode                = OverlayModes.Temperature.ID;
            def.AudioCategory           = "HollowMetal";
            def.AudioSize               = "small";
            def.BaseTimeUntilRepair     = -1f;
            def.ObjectLayer             = ObjectLayer.Building;
            def.SceneLayer              = Grid.SceneLayer.TileMain;
            def.PermittedRotations      = PermittedRotations.R360;
            def.DragBuild               = false;
            def.ThermalConductivity     = 0.01f;
            def.UseStructureTemperature = false;
            def.LogicInputPorts         = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            return(def);
        }
Пример #8
0
        public override BuildingDef CreateBuildingDef()
        {
            int    width             = 1;
            int    height            = 2;
            string anim              = "saltlamp_kanim";
            int    hitpoints         = 10;
            float  construction_time = 10f;

            float[]     construction_mass = BUILDINGS.CONSTRUCTION_MASS_KG.TIER1;
            float       melting_point     = 800f;
            BuildingDef buildingDef       = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, construction_mass, MATERIALS.REFINED_METALS, melting_point, BuildLocationRule.OnFloor, BUILDINGS.DECOR.NONE, NOISE_POLLUTION.NOISY.TIER6);

            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = 10f;
            buildingDef.ViewMode        = OverlayModes.Logic.ID;
            buildingDef.AudioCategory   = "Metal";
            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            return(buildingDef);
        }
Пример #9
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef(ID, 1, 1, "zpowerrecver_50kw_kanim", 30, 30f, BUILDINGS.CONSTRUCTION_MASS_KG.TIER5, MATERIALS.REFINED_METALS, 800f, BuildLocationRule.Anywhere, BUILDINGS.DECOR.PENALTY.TIER1, NOISE_POLLUTION.NOISY.TIER5, 0.2f);

            buildingDef.PowerOutputOffset           = new CellOffset(0, 0);
            buildingDef.ViewMode                    = OverlayModes.Power.ID;
            buildingDef.AudioCategory               = "Metal";
            buildingDef.ExhaustKilowattsWhenActive  = 0.0f;
            buildingDef.SelfHeatKilowattsWhenActive = 0.0f;
            buildingDef.GeneratorWattageRating      = 50000f;
            buildingDef.GeneratorBaseCapacity       = 50000f;
            buildingDef.Floodable                   = false;
            buildingDef.Overheatable                = false;
            buildingDef.Entombable                  = false;

            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));

            return(buildingDef);
        }
        public override BuildingDef CreateBuildingDef()
        {
            float[] material_mass = new float[2] {
                BUILDINGS.CONSTRUCTION_MASS_KG.TIER3[0], Config.requiredSaltForConstruction
            };
            string[] materials = new string[2] {
                MATERIALS.METAL, "Salt"
            };

            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 2,
                height: 2,
                anim: "electrolyzer_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER3,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER3,
                construction_mass: Config.requireSaltForConstruction ? material_mass : BUILDINGS.CONSTRUCTION_MASS_KG.TIER3,
                construction_materials: Config.requireSaltForConstruction ? materials : MATERIALS.ALL_METALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER3,
                build_location_rule: BuildLocationRule.Anywhere,
                decor: BUILDINGS.DECOR.PENALTY.TIER2,
                noise: NOISE_POLLUTION.NOISY.TIER2,
                0.2f
                );

            buildingDef.RequiresPowerInput          = true;
            buildingDef.PowerInputOffset            = new CellOffset(1, 0);
            buildingDef.EnergyConsumptionWhenActive = Config.energyConsumption;
            buildingDef.ExhaustKilowattsWhenActive  = Config.heatExhaust;
            buildingDef.SelfHeatKilowattsWhenActive = Config.heatSelf;
            buildingDef.ViewMode            = OverlayModes.GasConduits.ID;
            buildingDef.MaterialCategory    = MATERIALS.REFINED_METALS;
            buildingDef.AudioCategory       = "HollowMetal";
            buildingDef.InputConduitType    = ConduitType.Liquid;
            buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
            buildingDef.OutputConduitType   = ConduitType.Gas;
            buildingDef.UtilityOutputOffset = new CellOffset(1, 1);
            buildingDef.PermittedRotations  = PermittedRotations.FlipH;
            buildingDef.LogicInputPorts     = LogicOperationalController.CreateSingleInputPortList(new CellOffset(1, 0));
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.GasVentIDs, ID);
            return(buildingDef);
        }
        // Token: 0x06000021 RID: 33 RVA: 0x000027B0 File Offset: 0x000009B0
        public override BuildingDef CreateBuildingDef()
        {
            var tier           = BUILDINGS.CONSTRUCTION_MASS_KG.TIER3;
            var refined_METALS = MATERIALS.REFINED_METALS;
            var none           = NOISE_POLLUTION.NONE;
            var buildingDef    = BuildingTemplates.CreateBuildingDef("asquared31415.ConveyorBottleLoader", 1, 2, "conveyorin_kanim", 100, 60f, tier, refined_METALS, 1600f, BuildLocationRule.Anywhere, BUILDINGS.DECOR.PENALTY.TIER1, none);

            buildingDef.Deprecated                  = true;
            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = 120f;
            buildingDef.SelfHeatKilowattsWhenActive = 2f;
            buildingDef.Floodable           = false;
            buildingDef.ViewMode            = OverlayModes.SolidConveyor.ID;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.OutputConduitType   = ConduitType.Solid;
            buildingDef.PowerInputOffset    = new CellOffset(0, 1);
            buildingDef.UtilityOutputOffset = CellOffset.none;
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            buildingDef.LogicInputPorts     = LogicOperationalController.CreateSingleInputPortList(CellOffset.none);
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SolidConveyorIDs, "asquared31415.ConveyorBottleLoader");
            return(buildingDef);
        }
Пример #12
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 2,
                height: 2,
                anim: "mechanicstation_kanim", // "craftingstation_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER1,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER2,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER3,
                construction_materials: MATERIALS.ALL_METALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.OnFloor,
                decor: BUILDINGS.DECOR.NONE,
                noise: NOISE_POLLUTION.NOISY.TIER1);

            buildingDef.ViewMode        = OverlayModes.Rooms.ID;
            buildingDef.Overheatable    = false;
            buildingDef.AudioCategory   = "Metal";
            buildingDef.AudioSize       = "large";
            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            return(buildingDef);
        }
Пример #13
0
        public override BuildingDef CreateBuildingDef()
        {
            var width                      = 2;
            var height                     = 2;
            var hitpoints                  = 30;
            var anim                       = "waterbattery_kanim";
            var construction_time          = 60f;
            var construction_mass          = new[] { 150f, 50f };
            var construction_mats          = new[] { "RefinedMetal", "Transparent" };
            var melting_point              = 800f;
            var exhaust_temperature_active = 0.0f;
            var self_heat_kilowatts_active = 0.5f;
            var tieR1                      = NOISE_POLLUTION.NOISY.TIER1;
            var buildingDef                = CreateBuildingDef(ID, width, height, hitpoints, anim, construction_time,
                                                               construction_mass, construction_mats, melting_point, exhaust_temperature_active,
                                                               self_heat_kilowatts_active, TUNING.BUILDINGS.DECOR.PENALTY.TIER2, tieR1);

            SoundEventVolumeCache.instance.AddVolume("batterymed_kanim", "Battery_med_rattle",
                                                     NOISE_POLLUTION.NOISY.TIER2);
            buildingDef.Floodable       = false;
            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            return(buildingDef);
        }
Пример #14
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef def = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 2,
                height: 1,
                anim: "uvlamp_small_kanim",
                hitpoints: 10,
                construction_time: 10f,
                construction_mass: new float[] {
                BUILDINGS.CONSTRUCTION_MASS_KG.TIER1[0],
                BUILDINGS.CONSTRUCTION_MASS_KG.TIER1[0]
            },
                construction_materials: new string[] {
                TUNING.MATERIALS.METAL,
                "Ceramic"
            },
                melting_point: 1600f,
                build_location_rule: BuildLocationRule.OnCeiling,
                decor: DECOR.PENALTY.TIER1,
                noise: NOISE_POLLUTION.NONE
                );

            def.RequiresPowerInput          = true;
            def.EnergyConsumptionWhenActive = Mod.Settings.CeilingLampPowerCost;
            def.SelfHeatKilowattsWhenActive = Mod.Settings.CeilingLampHeat;
            def.AudioCategory      = "Metal";
            def.Floodable          = false;
            def.Entombable         = true;
            def.Overheatable       = false;
            def.ViewMode           = OverlayModes.Disease.ID;
            def.LogicInputPorts    = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            def.PermittedRotations = PermittedRotations.FlipH;
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.DiseaseIDs, ID);

            return(def);
        }
        public override BuildingDef CreateBuildingDef()
        {
            int    width             = 1;
            int    height            = 2;
            string anim              = "fridge_kanim";
            int    hitpoints         = TUNING.BUILDINGS.HITPOINTS.TIER4;
            float  construction_time = TUNING.BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER0;

            float[]           tieR4               = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
            string[]          rawMinerals         = MATERIALS.RAW_MINERALS;
            float             melting_point       = 800f;
            BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
            EffectorValues    nONE        = NOISE_POLLUTION.NONE;
            BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, tieR4, rawMinerals, melting_point, build_location_rule, BUILDINGS.DECOR.BONUS.TIER5, nONE, 0.2f);

            buildingDef.Floodable          = false;
            buildingDef.AudioCategory      = "Metal";
            buildingDef.Overheatable       = false;
            buildingDef.PermittedRotations = PermittedRotations.R360;
            SoundEventVolumeCache.instance.AddVolume("fridge_kanim", "Refrigerator_open", TUNING.NOISE_POLLUTION.NOISY.TIER1);
            SoundEventVolumeCache.instance.AddVolume("fridge_kanim", "Refrigerator_close", TUNING.NOISE_POLLUTION.NOISY.TIER1);
            buildingDef.LogicInputPorts = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            return(buildingDef);
        }
Пример #16
0
        protected override void ConfigureBuildingDef(BuildingDef buildingDef)
        {
            buildingDef.Floodable     = false;
            buildingDef.AudioCategory = "HollowMetal";

            // 资源
            buildingDef.InputConduitType    = conduitType;
            buildingDef.OutputConduitType   = conduitType;
            buildingDef.UtilityInputOffset  = new CellOffset(1, 2);
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);

            // 电力
            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = energyConsumptionWhenActive;
            buildingDef.ExhaustKilowattsWhenActive  = BUILDINGS.SELF_HEAT_KILOWATTS.TIER0;
            buildingDef.SelfHeatKilowattsWhenActive = BUILDINGS.SELF_HEAT_KILOWATTS.TIER4;
            buildingDef.PowerInputOffset            = new CellOffset(0, 0);

            // 信号
            buildingDef.LogicInputPorts  = LogicOperationalController.CreateSingleInputPortList(new CellOffset(1, 0));
            buildingDef.LogicOutputPorts = new List <LogicPorts.Port> {
                LogicPorts.Port.OutputPort(SmartReservoir.PORT_ID, new CellOffset(0, 0), LOGIC_PORT, LOGIC_PORT_ACTIVE, LOGIC_PORT_INACTIVE)
            };
        }