コード例 #1
0
        /// <summary>
        /// Define construction costs, health, size, noises, random stats.
        /// </summary>
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 5,
                height: 4,
                anim: "geyser_oil_cap_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER4,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER6,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER7,
                construction_materials: MATERIALS.REFINED_METALS,
                melting_point: 0,
                build_location_rule: BuildLocationRule.OnFloor,
                decor: BUILDINGS.DECOR.PENALTY.TIER4,
                noise: NOISE_POLLUTION.NOISY.TIER4);

            buildingDef.Overheatable        = false;
            buildingDef.Floodable           = false;
            buildingDef.MaterialCategory    = MATERIALS.REFINED_METALS;
            buildingDef.AudioCategory       = "HollowMetal";
            buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
            buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;

            SoundEventVolumeCache.instance.AddVolume("geyser_liquid_water_slush_kanim", "Geyser_erupt_LP", NOISE_POLLUTION.NOISY.TIER0);

            return(buildingDef);
        }
コード例 #2
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "ResetSkillsStation";
        int    width             = 3;
        int    height            = 3;
        string anim              = "reSpeccer_kanim";
        int    hitpoints         = 30;
        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.OnFloor;
        EffectorValues    tIER2               = NOISE_POLLUTION.NOISY.TIER1;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, aLL_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, tIER2, 0.2f);

        buildingDef.RequiresPowerInput          = true;
        buildingDef.EnergyConsumptionWhenActive = 480f;
        buildingDef.ExhaustKilowattsWhenActive  = 0.5f;
        buildingDef.SelfHeatKilowattsWhenActive = 4f;
        buildingDef.ViewMode      = OverlayModes.Power.ID;
        buildingDef.AudioCategory = "Metal";
        buildingDef.AudioSize     = "large";
        return(buildingDef);
    }
コード例 #3
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 1,
                height: 2,
                anim: "miniwaterpump_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER2,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER0,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER0,
                construction_materials: MATERIALS.ALL_METALS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER0,
                build_location_rule: BuildLocationRule.Conduit,
                decor: BUILDINGS.DECOR.PENALTY.TIER1,
                noise: NOISE_POLLUTION.NOISY.TIER0,
                0.2f
                );

            buildingDef.OutputConduitType   = ConduitType.Liquid;
            buildingDef.Floodable           = false;
            buildingDef.Entombable          = false;
            buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
            buildingDef.AudioCategory       = "HollowMetal";
            buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            return(buildingDef);
        }
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "InsulationTile";
        int    width             = 1;
        int    height            = 1;
        string anim              = "floor_insulated_kanim";
        int    hitpoints         = 30;
        float  construction_time = 30f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER4;
        string[]          rAW_MINERALS        = MATERIALS.RAW_MINERALS;
        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, rAW_MINERALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, nONE, 0.2f);

        BuildingTemplates.CreateFoundationTileDef(buildingDef);
        buildingDef.ThermalConductivity     = 0.01f;
        buildingDef.Floodable               = false;
        buildingDef.Overheatable            = false;
        buildingDef.Entombable              = false;
        buildingDef.UseStructureTemperature = false;
        buildingDef.AudioCategory           = "Metal";
        buildingDef.AudioSize               = "small";
        buildingDef.BaseTimeUntilRepair     = -1f;
        buildingDef.SceneLayer              = Grid.SceneLayer.TileMain;
        buildingDef.isKAnimTile             = true;
        buildingDef.BlockTileAtlas          = Assets.GetTextureAtlas("tiles_insulated");
        buildingDef.BlockTilePlaceAtlas     = Assets.GetTextureAtlas("tiles_insulated_place");
        buildingDef.BlockTileMaterial       = Assets.GetMaterial("tiles_solid");
        buildingDef.DecorBlockTileInfo      = Assets.GetBlockTileDecorInfo("tiles_solid_tops_info");
        buildingDef.DecorPlaceBlockTileInfo = Assets.GetBlockTileDecorInfo("tiles_solid_tops_place_info");
        return(buildingDef);
    }
コード例 #5
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 1,
                height: 1,
                anim: "caution_threshold_walls_kanim",
                hitpoints: 30,
                construction_time: 10f,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER2,
                construction_materials: MATERIALS.RAW_MINERALS,
                melting_point: 1600f,
                build_location_rule: BuildLocationRule.NotInTiles,
                decor: DECOR.PENALTY.TIER0,
                noise: NOISE_POLLUTION.NONE);

            buildingDef.IsFoundation        = true;
            buildingDef.Entombable          = false;
            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.DefaultAnimState    = "off";
            buildingDef.ObjectLayer         = ObjectLayer.Backwall;
            buildingDef.SceneLayer          = Grid.SceneLayer.Backwall;
            return(buildingDef);
        }
コード例 #6
0
        public override BuildingDef CreateBuildingDef()
        {
            string id                = ID;
            int    width             = 3;
            int    height            = 1;
            string anim              = "table_breakroom_kanim";
            int    hitpoints         = 50;
            float  construction_time = 20f;

            float[]  construction_mass      = BUILDINGS.CONSTRUCTION_MASS_KG.TIER3;
            string[] construction_materials = MATERIALS.PLASTICS;
            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,
                                                                          construction_mass, construction_materials, melting_point, build_location_rule, BUILDINGS.DECOR.BONUS.TIER3, none);

            buildingDef.Floodable           = true;
            buildingDef.Overheatable        = false;
            buildingDef.AudioCategory       = "Plastic";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.ViewMode            = OverlayModes.Decor.ID;
            buildingDef.SceneLayer          = Grid.SceneLayer.Building;
            buildingDef.DefaultAnimState    = "off";
            return(buildingDef);
        }
コード例 #7
0
    public override BuildingDef CreateBuildingDef()
    {
        int    width             = 1;
        int    height            = 2;
        string anim              = "valveliquid_kanim";
        int    hitpoints         = 30;
        float  construction_time = 10f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER3;
        string[]          rAW_METALS          = MATERIALS.RAW_METALS;
        float             melting_point       = 1600f;
        BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
        EffectorValues    tIER2               = NOISE_POLLUTION.NOISY.TIER1;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, tIER, rAW_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, tIER2, 0.2f);

        buildingDef.InputConduitType            = ConduitType.Liquid;
        buildingDef.OutputConduitType           = ConduitType.Liquid;
        buildingDef.Floodable                   = false;
        buildingDef.ViewMode                    = OverlayModes.LiquidConduits.ID;
        buildingDef.AudioCategory               = "Metal";
        buildingDef.PermittedRotations          = PermittedRotations.R360;
        buildingDef.UtilityInputOffset          = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset         = new CellOffset(0, 1);
        buildingDef.RequiresPowerInput          = true;
        buildingDef.PowerInputOffset            = new CellOffset(0, 1);
        buildingDef.EnergyConsumptionWhenActive = 480f;
        return(buildingDef);
    }
コード例 #8
0
        public override BuildingDef CreateBuildingDef()
        {
            string id                = ID;
            int    width             = 3;
            int    height            = 1;
            string anim              = "utilityliquidbridge_kanim";
            int    hitpoints         = 10;
            float  construction_time = 45f;

            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;
            buildingDef.UtilityInputOffset  = new CellOffset(-1, 0);
            buildingDef.UtilityOutputOffset = new CellOffset(1, 0);
            buildingDef.ThermalConductivity = .0537f;
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
            return(buildingDef);
        }
コード例 #9
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "LiquidConduitBridge";
        int    width             = 3;
        int    height            = 1;
        string anim              = "utilityliquidbridge_kanim";
        int    hitpoints         = 10;
        float  construction_time = 3f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER2;
        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.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;
        buildingDef.UtilityInputOffset  = new CellOffset(-1, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(1, 0);
        GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, "LiquidConduitBridge");
        return(buildingDef);
    }
コード例 #10
0
        public override BuildingDef CreateBuildingDef()
        {
            int    width  = 3;
            int    height = 2;
            string anim   = "gas_bottler_kanim";
            //string anim = "liquidbottler_kanim";
            int   hitpoints         = BUILDINGS.HITPOINTS.TIER1;
            float construction_time = BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER2;

            float[]           tier              = BUILDINGS.CONSTRUCTION_MASS_KG.TIER4;
            string[]          raw_METALS        = MATERIALS.ALL_METALS;
            float             melting_point     = BUILDINGS.MELTING_POINT_KELVIN.TIER0;
            BuildLocationRule buildLocationRule = BuildLocationRule.OnFloor;
            EffectorValues    decorPenalty      = BUILDINGS.DECOR.PENALTY.TIER1;
            EffectorValues    noisePollution    = NOISE_POLLUTION.NOISY.TIER0;
            BuildingDef       buildingDef       = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, tier, raw_METALS, melting_point, buildLocationRule, decorPenalty, noisePollution, 0.2f);

            buildingDef.InputConduitType   = ConduitType.Liquid;
            buildingDef.UtilityInputOffset = new CellOffset(0, 0);
            buildingDef.ViewMode           = OverlayModes.LiquidConduits.ID;
            buildingDef.Floodable          = false;
            buildingDef.Entombable         = true;
            buildingDef.AudioCategory      = "HollowMetal";
            buildingDef.DefaultAnimState   = "on";
            GeneratedBuildings.RegisterWithOverlay(OverlayScreen.LiquidVentIDs, ID);
            return(buildingDef);
        }
コード例 #11
0
        //  private static readonly LogicPorts.Port OUTPUT_PORT = LogicPorts.Port.OutputPort(FilteredStorage.FULL_PORT_ID, new CellOffset(0, 1), STRINGS.BUILDINGS.PREFABS.REFRIGERATOR.LOGIC_PORT_DESC, false);

        public override BuildingDef CreateBuildingDef()
        {
            string id                = "UNIVERSALCOOLER";
            int    width             = 1;
            int    height            = 2;
            string anim              = "fridge_kanim";
            int    hitpoints         = 30;
            float  construction_time = 10f;

            float[]           tier                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER4;
            string[]          raw_MINERALS        = MATERIALS.ANY_BUILDABLE;
            float             melting_point       = 800f;
            BuildLocationRule build_location_rule = BuildLocationRule.Anywhere;
            EffectorValues    tier2               = NOISE_POLLUTION.NOISY.TIER2;
            BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tier, raw_MINERALS, melting_point, build_location_rule, BUILDINGS.DECOR.BONUS.TIER1, tier2, 0.2f);

            buildingDef.RequiresPowerInput          = true;
            buildingDef.EnergyConsumptionWhenActive = 2000f;
            buildingDef.ExhaustKilowattsWhenActive  = 1f;
            buildingDef.PermittedRotations          = PermittedRotations.R360;
            buildingDef.Floodable     = false;
            buildingDef.ViewMode      = OverlayModes.Power.ID;
            buildingDef.AudioCategory = "Metal";
            SoundEventVolumeCache.instance.AddVolume("fridge_kanim", "Refrigerator_open", NOISE_POLLUTION.NOISY.TIER1);
            SoundEventVolumeCache.instance.AddVolume("fridge_kanim", "Refrigerator_close", NOISE_POLLUTION.NOISY.TIER1);
            return(buildingDef);
        }
コード例 #12
0
        public override BuildingDef CreateBuildingDef()
        {
            int    width     = 1;
            int    height    = 2;
            string anim      = "lava_lamp_kanim";
            int    hitpoints = TUNING.BUILDINGS.HITPOINTS.TIER4;
            float  c_time    = TUNING.BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER0;

            float[]           c_mass        = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
            string[]          c_mats        = MATERIALS.RAW_MINERALS;
            float             melting_point = BUILDINGS.MELTING_POINT_KELVIN.TIER4;
            BuildLocationRule b_loc         = BuildLocationRule.Anywhere;
            EffectorValues    myArt         = new EffectorValues()
            {
                amount = 220, radius = 50
            };
            EffectorValues noisy       = NOISE_POLLUTION.NONE;
            BuildingDef    buildingDef = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, c_time, c_mass, c_mats, melting_point, b_loc, myArt, noisy, 0.2f);

            buildingDef.Floodable           = false;
            buildingDef.SceneLayer          = Grid.SceneLayer.InteriorWall;
            buildingDef.Overheatable        = false;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.ViewMode            = OverlayModes.Decor.ID;
            buildingDef.DefaultAnimState    = "off";
            buildingDef.PermittedRotations  = PermittedRotations.R360;
            return(buildingDef);
        }
コード例 #13
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 1,
                height: 1,
                anim: "ladder_poi_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER2,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER1,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER1,
                construction_materials: new[] { SimHashes.Steel.ToString() },
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER2,
                build_location_rule: BuildLocationRule.Anywhere,
                decor: DECOR.BONUS.TIER0,
                noise: NOISE_POLLUTION.NONE);

            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.Entombable          = false;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.AudioSize           = "small";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.DragBuild           = true;
            buildingDef.TileLayer           = ObjectLayer.LadderTile;
            buildingDef.ReplacementLayer    = ObjectLayer.ReplacementLadder;

            return(buildingDef);
        }
コード例 #14
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "FirePole";
        int    width             = 1;
        int    height            = 1;
        string anim              = "firepole_kanim";
        int    hitpoints         = 10;
        float  construction_time = 10f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER2;
        string[]          aLL_METALS          = MATERIALS.ALL_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, aLL_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER0, nONE, 0.2f);

        BuildingTemplates.CreateLadderDef(buildingDef);
        buildingDef.Floodable           = false;
        buildingDef.Overheatable        = false;
        buildingDef.Entombable          = false;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "small";
        buildingDef.BaseTimeUntilRepair = -1f;
        buildingDef.DragBuild           = true;
        return(buildingDef);
    }
コード例 #15
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "CO2Scrubber";
        int    width             = 2;
        int    height            = 2;
        string anim              = "co2scrubber_kanim";
        int    hitpoints         = 30;
        float  construction_time = 30f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER2;
        string[]          rAW_METALS          = MATERIALS.RAW_METALS;
        float             melting_point       = 800f;
        BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
        EffectorValues    tIER2               = NOISE_POLLUTION.NOISY.TIER3;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, rAW_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER1, tIER2, 0.2f);

        buildingDef.RequiresPowerInput          = true;
        buildingDef.EnergyConsumptionWhenActive = 120f;
        buildingDef.SelfHeatKilowattsWhenActive = 1f;
        buildingDef.InputConduitType            = ConduitType.Liquid;
        buildingDef.OutputConduitType           = ConduitType.Liquid;
        buildingDef.ViewMode            = OverlayModes.Oxygen.ID;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "large";
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(1, 1);
        buildingDef.PermittedRotations  = PermittedRotations.FlipH;
        return(buildingDef);
    }
コード例 #16
0
        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);
        }
コード例 #17
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 1,
                height: 1,
                anim: "critter_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);
        }
コード例 #18
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "Compost";
        int    width             = 2;
        int    height            = 2;
        string anim              = "compost_kanim";
        int    hitpoints         = 30;
        float  construction_time = 30f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER5;
        string[]          rAW_MINERALS        = MATERIALS.RAW_MINERALS;
        float             melting_point       = 800f;
        BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
        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.PENALTY.TIER3, nONE, 0.2f);

        buildingDef.ExhaustKilowattsWhenActive  = 0.125f;
        buildingDef.SelfHeatKilowattsWhenActive = 1f;
        buildingDef.Overheatable        = false;
        buildingDef.AudioCategory       = "HollowMetal";
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
        SoundEventVolumeCache.instance.AddVolume("anim_interacts_compost_kanim", "Compost_shovel_in", NOISE_POLLUTION.NOISY.TIER2);
        SoundEventVolumeCache.instance.AddVolume("anim_interacts_compost_kanim", "Compost_shovel_out", NOISE_POLLUTION.NOISY.TIER2);
        return(buildingDef);
    }
コード例 #19
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 2,
                height: 2,
                anim: "gem_sculpture",
                hitpoints: BUILDINGS.HITPOINTS.TIER0,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER4,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER3,
                construction_materials: new string[] { "Gemstone" },
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.OnFloor,
                decor: new EffectorValues()
            {
                amount = 40,
                radius = 8
            },
                noise: NOISE_POLLUTION.NONE,
                0.2f);

            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.AudioCategory       = "Metal";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.ViewMode            = OverlayModes.Decor.ID;
            buildingDef.DefaultAnimState    = "slab";
            buildingDef.PermittedRotations  = PermittedRotations.FlipH;
            return(buildingDef);
        }
コード例 #20
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "GasVentHighPressure";
        int    width             = 1;
        int    height            = 1;
        string anim              = "ventgas_powered_kanim";
        int    hitpoints         = 30;
        float  construction_time = 30f;

        string[] construction_materials = new string[2]
        {
            "RefinedMetal",
            "Plastic"
        };
        EffectorValues nONE        = NOISE_POLLUTION.NONE;
        BuildingDef    buildingDef = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, new float[2]
        {
            BUILDINGS.CONSTRUCTION_MASS_KG.TIER3[0],
            BUILDINGS.CONSTRUCTION_MASS_KG.TIER1[0]
        }, construction_materials, 1600f, BuildLocationRule.Anywhere, BUILDINGS.DECOR.PENALTY.TIER1, nONE, 0.2f);

        buildingDef.InputConduitType    = ConduitType.Gas;
        buildingDef.Floodable           = false;
        buildingDef.Overheatable        = false;
        buildingDef.ViewMode            = OverlayModes.GasConduits.ID;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
        SoundEventVolumeCache.instance.AddVolume("ventgas_kanim", "GasVent_clunk", NOISE_POLLUTION.NOISY.TIER0);
        return(buildingDef);
    }
コード例 #21
0
        public override BuildingDef CreateBuildingDef()
        {
            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 3,
                height: 2,
                anim: "fossildisplay_kanim",
                hitpoints: BUILDINGS.HITPOINTS.TIER2,
                construction_time: BUILDINGS.CONSTRUCTION_TIME_SECONDS.TIER4,
                construction_mass: BUILDINGS.CONSTRUCTION_MASS_KG.TIER4,
                construction_materials: MATERIALS.TRANSPARENTS,
                melting_point: BUILDINGS.MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.OnFloor,
                decor: BUILDINGS.DECOR.BONUS.TIER2,
                noise: NOISE_POLLUTION.NONE
                );

            buildingDef.Floodable           = false;
            buildingDef.Overheatable        = false;
            buildingDef.AudioCategory       = "Glass";
            buildingDef.BaseTimeUntilRepair = -1f;
            buildingDef.ViewMode            = OverlayModes.Decor.ID;
            buildingDef.DefaultAnimState    = "slab";
            buildingDef.PermittedRotations  = PermittedRotations.FlipH;

            return(buildingDef);
        }
コード例 #22
0
        // Buildingdef from AlgaeDistillery example
        public override BuildingDef CreateBuildingDef()
        {
            string id                = "HeliumExtractor";
            int    width             = 3;
            int    height            = 4;
            string anim              = "algae_distillery_kanim";
            int    hitpoints         = 30;
            float  construction_time = 30f;

            float[]           tier                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER3;
            string[]          all_METALS          = MATERIALS.ALL_METALS;
            float             melting_point       = 800f;
            BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
            EffectorValues    tier2               = NOISE_POLLUTION.NOISY.TIER3;
            BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tier, all_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER2, tier2, 0.2f);

            buildingDef.RequiresPowerInput          = true;
            buildingDef.PowerInputOffset            = new CellOffset(1, 0);
            buildingDef.EnergyConsumptionWhenActive = 600f;
            buildingDef.SelfHeatKilowattsWhenActive = 12f;
            buildingDef.AudioCategory       = "HollowMetal";
            buildingDef.ViewMode            = OverlayModes.GasConduits.ID;
            buildingDef.InputConduitType    = ConduitType.Gas;
            buildingDef.OutputConduitType   = ConduitType.Gas;
            buildingDef.UtilityInputOffset  = new CellOffset(-1, 1);
            buildingDef.UtilityOutputOffset = new CellOffset(1, 0);
            buildingDef.ModifiesTemperature = false;
            return(buildingDef);
        }
コード例 #23
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "InverseElectrolyzer";
        int    width             = 4;
        int    height            = 3;
        string anim              = "waterpurifier_kanim";
        int    hitpoints         = 100;
        float  construction_time = 30f;

        float[]           tIER                = TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER3;
        string[]          aLL_METALS          = MATERIALS.ALL_METALS;
        float             melting_point       = 800f;
        BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
        EffectorValues    tIER2               = NOISE_POLLUTION.NOISY.TIER3;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, aLL_METALS, melting_point, build_location_rule, TUNING.BUILDINGS.DECOR.PENALTY.TIER2, tIER2, 0.2f);

        buildingDef.RequiresPowerInput          = true;
        buildingDef.EnergyConsumptionWhenActive = 120f;
        buildingDef.ExhaustKilowattsWhenActive  = 0f;
        buildingDef.SelfHeatKilowattsWhenActive = 4f;
        buildingDef.InputConduitType            = ConduitType.Gas;
        buildingDef.OutputConduitType           = ConduitType.Gas;
        buildingDef.ViewMode            = OverlayModes.GasConduits.ID;
        buildingDef.MaterialCategory    = MATERIALS.ALL_METALS;
        buildingDef.AudioCategory       = "HollowMetal";
        buildingDef.PowerInputOffset    = new CellOffset(2, 0);
        buildingDef.UtilityInputOffset  = new CellOffset(-1, 2);
        buildingDef.UtilityOutputOffset = new CellOffset(2, 2);
        buildingDef.PermittedRotations  = PermittedRotations.FlipH;
        return(buildingDef);
    }
コード例 #24
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "ShearingStation";
        int    width             = 3;
        int    height            = 3;
        string anim              = "shearing_station_kanim";
        int    hitpoints         = 100;
        float  construction_time = 10f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER4;
        string[]          rAW_MINERALS        = MATERIALS.RAW_MINERALS;
        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, rAW_MINERALS, melting_point, build_location_rule, BUILDINGS.DECOR.NONE, nONE, 0.2f);

        buildingDef.RequiresPowerInput          = true;
        buildingDef.EnergyConsumptionWhenActive = 60f;
        buildingDef.ExhaustKilowattsWhenActive  = 0.125f;
        buildingDef.SelfHeatKilowattsWhenActive = 0.5f;
        buildingDef.Floodable           = true;
        buildingDef.Entombable          = true;
        buildingDef.AudioCategory       = "Metal";
        buildingDef.AudioSize           = "large";
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.UtilityOutputOffset = new CellOffset(0, 0);
        buildingDef.DefaultAnimState    = "on";
        buildingDef.ShowInBuildMenu     = true;
        return(buildingDef);
    }
        public override BuildingDef CreateBuildingDef()
        {
            int    width             = 5;
            int    height            = 3;
            string anim              = "gasstorage_kanim";
            int    hitpoints         = 100;
            float  construction_time = HighFlowStorageConfig.Config.Gas5StorageConstructionTime;

            float[] mass = BUILDINGS.CONSTRUCTION_MASS_KG.TIER5;
            mass[0] = HighFlowStorageConfig.Config.Gas5StorageMetalCost;
            string[]          materials           = MATERIALS.ALL_METALS;
            float             melting_point       = 800f;
            BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
            EffectorValues    decor = BUILDINGS.DECOR.PENALTY.TIER1;
            EffectorValues    noise = NOISE_POLLUTION.NOISY.TIER0;
            float             temperature_modification_mass_scale = 0.2f;

            BuildingDef buildingDef = BuildingTemplates.CreateBuildingDef(ID, width, height, anim, hitpoints, construction_time, mass, materials, melting_point, build_location_rule, decor, noise, temperature_modification_mass_scale);

            buildingDef.Overheatable       = false;
            buildingDef.Floodable          = false;
            buildingDef.ViewMode           = OverlayModes.GasConduits.ID;
            buildingDef.AudioCategory      = "HollowMetal";
            buildingDef.PermittedRotations = PermittedRotations.FlipH;

            buildingDef.Deprecated = true;
            return(buildingDef);
        }
コード例 #26
0
        public override BuildingDef CreateBuildingDef()
        {
            int    width             = 1;
            int    height            = 1;
            string anim              = "gas_element_sensor_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    = true;
            buildingDef.ViewMode      = OverlayModes.Logic.ID;
            buildingDef.AudioCategory = "Metal";
            buildingDef.SceneLayer    = Grid.SceneLayer.Building;
            SoundEventVolumeCache.instance.AddVolume("switchliquidpressure_kanim", "PowerSwitch_on", NOISE_POLLUTION.NOISY.TIER3);
            SoundEventVolumeCache.instance.AddVolume("switchliquidpressure_kanim", "PowerSwitch_off", NOISE_POLLUTION.NOISY.TIER3);
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
            return(buildingDef);
        }
コード例 #27
0
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "OilRefinery";
        int    width             = 4;
        int    height            = 4;
        string anim              = "oilrefinery_kanim";
        int    hitpoints         = 30;
        float  construction_time = 30f;

        float[]           tIER                = BUILDINGS.CONSTRUCTION_MASS_KG.TIER3;
        string[]          aLL_METALS          = MATERIALS.ALL_METALS;
        float             melting_point       = 800f;
        BuildLocationRule build_location_rule = BuildLocationRule.OnFloor;
        EffectorValues    tIER2               = NOISE_POLLUTION.NOISY.TIER3;
        BuildingDef       buildingDef         = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, tIER, aLL_METALS, melting_point, build_location_rule, BUILDINGS.DECOR.PENALTY.TIER1, tIER2, 0.2f);

        buildingDef.RequiresPowerInput          = true;
        buildingDef.PowerInputOffset            = new CellOffset(1, 0);
        buildingDef.EnergyConsumptionWhenActive = 480f;
        buildingDef.ExhaustKilowattsWhenActive  = 2f;
        buildingDef.SelfHeatKilowattsWhenActive = 8f;
        buildingDef.PermittedRotations          = PermittedRotations.FlipH;
        buildingDef.ViewMode            = OverlayModes.LiquidConduits.ID;
        buildingDef.AudioCategory       = "HollowMetal";
        buildingDef.InputConduitType    = ConduitType.Liquid;
        buildingDef.UtilityInputOffset  = new CellOffset(0, 0);
        buildingDef.OutputConduitType   = ConduitType.Liquid;
        buildingDef.UtilityOutputOffset = new CellOffset(1, 1);
        return(buildingDef);
    }
コード例 #28
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);
        }
コード例 #29
0
        public override BuildingDef CreateBuildingDef()
        {
            var buildingDef = BuildingTemplates.CreateBuildingDef(
                id: Id,
                width: 2,
                height: 2,
                anim: "liquidsplitter_a_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.Liquid;
            buildingDef.OutputConduitType   = ConduitType.Liquid;
            buildingDef.Floodable           = false;
            buildingDef.Entombable          = false;
            buildingDef.Overheatable        = 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);
        }
    public override BuildingDef CreateBuildingDef()
    {
        string id                = "CommandModule";
        int    width             = 5;
        int    height            = 5;
        string anim              = "rocket_command_module_kanim";
        int    hitpoints         = 1000;
        float  construction_time = 60f;

        float[]  cOMMAND_MODULE_MASS    = TUNING.BUILDINGS.ROCKETRY_MASS_KG.COMMAND_MODULE_MASS;
        string[] construction_materials = new string[1]
        {
            (-899253461).ToString()
        };
        float             melting_point       = 9999f;
        BuildLocationRule build_location_rule = BuildLocationRule.BuildingAttachPoint;
        EffectorValues    tIER        = NOISE_POLLUTION.NOISY.TIER2;
        BuildingDef       buildingDef = BuildingTemplates.CreateBuildingDef(id, width, height, anim, hitpoints, construction_time, cOMMAND_MODULE_MASS, construction_materials, melting_point, build_location_rule, TUNING.BUILDINGS.DECOR.NONE, tIER, 0.2f);

        BuildingTemplates.CreateRocketBuildingDef(buildingDef);
        buildingDef.SceneLayer          = Grid.SceneLayer.BuildingFront;
        buildingDef.OverheatTemperature = 2273.15f;
        buildingDef.Floodable           = false;
        buildingDef.AttachmentSlotTag   = GameTags.Rocket;
        buildingDef.ObjectLayer         = ObjectLayer.Building;
        buildingDef.RequiresPowerInput  = false;
        buildingDef.attachablePosition  = new CellOffset(0, 0);
        buildingDef.CanMove             = true;
        return(buildingDef);
    }