diff --git a/Resources/Locale/en-US/entities/barricades.ftl b/Resources/Locale/en-US/entities/barricades.ftl new file mode 100644 index 0000000000..ebfab4436c --- /dev/null +++ b/Resources/Locale/en-US/entities/barricades.ftl @@ -0,0 +1,5 @@ +### Barricades entity prototype data. + +ent-barricade = wooden barricade + .desc = The poor man's barrier, not nearly as strong or cool looking. + diff --git a/Resources/Locale/en-US/entities/solar_panels.ftl b/Resources/Locale/en-US/entities/solar_panels.ftl new file mode 100644 index 0000000000..cb583d813a --- /dev/null +++ b/Resources/Locale/en-US/entities/solar_panels.ftl @@ -0,0 +1,15 @@ +### Power entity prototype data. + + +###Solars +ent-solar-tracker = solar tracker + .desc = A solar tracker. Can be wired to a solar array and computer to track solar positions. +ent-solar-assembly = solar assembly + .desc = A solar assembly. Anchor to a wire to start building a solar panel. +ent-solar-panel = solar panel + .desc = Generates power from sunlight. Usually used to power replacements for sunlight. Fragile. + +ent-solar-tracker-electronics = solar tracker electronics + .desc = An electronics board for making a solar tracker. +ent-solar-assembly-part = solar assembly parts + .desc = Used in the construction of solar assemblies for solar panels and trackers. \ No newline at end of file diff --git a/Resources/Prototypes/Catalog/Cargo/cargo_engines.yml b/Resources/Prototypes/Catalog/Cargo/cargo_engines.yml index 22c5055115..b5db133182 100644 --- a/Resources/Prototypes/Catalog/Cargo/cargo_engines.yml +++ b/Resources/Prototypes/Catalog/Cargo/cargo_engines.yml @@ -93,3 +93,15 @@ cost: 10000 category: Engineering group: market + +- type: cargoProduct + name: "solar assembly parts" + id: cargo.enginessolar + description: "Parts for constructing solar panels and trackers." + icon: + sprite: Objects/Power/solar_parts.rsi + state: solar_assembly_parts + product: CrateEngineeringSolar + cost: 500 + category: Engineering + group: market diff --git a/Resources/Prototypes/Catalog/Fills/Storage/Crates/engines.yml b/Resources/Prototypes/Catalog/Fills/Storage/Crates/engines.yml index 06b1f294ab..bc931598a0 100644 --- a/Resources/Prototypes/Catalog/Fills/Storage/Crates/engines.yml +++ b/Resources/Prototypes/Catalog/Fills/Storage/Crates/engines.yml @@ -126,3 +126,13 @@ contents: - name: DebugGenerator amount: 1 + +- type: entity + id: CrateEngineeringSolar + name: solar assembly crate + parent: CrateEngineering + components: + - type: StorageFill + contents: + - name: SolarAssemblyPart + amount: 6 diff --git a/Resources/Prototypes/Entities/Constructible/Power/cargo_console.yml b/Resources/Prototypes/Entities/Constructible/Power/cargo_console.yml index 4cc74bbd03..c34bea117d 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/cargo_console.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/cargo_console.yml @@ -37,6 +37,7 @@ - cargo.engineameshielding - cargo.engineamejar - cargo.engineamecontrol + - cargo.enginessolar - cargo.funplushies - cargo.funartsupplies - cargo.funinstruments diff --git a/Resources/Prototypes/Entities/Constructible/Power/power_base.yml b/Resources/Prototypes/Entities/Constructible/Power/power_base.yml index 70703b996c..2de01f995c 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/power_base.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/power_base.yml @@ -1,6 +1,6 @@ - type: entity id: BaseGenerator - description: A high efficiency thermoelectric generator. + description: "A high efficiency thermoelectric generator." name: Base Generator abstract: true placement: @@ -45,7 +45,7 @@ - type: entity id: BaseSmes - description: A high-capacity superconducting magnetic energy storage (SMES) unit. + description: "A high-capacity superconducting magnetic energy storage (SMES) unit." name: Base Smes abstract: true placement: @@ -104,7 +104,7 @@ - type: entity id: BaseSubstation - description: Reduces the voltage of electricity put into it. + description: "Reduces the voltage of electricity put into it." name: Base Substation abstract: true placement: @@ -164,7 +164,7 @@ - type: entity id: BaseApc - description: A control terminal for the area's electrical systems. + description: "A control terminal for the area's electrical systems." name: Base Apc abstract: true placement: @@ -222,16 +222,14 @@ - type: entity id: SolarPanel - name: solar panel - description: Generates power from sunlight. Usually used to power replacements for sunlight. Fragile. placement: mode: SnapgridCenter components: - type: Clickable - type: InteractionOutline - type: Physics - mass: 25 - bodyType: Dynamic + mass: 100 + bodyType: Static fixtures: - shape: !type:PhysShapeAabb {} @@ -273,3 +271,90 @@ - type: ClientEntitySpawner prototypes: - HVDummyWire + - type: Construction + graph: solarpanel + node: solarpanel + +- type: entity + id: SolarAssembly + name: solar assembly + description: "A solar assembly. Anchor to a wire to start building a solar panel." + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + mass: 75 + bodyType: Static + fixtures: + - shape: + !type:PhysShapeAabb {} + mask: + - VaultImpassable + layer: + - VaultImpassable + - type: Sprite + sprite: Constructible/Power/solar_panel.rsi + state: solar_assembly + - type: SnapGrid + offset: Center + - type: Damageable + resistances: metallicResistances + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: ["Breakage"] + - type: Anchorable + - type: Pullable + - type: Construction + graph: solarpanel + node: solarassembly + +- type: entity + id: SolarTracker + placement: + mode: SnapgridCenter + components: + - type: Clickable + - type: InteractionOutline + - type: Physics + mass: 100 + bodyType: Static + fixtures: + - shape: + !type:PhysShapeAabb {} + mask: + - Impassable + - MobImpassable + - VaultImpassable + - SmallImpassable + layer: + - Opaque + - MobImpassable + - VaultImpassable + - SmallImpassable + - type: Sprite + sprite: Constructible/Power/solar_panel.rsi + state: solar_tracker + - type: SnapGrid + offset: Center + - type: Damageable + resistances: metallicResistances + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: ["Breakage"] + - type: Anchorable + - type: Pullable + - type: Construction + graph: solarpanel + node: solartracker diff --git a/Resources/Prototypes/Entities/Constructible/Specific/barricades.yml b/Resources/Prototypes/Entities/Constructible/Specific/barricades.yml new file mode 100644 index 0000000000..a2fe7fa1a0 --- /dev/null +++ b/Resources/Prototypes/Entities/Constructible/Specific/barricades.yml @@ -0,0 +1,57 @@ +- type: entity + id: Barricade + components: + - type: Clickable + - type: InteractionOutline + - type: Construction + graph: barricade + node: barricadewooden + - type: Sprite + sprite: Constructible/Structures/barricades.rsi + state: barricadewooden + - type: Physics + mass: 75 + bodyType: Static + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "-0.5, -0.5, 0.5, 0.5" + layer: + - Opaque + - Impassable + - MobImpassable + - VaultImpassable + - SmallImpassable + - type: Tag + tags: + - ExplosivePassable + - type: Damageable + resistances: metallicResistances + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 50 + behaviors: + - !type:SpawnEntitiesBehavior + spawn: + MaterialWoodPlank1: + min: 3 + max: 3 + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: AtmosExposed + - type: Flammable + fireSpread: true + - type: Appearance + visuals: + - type: FireVisualizer + sprite: Effects/fire.rsi + normalState: 1 + Sprite: + drawdepth: Overlays + - type: SnapGrid + offset: Edge + placement: + snap: + - Wall diff --git a/Resources/Prototypes/Entities/Objects/Power/solar_parts.yml b/Resources/Prototypes/Entities/Objects/Power/solar_parts.yml new file mode 100644 index 0000000000..5d148ce017 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Power/solar_parts.yml @@ -0,0 +1,17 @@ +- type: entity + id: SolarAssemblyPart + parent: BaseItem + components: + - type: Item + size: 10 + - type: Sprite + sprite: Objects/Power/solar_parts.rsi + state: solar_assembly_parts + +- type: entity + id: SolarTrackerElectronics + parent: BaseItem + components: + - type: Sprite + sprite: Constructible/Misc/module.rsi + state: generic \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/barricades.yml b/Resources/Prototypes/Recipes/Construction/Graphs/barricades.yml new file mode 100644 index 0000000000..0743717e92 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/barricades.yml @@ -0,0 +1,27 @@ +- type: constructionGraph + id: barricade + start: start + graph: + - node: start + edges: + - to: barricadewooden + steps: + - material: WoodPlank + amount: 5 + doAfter: 3 + + - node: barricadewooden + entity: Barricade + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 4 #returns 1 less as one breaks + - !type:DeleteEntity {} + conditions: + - !type:EntityAnchored + anchored: true + steps: + - tool: Prying + doAfter: 5 \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/solarpanel.yml b/Resources/Prototypes/Recipes/Construction/Graphs/solarpanel.yml new file mode 100644 index 0000000000..29d61a6358 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/solarpanel.yml @@ -0,0 +1,88 @@ +- type: constructionGraph + id: solarpanel + start: start + graph: + - node: start + edges: + - to: solarassembly + steps: + - prototype: SolarAssemblyPart + name: Solar Assembly Parts + icon: + sprite: Objects/Power/solar_parts.rsi + state: solar_assembly_parts + doAfter: 1 + + - node: solarassembly + entity: SolarAssembly + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: SolarAssemblyPart + amount: 1 + - !type:DeleteEntity {} + steps: + - tool: Screwing + doAfter: 2 + - to: solarpanel + conditions: + - !type:EntityAnchored + value: true + steps: + - material: Glass + amount: 2 + doAfter: 0.5 + completed: + - !type:SnapToGrid + offset: Center + - to: solartracker + conditions: + - !type:EntityAnchored + value: true + steps: + - prototype: SolarTrackerElectronics + name: Solar Tracker Electronics + icon: + sprite: Constructible/Misc/module.rsi + state: id_mod + doAfter: 1 + - material: Glass + amount: 2 + doAfter: 2 + completed: + - !type:SnapToGrid + offset: Center + + - node: solarpanel + entity: SolarPanel + edges: + - to: solarassembly + completed: + - !type:SpawnPrototype + prototype: SheetGlass1 + amount: 2 + conditions: + - !type:EntityAnchored + anchored: true + steps: + - tool: Prying + doAfter: 0.5 + + - node: solartracker + entity: SolarTracker + edges: + - to: solarassembly + completed: + - !type:SpawnPrototype + prototype: SheetGlass1 + amount: 2 + - !type:SpawnPrototype + prototype: SolarTrackerElectronics + amount: 1 + conditions: + - !type:EntityAnchored + anchored: true + steps: + - tool: Prying + doAfter: 1 diff --git a/Resources/Prototypes/Recipes/Construction/power.yml b/Resources/Prototypes/Recipes/Construction/power.yml new file mode 100644 index 0000000000..4375e042be --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/power.yml @@ -0,0 +1,31 @@ +- type: construction + name: APC + id: apc + graph: apc + startNode: start + targetNode: apc + category: Utility + description: "Area Power Controller (APC). Controls power. In an area." + icon: + sprite: Constructible/Power/apc.rsi + state: apc0 + objectType: Structure + placementMode: AlignWallProper + canBuildInImpassable: true + +- type: construction + name: Solar Assembly + id: SolarPanel + graph: solarpanel + startNode: start + targetNode: solarpanel + category: Utility + description: "Can be turned into a solar panel or solar tracker." + icon: + sprite: Constructible/Power/solar_panel.rsi + state: solar_assembly + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked {} \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index 9850da038d..f3adfd4023 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -198,16 +198,18 @@ canBuildInImpassable: false - type: construction - name: APC - id: apc - graph: apc + name: Wooden Barricade + id: Barricade + graph: barricade startNode: start - targetNode: apc + targetNode: barricadewooden category: Structures - description: Area Power Controller (APC). Controls power. In an area. + description: An improvised barricade made out of wooden planks. icon: - sprite: Constructible/Power/apc.rsi - state: apc0 + sprite: Constructible/Structures/barricades.rsi + state: barricadewooden objectType: Structure placementMode: SnapgridCenter - canBuildInImpassable: true + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked {} diff --git a/Resources/Textures/Constructible/Power/solar_panel.rsi/meta.json b/Resources/Textures/Constructible/Power/solar_panel.rsi/meta.json index 377fa6ccb7..49c9b279ad 100644 --- a/Resources/Textures/Constructible/Power/solar_panel.rsi/meta.json +++ b/Resources/Textures/Constructible/Power/solar_panel.rsi/meta.json @@ -1 +1 @@ -{"version":1,"license":"CC-BY-SA-3.0","copyright":"Taken from https://github.com/discordia-space/CEV-Eris/blob/d1e0161af146835f4fb79d21a6200caa9cc842d0/icons/obj/power.dmi and modified.","size":{"x":32,"y":32},"states":[{"name":"normal","select":[],"flags":{},"directions":8},{"name":"broken","select":[],"flags":{},"directions":1}]} +{"version":1,"license":"CC-BY-SA-3.0","copyright":"Taken from https://github.com/discordia-space/CEV-Eris/blob/d1e0161af146835f4fb79d21a6200caa9cc842d0/icons/obj/power.dmi and modified.","size":{"x":32,"y":32},"states":[{"name":"normal","select":[],"flags":{},"directions":8},{"name":"broken","select":[],"flags":{},"directions":1},{"name": "solar_assembly"},{"name": "solar_tracker"}]} diff --git a/Resources/Textures/Constructible/Power/solar_panel.rsi/solar_assembly.png b/Resources/Textures/Constructible/Power/solar_panel.rsi/solar_assembly.png new file mode 100644 index 0000000000..6714f199e4 Binary files /dev/null and b/Resources/Textures/Constructible/Power/solar_panel.rsi/solar_assembly.png differ diff --git a/Resources/Textures/Constructible/Power/solar_panel.rsi/solar_tracker.png b/Resources/Textures/Constructible/Power/solar_panel.rsi/solar_tracker.png new file mode 100644 index 0000000000..17abc02d28 Binary files /dev/null and b/Resources/Textures/Constructible/Power/solar_panel.rsi/solar_tracker.png differ diff --git a/Resources/Textures/Constructible/Structures/barricades.rsi/barricadewooden.png b/Resources/Textures/Constructible/Structures/barricades.rsi/barricadewooden.png new file mode 100644 index 0000000000..c65024c634 Binary files /dev/null and b/Resources/Textures/Constructible/Structures/barricades.rsi/barricadewooden.png differ diff --git a/Resources/Textures/Constructible/Structures/barricades.rsi/meta.json b/Resources/Textures/Constructible/Structures/barricades.rsi/meta.json new file mode 100644 index 0000000000..5d7869fa19 --- /dev/null +++ b/Resources/Textures/Constructible/Structures/barricades.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/e09101cb4be860ff02e035b18bef93a08b9c204c", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "barricadewooden" + } + ] +} diff --git a/Resources/Textures/Objects/Power/solar_parts.rsi/meta.json b/Resources/Textures/Objects/Power/solar_parts.rsi/meta.json new file mode 100644 index 0000000000..f88449d89d --- /dev/null +++ b/Resources/Textures/Objects/Power/solar_parts.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://tgstation13.org/wiki/Guide_to_construction#Solar_Panels_and_Trackers and modified.", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "solar_assembly_parts" + } + ] +} diff --git a/Resources/Textures/Objects/Power/solar_parts.rsi/solar_assembly_parts.png b/Resources/Textures/Objects/Power/solar_parts.rsi/solar_assembly_parts.png new file mode 100644 index 0000000000..aaf291cb2f Binary files /dev/null and b/Resources/Textures/Objects/Power/solar_parts.rsi/solar_assembly_parts.png differ