From 0e93dba20bd74178883ee9d6f2f03e8691cee64d Mon Sep 17 00:00:00 2001 From: Peptide90 <78795277+Peptide90@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:24:02 +0100 Subject: [PATCH] Crafting for spike rack, signal switches and buttons. (#7420) Co-authored-by: metalgearsloth --- .../Entities/Structures/Wallmounts/switch.yml | 49 ++++----- .../Entities/Structures/meat_spike.yml | 3 + .../Graphs/furniture/meatspike.yml | 28 ++++++ .../Graphs/machines/switching.yml | 99 +++++++++++++++++++ .../Graphs/structures/conveyor.yml | 28 +----- .../Graphs/structures/lighting.yml | 27 +---- .../Recipes/Construction/furniture.yml | 17 ++++ .../Recipes/Construction/machines.yml | 71 +++++++++++++ .../Recipes/Construction/structures.yml | 35 ------- 9 files changed, 247 insertions(+), 110 deletions(-) create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/furniture/meatspike.yml create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml index fa6bae78e3..8520d28fc4 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml @@ -1,7 +1,11 @@ - type: entity id: SignalSwitch - name: "signal switch" - description: "Its a switch for toggling power to things." + name: signal switch + description: It's a switch for toggling power to things. + placement: + mode: SnapgridCenter + snap: + - Wallmount components: - type: WallMount arc: 360 @@ -15,15 +19,18 @@ - type: UseDelay delay: 0.5 # prevent light-toggling auto-clickers. - type: Rotatable + - type: Construction + graph: SignalSwitchGraph + node: SignalSwitchNode + +- type: entity + id: SignalButton + name: signal button + description: It's a button for activating something. placement: mode: SnapgridCenter snap: - Wallmount - -- type: entity - id: SignalButton - name: "signal button" - description: "It's a button for activating something." components: - type: WallMount arc: 360 @@ -37,15 +44,18 @@ - type: UseDelay delay: 0.5 # prevent light-toggling auto-clickers. - type: Rotatable - placement: - mode: SnapgridCenter - snap: - - Wallmount + - type: Construction + graph: SignalButtonGraph + node: SignalButtonNode - type: entity id: ApcNetSwitch name: apc net switch description: Its a switch for toggling lights that are connected to the same apc. + placement: + mode: SnapgridCenter + snap: + - Wallmount components: - type: WallMount arc: 360 @@ -58,19 +68,15 @@ sprite: Structures/Wallmounts/switch.rsi state: on - type: Rotatable - - type: Construction - graph: LightSwitch - node: lightSwitch - type: ExtensionCableReceiver - type: DeviceNetwork deviceNetId: Apc transmitFrequencyId: SmartLight # assuming people want to use it for light switches. - type: ApcNetworkConnection - type: ApcNetSwitch - placement: - mode: SnapgridCenter - snap: - - Wallmount + - type: Construction + graph: LightSwitchGraph + node: LightSwitchNode - type: entity id: TwoWayLever @@ -94,9 +100,6 @@ state_forward: switch-fwd state_off: switch-off state_reversed: switch-rev - - type: Construction - graph: LeverGraph - node: lever - type: Damageable damageContainer: Inorganic damageModifierSet: Metallic @@ -108,4 +111,6 @@ behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] - + - type: Construction + graph: LeverGraph + node: LeverNode diff --git a/Resources/Prototypes/Entities/Structures/meat_spike.yml b/Resources/Prototypes/Entities/Structures/meat_spike.yml index a0162d2dbf..5bb3b3dfdc 100644 --- a/Resources/Prototypes/Entities/Structures/meat_spike.yml +++ b/Resources/Prototypes/Entities/Structures/meat_spike.yml @@ -42,3 +42,6 @@ states: enum.KitchenSpikeStatus.Empty: spike enum.KitchenSpikeStatus.Bloody: spikebloody + - type: Construction + graph: MeatSpike + node: MeatSpike diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/meatspike.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/meatspike.yml new file mode 100644 index 0000000000..6356e132d0 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/meatspike.yml @@ -0,0 +1,28 @@ +- type: constructionGraph + id: MeatSpike + start: start + graph: + - node: start + edges: + - to: MeatSpike + completed: + - !type:SnapToGrid + southRotation: true + steps: + - material: Steel + amount: 15 + doAfter: 10 + - node: MeatSpike + entity: KitchenSpike + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 15 + conditions: + - !type:EntityAnchored + anchored: false + steps: + - tool: Welding + doAfter: 10 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml b/Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml new file mode 100644 index 0000000000..c75f329b8b --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml @@ -0,0 +1,99 @@ +# Levers +- type: constructionGraph + id: LeverGraph + start: start + graph: + - node: start + actions: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 2 + - !type:DeleteEntity {} + edges: + - to: LeverNode + completed: + - !type:SnapToGrid {} + steps: + - material: Steel + amount: 2 + doAfter: 1 + - node: LeverNode + entity: TwoWayLever + edges: + - to: start + steps: + - tool: Anchoring + doAfter: 1 + +# Switches +- type: constructionGraph + id: LightSwitchGraph + start: start + graph: + - node: start + edges: + - to: LightSwitchNode + steps: + - material: Steel + amount: 1 + doAfter: 2.0 + - node: LightSwitchNode + entity: ApcNetSwitch + edges: + - to: start + steps: + - tool: Screwing + doAfter: 2.0 + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 1 + - !type:DeleteEntity {} + +- type: constructionGraph + id: SignalSwitchGraph + start: start + graph: + - node: start + edges: + - to: SignalSwitchNode + steps: + - material: Steel + amount: 1 + doAfter: 2.0 + - node: SignalSwitchNode + entity: SignalSwitch + edges: + - to: start + steps: + - tool: Screwing + doAfter: 2.0 + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 1 + - !type:DeleteEntity {} + +- type: constructionGraph + id: SignalButtonGraph + start: start + graph: + - node: start + edges: + - to: SignalButtonNode + steps: + - material: Steel + amount: 1 + doAfter: 2.0 + - node: SignalButtonNode + entity: SignalButton + edges: + - to: start + steps: + - tool: Screwing + doAfter: 2.0 + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 1 + - !type:DeleteEntity {} \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/conveyor.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/conveyor.yml index 3a9b986c93..57da56076e 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/conveyor.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/conveyor.yml @@ -28,30 +28,4 @@ - to: item steps: - tool: Prying - doAfter: 3 - -- type: constructionGraph - id: LeverGraph - start: start - graph: - - node: start - actions: - - !type:SpawnPrototype - prototype: SheetSteel1 - amount: 2 - - !type:DeleteEntity {} - edges: - - to: lever - completed: - - !type:SnapToGrid {} - steps: - - material: Steel - amount: 2 - doAfter: 1 - - node: lever - entity: TwoWayLever - edges: - - to: start - steps: - - tool: Anchoring - doAfter: 1 + doAfter: 3 \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml index 583a189960..111d8ebcd7 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/lighting.yml @@ -63,29 +63,4 @@ - !type:SpawnPrototype prototype: SheetSteel1 amount: 5 - - !type:DeleteEntity {} - - -- type: constructionGraph - id: LightSwitch - start: start - graph: - - node: start - edges: - - to: lightSwitch - steps: - - material: Steel - amount: 1 - doAfter: 2.0 - - node: lightSwitch - entity: ApcNetSwitch - edges: - - to: start - steps: - - tool: Screwing - doAfter: 2.0 - completed: - - !type:SpawnPrototype - prototype: SheetSteel1 - amount: 1 - - !type:DeleteEntity {} + - !type:DeleteEntity {} \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/furniture.yml b/Resources/Prototypes/Recipes/Construction/furniture.yml index a2d91da64f..f4398fdd07 100644 --- a/Resources/Prototypes/Recipes/Construction/furniture.yml +++ b/Resources/Prototypes/Recipes/Construction/furniture.yml @@ -359,3 +359,20 @@ canBuildInImpassable: false conditions: - !type:TileNotBlocked + +- type: construction + id: MeatSpike + name: meat spike + description: A spike found in kitchens butchering animals. + graph: MeatSpike + startNode: start + targetNode: MeatSpike + category: Furniture + icon: + sprite: Structures/meat_spike.rsi + state: spike + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked diff --git a/Resources/Prototypes/Recipes/Construction/machines.yml b/Resources/Prototypes/Recipes/Construction/machines.yml index 51c697d110..fc32c3e0d6 100644 --- a/Resources/Prototypes/Recipes/Construction/machines.yml +++ b/Resources/Prototypes/Recipes/Construction/machines.yml @@ -23,3 +23,74 @@ icon: sprite: Structures/Machines/parts.rsi state: "box_0" + +# Switching +- type: construction + name: two-way lever + id: TwoWayLeverRecipe + graph: LeverGraph + startNode: start + targetNode: LeverNode + category: Machines + description: A lever to control machines. It has 3 modes. + objectType: Structure + canBuildInImpassable: false + icon: + sprite: Structures/conveyor.rsi + state: switch-off + conditions: + - !type:TileNotBlocked + +- type: construction + name: light switch + id: LightSwitchRecipe + graph: LightSwitchGraph + startNode: start + targetNode: LightSwitchNode + category: Machines + description: A switch for toggling lights that are connected to the same apc. + icon: + sprite: Structures/Wallmounts/switch.rsi + state: on + objectType: Structure + placementMode: SnapgridCenter + canRotate: true + canBuildInImpassable: true + conditions: + - !type:WallmountCondition + +- type: construction + name: signal switch + id: SignalSwitchRecipe + graph: SignalSwitchGraph + startNode: start + targetNode: SignalSwitchNode + category: Machines + description: It's a switch for toggling power to things. + icon: + sprite: Structures/Wallmounts/switch.rsi + state: on + objectType: Structure + placementMode: SnapgridCenter + canRotate: true + canBuildInImpassable: true + conditions: + - !type:WallmountCondition + +- type: construction + name: signal button + id: SignalButtonRecipe + graph: SignalButtonGraph + startNode: start + targetNode: SignalButtonNode + category: Machines + description: It's a button for activating something. + icon: + sprite: Structures/Wallmounts/switch.rsi + state: on + objectType: Structure + placementMode: SnapgridCenter + canRotate: true + canBuildInImpassable: true + conditions: + - !type:WallmountCondition \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index add03bb298..24da3a14a2 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -469,25 +469,6 @@ conditions: - !type:TileNotBlocked -- type: construction - name: light switch - id: LightSwitchRecipe - graph: LightSwitch - startNode: start - targetNode: lightSwitch - category: Structures - description: A switch for toggling lights that are connected to the same apc. - icon: - sprite: Structures/Wallmounts/switch.rsi - state: on - objectType: Structure - placementMode: SnapgridCenter - canRotate: true - canBuildInImpassable: true - conditions: - - !type:WallmountCondition - - #conveyor - type: construction name: conveyor belt @@ -506,22 +487,6 @@ conditions: - !type:TileNotBlocked -- type: construction - name: two-way lever - id: TwoWayLever - graph: LeverGraph - startNode: start - targetNode: lever - category: Structures - description: A lever to control machines. It has 3 modes. - objectType: Structure - canBuildInImpassable: false - icon: - sprite: Structures/conveyor.rsi - state: switch-off - conditions: - - !type:TileNotBlocked - - type: construction name: metal door id: MetalDoor