Пример #1
0
        public override BuildingDef CreateBuildingDef()
        {
            string id = RadioTowerConfig.ID;

            float[]        tier6         = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER6;
            string[]       refinedMetals = MATERIALS.REFINED_METALS;
            EffectorValues none          = TUNING.NOISE_POLLUTION.NONE;
            EffectorValues tier4         = TUNING.BUILDINGS.DECOR.PENALTY.TIER4;
            EffectorValues noise         = none;
            BuildingDef    buildingDef   = BuildingTemplates.CreateBuildingDef(id, 2, 4, "meteor_detector_kanim", 30, 30f, tier6, refinedMetals, 1600f, BuildLocationRule.OnFloor, tier4, noise);

            buildingDef.Overheatable                = false;
            buildingDef.Floodable                   = true;
            buildingDef.Entombable                  = true;
            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = 1200f;
            buildingDef.ViewMode        = OverlayModes.Logic.ID;
            buildingDef.AudioCategory   = "Metal";
            buildingDef.SceneLayer      = Grid.SceneLayer.Building;
            buildingDef.LogicInputPorts = new List <LogicPorts.Port>()
            {
                LogicPorts.Port.RibbonInputPort(SnederRadioPortId, new CellOffset(0, 0), InputDescription, InputDescriptionActive, InputDescriptionInactive)
            };
            buildingDef.LogicOutputPorts = new List <LogicPorts.Port>()
            {
                LogicPorts.Port.RibbonOutputPort(ReceiverRadioPortId, new CellOffset(1, 0), OutputDescription, OutputDescriptionActive, OutputDescriptionInactive)
            };
            SoundEventVolumeCache.instance.AddVolume("world_element_sensor_kanim", "PowerSwitch_on", TUNING.NOISE_POLLUTION.NOISY.TIER3);
            SoundEventVolumeCache.instance.AddVolume("world_element_sensor_kanim", "PowerSwitch_off", TUNING.NOISE_POLLUTION.NOISY.TIER3);
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, RadioTowerConfig.ID);
            return(buildingDef);
        }
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "LogicWireBridge";
        int    width             = 3;
        int    height            = 1;
        string anim              = "logic_bridge_kanim";
        int    hitpoints         = 30;
        float  construction_time = 3f;

        float[]           tIER_TINY           = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER_TINY;
        string[]          rEFINED_METALS      = MATERIALS.REFINED_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.LogicBridge;
        EffectorValues    nONE        = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER_TINY, rEFINED_METALS, melting_point, build_location_rule, TUNING.BUILDINGS.DECOR.PENALTY.TIER0, nONE, 0.2f);

        buildingDef.ViewMode            = OverlayModes.Logic.ID;
        buildingDef.ObjectLayer         = ObjectLayer.LogicGates;
        buildingDef.SceneLayer          = Grid.SceneLayer.LogicGates;
        buildingDef.Overheatable        = false;
        buildingDef.Floodable           = false;
        buildingDef.Entombable          = false;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.PermittedRotations  = PermittedRotations.R360;
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(0, 2);
        GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, "LogicWireBridge");
        return(buildingDef);
    }
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "FloorSwitch";
        int    width             = 1;
        int    height            = 1;
        string anim              = "pressureswitch_kanim";
        int    hitpoints         = 30;
        float  construction_time = 30f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER1;
        string[]          rEFINED_METALS      = MATERIALS.REFINED_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Tile;
        EffectorValues    nONE                = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, rEFINED_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, nONE, 0.2f);

        buildingDef.IsFoundation             = true;
        buildingDef.Overheatable             = false;
        buildingDef.Floodable                = false;
        buildingDef.Entombable               = false;
        buildingDef.ViewMode                 = OverlayModes.Logic.ID;
        buildingDef.TileLayer                = ObjectLayer.FoundationTile;
        buildingDef.ReplacementLayer         = ObjectLayer.ReplacementTile;
        buildingDef.SceneLayer               = Grid.SceneLayer.TileMain;
        buildingDef.ConstructionOffsetFilter = BuildingDef.ConstructionOffsetFilter_OneDown;
        buildingDef.AudioCategory            = "Metal";
        buildingDef.AudioSize                = "small";
        buildingDef.BaseTimeUntilRepair      = -1f;
        GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, "FloorSwitch");
        return(buildingDef);
    }
    public override BuildingDef CreateBuildingDef()
    {
        var id                = "ExtendedSolidConduitBridge";
        var width             = 4;
        var height            = 1;
        var anim              = "utilities_conveyorbridge_kanim";
        var hitpoints         = 10;
        var construction_time = 30f;

        float[] tier                = { 600f };
        var     all_METALS          = MATERIALS.ALL_METALS;
        var     melting_point       = 1600f;
        var     build_location_rule = BuildLocationRule.Conduit;
        var     none                = NOISE_POLLUTION.NONE;
        var     buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tier, all_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, none);

        buildingDef.ObjectLayer         = ObjectLayer.SolidConduitConnection;
        buildingDef.SceneLayer          = Grid.SceneLayer.SolidConduitBridges;
        buildingDef.InputConduitType    = ConduitType.Solid;
        buildingDef.OutputConduitType   = ConduitType.Solid;
        buildingDef.Floodable           = false;
        buildingDef.Entombable          = false;
        buildingDef.Overheatable        = false;
        buildingDef.ViewMode            = OverlayModes.SolidConveyor.ID;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.PermittedRotations  = PermittedRotations.R360;
        buildingDef.UtilityInputOffset  = new CellOffset(-1, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(2, 0);
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SolidConveyorIDs, buildingDef.PrefabID);
        return(buildingDef);
    }
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 2,
                height: 2,
                anim: "gassplitter_b_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER0,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER0,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER2,
                construction_materials: MATERIALS.RAW_MINERALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER0,
                build_location_rule: BuildLocationRule.Conduit,
                decor: DECOR.NONE,
                noise: NOISE_POLLUTION.NONE);

            buildingDef.InputConduitType    = ConduitType.Gas;
            buildingDef.OutputConduitType   = ConduitType.Gas;
            buildingDef.Floodable           = false;
            buildingDef.Entombable          = false;
            buildingDef.Overheatable        = false;
            buildingDef.ViewMode            = OverlayModes.GasConduits.ID;
            buildingDef.ObjectLayer         = ObjectLayer.GasConduitConnection;
            buildingDef.SceneLayer          = Grid.SceneLayer.GasConduitBridges;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            buildingDef.UtilityInputOffset  = new CellOffset(1, 0);
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);

            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.GasVentIDs, Id);

            return(buildingDef);
        }
Пример #6
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 1,
                height: 1,
                anim: "alarm_lamp_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER1,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER2,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER1,
                construction_materials: MATERIALS.REFINED_METALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.Anywhere,
                decor: DECOR.NONE,
                noise: NOISE_POLLUTION.NONE);

            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.Entombable          = false;
            buildingDef.ViewMode            = OverlayModes.Logic.ID;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.SceneLayer          = Grid.SceneLayer.Building;
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.DefaultAnimState    = "off";
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            buildingDef.LogicInputPorts     = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));

            SoundEventVolumeCache.instance.AddVolume("switchgaspressure_kanim", "PowerSwitch_on", NOISE_POLLUTION.NOISY.TIER1);
            SoundEventVolumeCache.instance.AddVolume("switchgaspressure_kanim", "PowerSwitch_off", NOISE_POLLUTION.NOISY.TIER1);
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, Id);

            return(buildingDef);
        }
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 1,
                height: 1,
                anim: "wifi_emitter_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER1,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER2,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER1,
                construction_materials: MATERIALS.REFINED_METALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.Anywhere,
                decor: DECOR.NONE,
                noise: NOISE_POLLUTION.NONE);

            buildingDef.Overheatable  = false;
            buildingDef.Floodable     = false;
            buildingDef.Entombable    = false;
            buildingDef.ViewMode      = OverlayModes.Logic.ID;
            buildingDef.AudioCategory = "Metal";
            buildingDef.SceneLayer    = Grid.SceneLayer.Building;

            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = 50f;
            buildingDef.SelfHeatKilowattsWhenActive = 0f;
            buildingDef.PowerInputOffset            = new CellOffset(0, 0);

            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, Id);

            return(buildingDef);
        }
Пример #8
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "ExtendedGasConduitBridge";
        int    width             = 4;
        int    height            = 1;
        string anim              = "utilitygasbridge_kanim";
        int    hitpoints         = 10;
        float  construction_time = 3f;

        float[]           tier                = { 75f };
        string[]          raw_MINERALS        = MATERIALS.RAW_MINERALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Conduit;
        EffectorValues    none                = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tier, raw_MINERALS, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, none, 0.2f);

        buildingDef.ObjectLayer         = ObjectLayer.GasConduitConnection;
        buildingDef.SceneLayer          = Grid.SceneLayer.GasConduitBridges;
        buildingDef.InputConduitType    = ConduitType.Gas;
        buildingDef.OutputConduitType   = ConduitType.Gas;
        buildingDef.Floodable           = false;
        buildingDef.Entombable          = false;
        buildingDef.Overheatable        = false;
        buildingDef.ViewMode            = OverlayModes.GasConduits.ID;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.PermittedRotations  = PermittedRotations.R360;
        buildingDef.UtilityInputOffset  = new CellOffset(-1, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(2, 0);
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.GasVentIDs, buildingDef.PrefabID);
        return(buildingDef);
    }
Пример #9
0
    public BuildingDef CreateBuildingDef(string id, string anim, float construction_time, float[] construction_mass, float insulation, EffectorValues decor, EffectorValues noise)
    {
        int width     = 1;
        int height    = 1;
        int hitpoints = 10;

        string[]          aLL_METALS          = MATERIALS.ALL_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, construction_mass, aLL_METALS, melting_point, build_location_rule, decor, noise, 0.2f);

        buildingDef.ThermalConductivity = insulation;
        buildingDef.Floodable           = false;
        buildingDef.Overheatable        = false;
        buildingDef.Entombable          = false;
        buildingDef.ViewMode            = OverlayModes.Power.ID;
        buildingDef.ObjectLayer         = ObjectLayer.Wire;
        buildingDef.TileLayer           = ObjectLayer.WireTile;
        buildingDef.ReplacementLayer    = ObjectLayer.ReplacementWire;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.SceneLayer          = Grid.SceneLayer.Wires;
        buildingDef.isKAnimTile         = true;
        buildingDef.isUtility           = true;
        buildingDef.DragBuild           = true;
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.WireIDs, id);
        return(buildingDef);
    }
Пример #10
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "SolidConduitBridge";
        int    width             = 3;
        int    height            = 1;
        string anim              = "utilities_conveyorbridge_kanim";
        int    hitpoints         = 10;
        float  construction_time = 30f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER4;
        string[]          aLL_METALS          = MATERIALS.ALL_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Conduit;
        EffectorValues    nONE                = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, aLL_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, nONE, 0.2f);

        buildingDef.ObjectLayer         = ObjectLayer.SolidConduitConnection;
        buildingDef.SceneLayer          = Grid.SceneLayer.SolidConduitBridges;
        buildingDef.InputConduitType    = ConduitType.Solid;
        buildingDef.OutputConduitType   = ConduitType.Solid;
        buildingDef.Floodable           = false;
        buildingDef.Entombable          = false;
        buildingDef.Overheatable        = false;
        buildingDef.ViewMode            = OverlayModes.SolidConveyor.ID;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.PermittedRotations  = PermittedRotations.R360;
        buildingDef.UtilityInputOffset  = new CellOffset(-1, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(1, 0);
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SolidConveyorIDs, "SolidConduitBridge");
        return(buildingDef);
    }
Пример #11
0
    public override BuildingDef CreateBuildingDef()
    {
        string iD                = ID;
        int    width             = 2;
        int    height            = 4;
        string anim              = "meteor_detector_kanim";
        int    hitpoints         = 30;
        float  construction_time = 30f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
        string[]          rEFINED_METALS      = MATERIALS.REFINED_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
        EffectorValues    nONE                = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(iD, width, height, anim, hitpoints, construction_time, tIER, rEFINED_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, nONE, 0.2f);

        buildingDef.Overheatable                = false;
        buildingDef.Floodable                   = true;
        buildingDef.Entombable                  = true;
        buildingDef.RequiresPowerInput          = true;
        buildingDef.EnergyConsumptionWhenActive = 120f;
        buildingDef.ViewMode      = OverlayModes.Logic.ID;
        buildingDef.AudioCategory = "Metal";
        buildingDef.SceneLayer    = Grid.SceneLayer.Building;
        SoundEventVolumeCache.instance.AddVolume("world_element_sensor_kanim", "PowerSwitch_on", NOISE_POLLUTION.NOISY.TIER3);
        SoundEventVolumeCache.instance.AddVolume("world_element_sensor_kanim", "PowerSwitch_off", NOISE_POLLUTION.NOISY.TIER3);
        GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
        return(buildingDef);
    }
Пример #12
0
        public override BuildingDef CreateBuildingDef()
        {
            string id = LogicIlluminationSensorConfig.ID;

            float[]        tieR0_1     = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
            string[]       materials   = MATERIALS.REFINED_METALS;
            EffectorValues none        = TUNING.NOISE_POLLUTION.NONE;
            EffectorValues tieR0_2     = TUNING.BUILDINGS.DECOR.PENALTY.TIER0;
            EffectorValues noise       = none;
            BuildingDef    buildingDef = BuildingTemplates.CreateBuildingDef(id, 1, 1, "luxsensor_kanim", 30, 30f, tieR0_1, materials, 1600f, BuildLocationRule.Anywhere, tieR0_2, noise);

            buildingDef.Overheatable      = false;
            buildingDef.Floodable         = false;
            buildingDef.Entombable        = false;
            buildingDef.ViewMode          = OverlayModes.Logic.ID;
            buildingDef.AudioCategory     = "HollowMetal";
            buildingDef.SceneLayer        = Grid.SceneLayer.Building;
            buildingDef.AlwaysOperational = true;
            buildingDef.LogicOutputPorts  = new List <LogicPorts.Port>();
            buildingDef.LogicOutputPorts.Add(LogicPorts.Port.OutputPort(LogicSwitch.PORT_ID, new CellOffset(0, 0), STRINGS.ILLUMINATIONSENSOR.LOGIC_PORT, STRINGS.ILLUMINATIONSENSOR.LOGIC_PORT_ACTIVE, STRINGS.ILLUMINATIONSENSOR.LOGIC_PORT_INACTIVE, true));
            SoundEventVolumeCache.instance.AddVolume("luxsensor_kanim", "on", TUNING.NOISE_POLLUTION.NOISY.TIER3);
            SoundEventVolumeCache.instance.AddVolume("luxsensor_kanim", "off", TUNING.NOISE_POLLUTION.NOISY.TIER3);
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, LogicIlluminationSensorConfig.ID);
            return(buildingDef);
        }
Пример #13
0
        public override BuildingDef CreateBuildingDef()
        {
            int    width             = 1;
            int    height            = 3;
            string anim              = "relocator_dropoff_kanim";
            int    hitpoints         = 30;
            float  construction_time = 20f;

            float[]           tieR3               = BUILDINGS.CONSTRUCTION_MASS_KG.TIER2;
            string[]          allMetals           = MATERIALS.ALL_METALS;
            float             melting_point       = 1600f;
            BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
            EffectorValues    none        = NOISE_POLLUTION.NONE;
            BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, tieR3, allMetals, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER1, none, 0.2f);

            buildingDef.Floodable          = false;
            buildingDef.Overheatable       = false;
            buildingDef.ViewMode           = OverlayModes.SolidConveyor.ID;
            buildingDef.AudioCategory      = "Metal";
            buildingDef.InputConduitType   = ConduitType.Solid;
            buildingDef.UtilityInputOffset = new CellOffset(0, 1);
            buildingDef.PermittedRotations = PermittedRotations.Unrotatable;
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SolidConveyorIDs, "SolidConduitOutbox");
            return(buildingDef);
        }
Пример #14
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef buildingDef = BuildingTemplates.
                                      CreateBuildingDef(// building ID, width, height, .kanim ID,
                ID, 1, 1, "zconveyorrecver_kanim",
                // hitpoints, construction time,
                100, 120f,
                // build mass, build materials,
                TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER1,
                MATERIALS.ALL_METALS,
                // melting point (??), build location rule,
                800f, BuildLocationRule.Anywhere,
                // decor and noise
                TUNING.BUILDINGS.DECOR.PENALTY.TIER1,
                TUNING.NOISE_POLLUTION.NOISY.TIER0);

            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = 120f;
            buildingDef.ExhaustKilowattsWhenActive  = 0.0f;
            buildingDef.SelfHeatKilowattsWhenActive = 2f;
            buildingDef.Floodable           = false;
            buildingDef.ViewMode            = OverlayModes.SolidConveyor.ID;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.OutputConduitType   = ConduitType.Solid;
            buildingDef.PowerInputOffset    = new CellOffset(0, 0);
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SolidConveyorIDs, "ZConveyorRecver");

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

            return(buildingDef);
        }
Пример #15
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "SolidConduit";
        int    width             = 1;
        int    height            = 1;
        string anim              = "utilities_conveyor_kanim";
        int    hitpoints         = 10;
        float  construction_time = 3f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER2;
        string[]          rAW_METALS          = MATERIALS.RAW_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
        EffectorValues    nONE                = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, rAW_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, nONE, 0.2f);

        buildingDef.Floodable           = false;
        buildingDef.Overheatable        = false;
        buildingDef.Entombable          = false;
        buildingDef.ViewMode            = OverlayModes.SolidConveyor.ID;
        buildingDef.ObjectLayer         = ObjectLayer.SolidConduit;
        buildingDef.TileLayer           = ObjectLayer.SolidConduitTile;
        buildingDef.ReplacementLayer    = ObjectLayer.ReplacementSolidConduit;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = 0f;
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
        buildingDef.SceneLayer          = Grid.SceneLayer.SolidConduits;
        buildingDef.isKAnimTile         = true;
        buildingDef.isUtility           = true;
        buildingDef.DragBuild           = true;
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SolidConveyorIDs, "SolidConduit");
        return(buildingDef);
    }
Пример #16
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 1,
                height: 2,
                anim: "source_liquid_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER2,
                construction_time: ModSettings.Instance.BuildTimeSeconds,
                construction_mass: ModSettings.Instance.BuildMassKg,
                construction_materials: ModSettings.Instance.SandboxOnly ? GameStrings.MaterialLists.Neutronium : MATERIALS.REFINED_METALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER4,
                build_location_rule: BuildLocationRule.Anywhere,
                decor: BUILDINGS.DECOR.PENALTY.TIER1,
                noise: NOISE_POLLUTION.NOISY.TIER4,
                0.2f
                );

            buildingDef.Overheatable        = false;
            buildingDef.Entombable          = false;
            buildingDef.Floodable           = false;
            buildingDef.OutputConduitType   = ConduitType.Liquid;
            buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.PermittedRotations  = PermittedRotations.Unrotatable;
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
            buildingDef.LogicInputPorts     = LogicOperationalController.CreateSingleInputPortList(new CellOffset(0, 0));
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
            return(buildingDef);
        }
Пример #17
0
    public override BuildingDef CreateBuildingDef()
    {
        string[] strArray = new string[2]
        {
            "BuildableRaw",
            "RefinedMetal"
        };
        float[] construction_mass = new float[2]
        {
            BUILDINGS.CONSTRUCTION_MASS_KG.TIER4[0],
            BUILDINGS.CONSTRUCTION_MASS_KG.TIER2[0]
        };
        string[] construction_materials = strArray;

        BuildingDef buildingDef = base.CreateBuildingDef();

        buildingDef.AnimFiles = new KAnimFile[1]
        {
            Assets.GetAnim("Insulatedheavywatttile_conductive_kanim")
        };

        buildingDef.ThermalConductivity     = 0.01f;
        buildingDef.UseStructureTemperature = false;
        buildingDef.SceneLayer      = Grid.SceneLayer.WireBridges;
        buildingDef.ForegroundLayer = Grid.SceneLayer.TileMain;
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.WireIDs, "InsulatedWireRefinedBridgeHighWattage");
        return(buildingDef);
    }
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "LogicWire";
        int    width             = 1;
        int    height            = 1;
        string anim              = "logic_wires_kanim";
        int    hitpoints         = 10;
        float  construction_time = 3f;

        float[]           tIER_TINY           = BUILDINGS.CONSTRUCTION_MASS_KG.TIER_TINY;
        string[]          rEFINED_METALS      = MATERIALS.REFINED_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
        EffectorValues    nONE        = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER_TINY, rEFINED_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, nONE, 0.2f);

        buildingDef.ViewMode            = OverlayModes.Logic.ID;
        buildingDef.ObjectLayer         = ObjectLayer.LogicWires;
        buildingDef.TileLayer           = ObjectLayer.LogicWiresTiling;
        buildingDef.SceneLayer          = Grid.SceneLayer.LogicWires;
        buildingDef.Floodable           = false;
        buildingDef.Overheatable        = false;
        buildingDef.Entombable          = false;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.isKAnimTile         = true;
        buildingDef.isUtility           = true;
        buildingDef.DragBuild           = true;
        GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, "LogicWire");
        return(buildingDef);
    }
Пример #19
0
        public override BuildingDef CreateBuildingDef()
        {
            int    width             = 1;
            int    height            = 1;
            string anim              = "diseasesensor_kanim";
            int    hitpoints         = 30;
            float  construction_time = 30f;

            float[]           tIER                = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
            string[]          rEFINED_METALS      = MATERIALS.REFINED_METALS;
            float             melting_point       = 1600f;
            BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
            EffectorValues    nONE                = NOISE_POLLUTION.NONE;
            BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, tIER, rEFINED_METALS, melting_point, build_location_rule, TUNING.BUILDINGS.DECOR.PENALTY.TIER0, nONE, 0.2f);

            buildingDef.Overheatable  = false;
            buildingDef.Floodable     = false;
            buildingDef.Entombable    = false;
            buildingDef.ViewMode      = OverlayModes.Logic.ID;
            buildingDef.AudioCategory = "Metal";
            buildingDef.SceneLayer    = Grid.SceneLayer.Building;
            SoundEventVolumeCache.instance.AddVolume("switchthermal_kanim", "PowerSwitch_on", NOISE_POLLUTION.NOISY.TIER3);
            SoundEventVolumeCache.instance.AddVolume("switchthermal_kanim", "PowerSwitch_off", NOISE_POLLUTION.NOISY.TIER3);
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
            return(buildingDef);
        }
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "LiquidConduitPreferentialFlow";
        int    width             = 2;
        int    height            = 2;
        string anim              = "valveliquid_kanim";
        int    hitpoints         = 10;
        float  construction_time = 3f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER1;
        string[]          rAW_MINERALS        = MATERIALS.RAW_MINERALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Conduit;
        EffectorValues    nONE                = NOISE_POLLUTION.NONE;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, rAW_MINERALS, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, nONE, 0.2f);

        buildingDef.Deprecated          = true;
        buildingDef.InputConduitType    = ConduitType.Liquid;
        buildingDef.OutputConduitType   = ConduitType.Liquid;
        buildingDef.Floodable           = false;
        buildingDef.Entombable          = false;
        buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.PermittedRotations  = PermittedRotations.R360;
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(1, 0);
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, buildingDef.PrefabID);
        return(buildingDef);
    }
Пример #21
0
        public override BuildingDef CreateBuildingDef()
        {
            string ID                = "LogicDiodeGate";
            int    width             = 2;
            int    height            = 1;
            string anim              = "logic_not_kanim";
            int    hitpoints         = 10;
            float  construction_time = 3f;

            float[]           tier                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER_TINY;
            string[]          refined_METALS      = MATERIALS.REFINED_METALS;
            float             melting_point       = 1600f;
            BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
            EffectorValues    none                = NOISE_POLLUTION.NONE;
            BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, tier, refined_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, none, 0.2f);

            buildingDef.ViewMode            = OverlayModes.Logic.ID;
            buildingDef.ObjectLayer         = ObjectLayer.LogicGates;
            buildingDef.SceneLayer          = Grid.SceneLayer.LogicGates;
            buildingDef.ThermalConductivity = 0.05f;
            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.Entombable          = false;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            buildingDef.DragBuild           = true;
            LogicGateBase.uiSrcData         = Assets.instance.logicModeUIData;
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
            return(buildingDef);
        }
Пример #22
0
        public override BuildingDef CreateBuildingDef()
        {
            string id                = ID;
            int    width             = 3;
            int    height            = 1;
            string anim              = "utilityliquidbridge_kanim";
            int    hitpoints         = 10;
            float  construction_time = 15f;

            float[]           tIER = { BUILDINGS.CONSTRUCTION_MASS_KG.TIER1[0], BUILDINGS.CONSTRUCTION_MASS_KG.TIER1[0] }; //50KG, 50KG
            string[]          constructionMaterial = { SimHashes.Steel.ToString(), MATERIALS.PLASTIC };
            float             melting_point        = 1600f;
            BuildLocationRule build_location_rule  = BuildLocationRule.Conduit;
            EffectorValues    nONE        = NOISE_POLLUTION.NONE;
            BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, constructionMaterial, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER1, nONE);

            buildingDef.ObjectLayer         = ObjectLayer.LiquidConduitConnection;
            buildingDef.SceneLayer          = Grid.SceneLayer.LiquidConduitBridges;
            buildingDef.InputConduitType    = ConduitType.Liquid;
            buildingDef.OutputConduitType   = ConduitType.Liquid;
            buildingDef.Floodable           = false;
            buildingDef.Entombable          = false;
            buildingDef.Overheatable        = false;
            buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            //Don't define the utlity input/output offsets. Our MultiIO component will handle that itself
            //buildingDef.UtilityInputOffset = new CellOffset(-1, 0);
            //buildingDef.UtilityOutputOffset = new CellOffset(1, 0);
            buildingDef.ThermalConductivity = .0537f;
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
            return(buildingDef);
        }
Пример #23
0
        public override BuildingDef CreateBuildingDef()
        {
            string id                = ID;
            int    width             = 2;
            int    height            = 2;
            string anim              = "utilityliquidsplitter_kanim";
            int    hitpoints         = 10;
            float  construction_time = 3f;

            float[]  tieR3         = BUILDINGS.CONSTRUCTION_MASS_KG.TIER2;
            string[] refinedMetals = MATERIALS.RAW_MINERALS;
            float    melting_point = 1600f;

            BuildLocationRule build_location_rule = BuildLocationRule.Conduit;
            EffectorValues    none        = NOISE_POLLUTION.NONE;
            BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tieR3, refinedMetals, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, none, 0.2f);

            buildingDef.InputConduitType    = ConduitType.Liquid;
            buildingDef.OutputConduitType   = ConduitType.Liquid;
            buildingDef.Floodable           = false;
            buildingDef.Entombable          = false;
            buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
            buildingDef.ObjectLayer         = ObjectLayer.LiquidConduitConnection;
            buildingDef.SceneLayer          = Grid.SceneLayer.LiquidConduitBridges;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
            buildingDef.UtilityOutputOffset = new CellOffset(1, 0);
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
            return(buildingDef);
        }
Пример #24
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef def = BuildingTemplates.CreateBuildingDef(ID, 2, 2, "logic_4bit_comparator_kanim", 10, 30f, TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER0, TUNING.MATERIALS.REFINED_METALS, 1600f, BuildLocationRule.Anywhere, TUNING.BUILDINGS.DECOR.NONE, TUNING.NOISE_POLLUTION.NONE);

            def.Deprecated         = false;
            def.Overheatable       = false;
            def.Floodable          = false;
            def.Entombable         = false;
            def.PermittedRotations = PermittedRotations.R360;
            def.ViewMode           = OverlayModes.Logic.ID;
            def.AudioCategory      = "Metal";
            def.SceneLayer         = Grid.SceneLayer.LogicGates;
            def.ObjectLayer        = ObjectLayer.LogicGate;
            def.AlwaysOperational  = true;

            def.LogicInputPorts = new List <LogicPorts.Port>
            {
                LogicPorts.Port.RibbonInputPort(FourBitLogic.INPUT_1, new CellOffset(0, 0), STRINGS.UI.LOGIC_PORTS.GATE_MULTI_INPUT_ONE_NAME, STRINGS.UI.LOGIC_PORTS.GATE_MULTI_INPUT_ONE_ACTIVE, STRINGS.UI.LOGIC_PORTS.GATE_MULTI_INPUT_ONE_INACTIVE, show_wire_missing_icon: true, display_custom_name: true),
                LogicPorts.Port.RibbonInputPort(FourBitLogic.INPUT_2, new CellOffset(0, 1), STRINGS.UI.LOGIC_PORTS.GATE_MULTI_INPUT_TWO_NAME, STRINGS.UI.LOGIC_PORTS.GATE_MULTI_INPUT_TWO_ACTIVE, STRINGS.UI.LOGIC_PORTS.GATE_MULTI_INPUT_TWO_INACTIVE, show_wire_missing_icon: true, display_custom_name: true),
            };

            def.LogicOutputPorts = new List <LogicPorts.Port>
            {
                LogicPorts.Port.OutputPort(FourBitLogic.GREATER_THAN, new CellOffset(1, 0), Strings.Get("STRINGS.UI.LOGIC_PORTS.GREATER_THAN_NAME"), Strings.Get("STRINGS.UI.LOGIC_PORTS.GREATER_THAN_ACTIVE"), Strings.Get("STRINGS.UI.LOGIC_PORTS.GREATER_THAN_INACTIVE"), show_wire_missing_icon: true, display_custom_name: true),
                LogicPorts.Port.OutputPort(FourBitLogic.LESS_THAN, new CellOffset(1, 1), Strings.Get("STRINGS.UI.LOGIC_PORTS.LESS_THAN_NAME"), Strings.Get("STRINGS.UI.LOGIC_PORTS.LESS_THAN_ACTIVE"), Strings.Get("STRINGS.UI.LOGIC_PORTS.LESS_THAN_INACTIVE"), show_wire_missing_icon: true, display_custom_name: true),
            };

            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
            return(def);
        }
Пример #25
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                Id,
                2,
                3,
                Anim,
                3,
                60f,
                BUILDINGS.CONSTRUCTION_MASS_KG.TIER5,
                MATERIALS.REFINED_METALS,
                1_600f,
                BuildLocationRule.OnFloor,
                BUILDINGS.DECOR.PENALTY.TIER1,
                NOISE_POLLUTION.NONE
                );

            buildingDef.Floodable         = false;
            buildingDef.InputConduitType  = ConduitType.Liquid;
            buildingDef.OutputConduitType = ConduitType.Liquid;
            buildingDef.AudioCategory     = "HollowMetal";
            buildingDef.Overheatable      = false;

            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, Id);

            return(buildingDef);
        }
Пример #26
0
 public override BuildingDef CreateBuildingDef()
 {
     // Believe it or not, stock game pumps make no noise pollution
     PUtil.CopySoundsToAnim(LiquidPumpFiltered.Animation, "pumpliquid_kanim");
     GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
     return(LiquidPumpFiltered?.CreateDef());
 }
Пример #27
0
        public override BuildingDef CreateBuildingDef()
        {
            float[]        tieR2       = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER2; //not sure what this does?
            string[]       plumbable   = MATERIALS.PLUMBABLE;
            EffectorValues none1       = NOISE_POLLUTION.NONE;
            EffectorValues none2       = TUNING.BUILDINGS.DECOR.NONE;
            EffectorValues noise       = none1;
            BuildingDef    buildingDef = BuildingTemplates.CreateBuildingDef(ID, 1, 1, "DazBottleDrainPipe_kanim", 10, 3f, tieR2, plumbable, 1600f, BuildLocationRule.Anywhere, none2, noise);

            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false; //maybe in the future? for now if the pipe connected is fine, this building will work.
            buildingDef.Entombable          = true;
            buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
            buildingDef.ObjectLayer         = ObjectLayer.LiquidConduitConnection;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.OutputConduitType   = ConduitType.Liquid;
            //buildingDef.UtilityInputOffset = new CellOffset(0, 0);
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
            buildingDef.SceneLayer          = Grid.SceneLayer.LiquidConduitBridges;
            buildingDef.DragBuild           = false;
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
            return(buildingDef);
        }
Пример #28
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 1,
                height: 1,
                anim: "critter_egg_sensor_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER1,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER2,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER1,
                construction_materials: MATERIALS.REFINED_METALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.Anywhere,
                decor: DECOR.NONE,
                noise: NOISE_POLLUTION.NONE);

            buildingDef.Overheatable  = false;
            buildingDef.Floodable     = false;
            buildingDef.Entombable    = false;
            buildingDef.ViewMode      = OverlayModes.Logic.ID;
            buildingDef.AudioCategory = "Metal";
            buildingDef.SceneLayer    = Grid.SceneLayer.Building;

            SoundEventVolumeCache.instance.AddVolume("switchgaspressure_kanim", "PowerSwitch_on", NOISE_POLLUTION.NOISY.TIER3);
            SoundEventVolumeCache.instance.AddVolume("switchgaspressure_kanim", "PowerSwitch_off", NOISE_POLLUTION.NOISY.TIER3);
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, Id);

            return(buildingDef);
        }
Пример #29
0
        public override BuildingDef CreateBuildingDef()
        {
            string id                = EggsSensorConfig.ID;
            int    width             = 1;
            int    height            = 1;
            string anim              = "critter_sensor_kanim";
            int    hitpoints         = 30;
            float  construction_time = 30f;

            float[]           construction_mass      = BUILDINGS.CONSTRUCTION_MASS_KG.TIER1;
            string[]          construction_materials = MATERIALS.REFINED_METALS;
            float             melting_point          = 1600f;
            BuildLocationRule build_location_rule    = BuildLocationRule.Anywhere;
            EffectorValues    none        = NOISE_POLLUTION.NONE;
            BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, construction_mass, construction_materials, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, none, 0.2f);

            buildingDef.Overheatable  = false;
            buildingDef.Floodable     = false;
            buildingDef.Entombable    = false;
            buildingDef.ViewMode      = OverlayModes.Logic.ID;
            buildingDef.AudioCategory = "Metal";
            buildingDef.SceneLayer    = Grid.SceneLayer.Building;
            SoundEventVolumeCache.instance.AddVolume("switchgaspressure_kanim", "PowerSwitch_on", NOISE_POLLUTION.NOISY.TIER3);
            SoundEventVolumeCache.instance.AddVolume("switchgaspressure_kanim", "PowerSwitch_off", NOISE_POLLUTION.NOISY.TIER3);
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, EggsSensorConfig.ID);

            return(buildingDef);
        }
        protected BuildingDef CreateBuildingDef(
            string ID,
            string anim,
            int width  = 2,
            int height = 2)
        {
            string id      = ID;
            int    width1  = width;
            int    height1 = height;
            string anim1   = anim;

            float[]        tieR0_1       = BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
            string[]       refinedMetals = MATERIALS.REFINED_METALS;
            EffectorValues none          = NOISE_POLLUTION.NONE;
            EffectorValues tieR0_2       = BUILDINGS.DECOR.PENALTY.TIER0;
            EffectorValues noise         = none;
            BuildingDef    buildingDef   = BuildingTemplates.CreateBuildingDef(id, width1, height1, anim1, 10, 3f, tieR0_1, refinedMetals, 1600f, BuildLocationRule.Anywhere, tieR0_2, noise, 0.2f);

            buildingDef.ViewMode            = OverlayModes.Logic.ID;
            buildingDef.ObjectLayer         = ObjectLayer.LogicGates;
            buildingDef.SceneLayer          = Grid.SceneLayer.LogicGates;
            buildingDef.ThermalConductivity = 0.05f;
            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.Entombable          = false;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            buildingDef.DragBuild           = true;
            DenseLogicGateBase.uiSrcData    = Assets.instance.logicModeUIData;
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
            return(buildingDef);
        }