Ejemplo n.º 1
0
        public override BuildingDef CreateBuildingDef()
        {
            var def = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 1,
                height: 1,
                anim: "heavywatttile_kanim", // TODO
                hitpoints: HITPOINTS.TIER2,
                construction_time: CONSTRUCTION_TIME_SECONDS.TIER1,
                construction_mass: CONSTRUCTION_MASS_KG.TIER3,
                construction_materials: REFINED_METALS,
                melting_point: MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.HighWattBridgeTile, // TODO perhaps our own build rule?
                decor: DECOR.PENALTY.TIER2,
                noise: TUNING.NOISE_POLLUTION.NONE
                );

            def.Overheatable        = false;
            def.Floodable           = false;
            def.Entombable          = false;
            def.ViewMode            = OverlayModes.Logic.ID;
            def.AudioCategory       = TUNING.AUDIO.METAL;
            def.AudioSize           = "small"; // constant?
            def.BaseTimeUntilRepair = -1f;
            def.PermittedRotations  = PermittedRotations.R360;
            def.UtilityInputOffset  = new CellOffset(0, 0);
            def.UtilityOutputOffset = new CellOffset(0, 2);
            def.ObjectLayer         = ObjectLayer.Building;
            def.SceneLayer          = Grid.SceneLayer.LogicGates;
            def.ForegroundLayer     = Grid.SceneLayer.TileMain;
            def.AlwaysOperational   = true;
            def.LogicInputPorts     = new List <LogicPorts.Port>()
            {
                LogicCableConfig.CableInputPort(
                    PORT_IO_ID,
                    new CellOffset(-1, 0),
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_ACTIVE,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_INACTIVE,
                    false, false),
                LogicCableConfig.CableInputPort(
                    PORT_IO_ID,
                    new CellOffset(1, 0),
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_ACTIVE,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_INACTIVE,
                    false, false)
            };
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
            return(def);
        }
Ejemplo n.º 2
0
        public override BuildingDef CreateBuildingDef()
        {
            var def = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 2,
                height: 1,
                anim: "logic_ribbon_writer_kanim", // TODO
                hitpoints: HITPOINTS.TIER1,
                construction_time: CONSTRUCTION_TIME_SECONDS.TIER2,
                construction_mass: PipLib.PLUtil.ArrayConcat(CONSTRUCTION_MASS_KG.TIER3, CONSTRUCTION_MASS_KG.TIER1),
                construction_materials: PipLib.PLUtil.ArrayConcat(REFINED_METALS, PLASTICS),
                melting_point: MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.NotInTiles,
                decor: TUNING.DECOR.PENALTY.TIER2,
                noise: TUNING.NOISE_POLLUTION.NOISY.TIER1
                );

            def.Overheatable       = false;
            def.Floodable          = false;
            def.Entombable         = false;
            def.PermittedRotations = PermittedRotations.R360;
            def.ViewMode           = OverlayModes.Logic.ID;
            def.AudioCategory      = TUNING.AUDIO.METAL;
            def.ObjectLayer        = ObjectLayer.LogicGate;
            def.SceneLayer         = Grid.SceneLayer.LogicGates;
            def.AlwaysOperational  = true;
            def.LogicInputPorts    = new List <LogicPorts.Port>()
            {
                LogicPorts.Port.RibbonInputPort(
                    LogicCableIO.PORT_INPUT_WRITER_ID,
                    new CellOffset(0, 0),
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_ACTIVE,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_INACTIVE,
                    false, false),
            };
            def.LogicOutputPorts = new List <LogicPorts.Port>()
            {
                LogicCableConfig.CableOutputPort(
                    LogicCableIO.PORT_OUTPUT_WRITER_ID,
                    new CellOffset(1, 0),
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_ACTIVE,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_INACTIVE,
                    false, false)
            };
            GeneratedBuildings.RegisterWithOverlay(OverlayModes.Logic.HighlightItemIDs, ID);
            return(def);
        }
        public override BuildingDef CreateBuildingDef()
        {
            var def = BuildingTemplates.CreateBuildingDef(
                id: ID,
                width: 1,
                height: 1,
                anim: "switchdupecontrolledpower_kanim", // TODO
                hitpoints: HITPOINTS.TIER1,
                construction_time: CONSTRUCTION_TIME_SECONDS.TIER2,
                construction_mass: CONSTRUCTION_MASS_KG.TIER2,
                construction_materials: REFINED_METALS,
                melting_point: MELTING_POINT_KELVIN.TIER1,
                build_location_rule: BuildLocationRule.NotInTiles,
                decor: TUNING.DECOR.PENALTY.TIER2,
                noise: TUNING.NOISE_POLLUTION.NONE
                );

            def.Overheatable       = false;
            def.Floodable          = false;
            def.Entombable         = false;
            def.PermittedRotations = PermittedRotations.Unrotatable;
            def.ViewMode           = OverlayModes.Logic.ID;
            def.AudioCategory      = TUNING.AUDIO.METAL;
            def.ObjectLayer        = ObjectLayer.LogicGate;
            def.SceneLayer         = Grid.SceneLayer.LogicGates;
            def.AlwaysOperational  = true;
            def.LogicOutputPorts   = new List <LogicPorts.Port>()
            {
                LogicCableConfig.CableOutputPort(
                    LogicCableIO.PORT_OUTPUT_WRITER_ID,
                    new CellOffset(0, 0),
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_ACTIVE,
                    STRINGS.BUILDINGS.PREFABS.LOGICRIBBONBRIDGE.LOGIC_PORT_INACTIVE,
                    false, false)
            };
            return(def);
        }