From ab3106f18b95cca605946fdebfa988990285017d Mon Sep 17 00:00:00 2001 From: Velcroboy <107660393+ChilbroBaggins@users.noreply.github.com> Date: Tue, 15 Aug 2023 18:01:50 -0500 Subject: [PATCH] Adds Directional Switches (#19175) * Adds directional switches * Revert unintended line deletion * Consistent recipes --------- Co-authored-by: Jeff --- .../Entities/Structures/Wallmounts/switch.yml | 44 +++++++ .../Graphs/machines/switching.yml | 111 +++++++++++++++++- .../Recipes/Construction/machines.yml | 54 +++++++++ 3 files changed, 207 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml index a30c80fb22..ac8379cb9a 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml @@ -175,3 +175,47 @@ - Left - Right - Middle + +#directional + +- type: entity + id: SignalSwitchDirectional + name: signal switch + suffix: directional + parent: SignalSwitch + components: + - type: WallMount + arc: 180 + - type: Sprite + offset: 0,-0.25 + - type: Construction + graph: SignalSwitchDirectionalGraph + node: SignalSwitchDirectionalNode + +- type: entity + id: SignalButtonDirectional + name: signal button + suffix: directional + parent: SignalButton + components: + - type: WallMount + arc: 180 + - type: Sprite + offset: 0,-0.25 + - type: Construction + graph: SignalButtonDirectionalGraph + node: SignalButtonDirectionalNode + +- type: entity + id: ApcNetSwitchDirectional + name: apc net switch + suffix: directional + parent: ApcNetSwitch + components: + - type: WallMount + arc: 180 + - type: Sprite + offset: 0,-0.25 + - type: Construction + graph: LightSwitchDirectionalGraph + node: LightSwitchDirectionalNode diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml b/Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml index c75f329b8b..b39229f39a 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/machines/switching.yml @@ -8,6 +8,9 @@ - !type:SpawnPrototype prototype: SheetSteel1 amount: 2 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 - !type:DeleteEntity {} edges: - to: LeverNode @@ -17,6 +20,8 @@ - material: Steel amount: 2 doAfter: 1 + - material: Cable + amount: 1 - node: LeverNode entity: TwoWayLever edges: @@ -37,6 +42,8 @@ - material: Steel amount: 1 doAfter: 2.0 + - material: Cable + amount: 1 - node: LightSwitchNode entity: ApcNetSwitch edges: @@ -48,6 +55,9 @@ - !type:SpawnPrototype prototype: SheetSteel1 amount: 1 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 - !type:DeleteEntity {} - type: constructionGraph @@ -61,6 +71,8 @@ - material: Steel amount: 1 doAfter: 2.0 + - material: Cable + amount: 1 - node: SignalSwitchNode entity: SignalSwitch edges: @@ -72,8 +84,11 @@ - !type:SpawnPrototype prototype: SheetSteel1 amount: 1 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 - !type:DeleteEntity {} - + - type: constructionGraph id: SignalButtonGraph start: start @@ -85,6 +100,8 @@ - material: Steel amount: 1 doAfter: 2.0 + - material: Cable + amount: 1 - node: SignalButtonNode entity: SignalButton edges: @@ -96,4 +113,94 @@ - !type:SpawnPrototype prototype: SheetSteel1 amount: 1 - - !type:DeleteEntity {} \ No newline at end of file + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 + - !type:DeleteEntity {} + +- type: constructionGraph + id: LightSwitchDirectionalGraph + start: start + graph: + - node: start + edges: + - to: LightSwitchDirectionalNode + steps: + - material: Steel + amount: 1 + doAfter: 2.0 + - material: Cable + amount: 1 + - node: LightSwitchDirectionalNode + entity: ApcNetSwitchDirectional + edges: + - to: start + steps: + - tool: Screwing + doAfter: 2.0 + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 1 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 + - !type:DeleteEntity {} + +- type: constructionGraph + id: SignalSwitchDirectionalGraph + start: start + graph: + - node: start + edges: + - to: SignalSwitchDirectionalNode + steps: + - material: Steel + amount: 1 + doAfter: 2.0 + - material: Cable + amount: 1 + - node: SignalSwitchDirectionalNode + entity: SignalSwitchDirectional + edges: + - to: start + steps: + - tool: Screwing + doAfter: 2.0 + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 1 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 + - !type:DeleteEntity {} + +- type: constructionGraph + id: SignalButtonDirectionalGraph + start: start + graph: + - node: start + edges: + - to: SignalButtonDirectionalNode + steps: + - material: Steel + amount: 1 + doAfter: 2.0 + - material: Cable + amount: 1 + - node: SignalButtonDirectionalNode + entity: SignalButtonDirectional + edges: + - to: start + steps: + - tool: Screwing + doAfter: 2.0 + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 1 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 1 + - !type:DeleteEntity {} diff --git a/Resources/Prototypes/Recipes/Construction/machines.yml b/Resources/Prototypes/Recipes/Construction/machines.yml index 1e96810fbf..4026d5c98a 100644 --- a/Resources/Prototypes/Recipes/Construction/machines.yml +++ b/Resources/Prototypes/Recipes/Construction/machines.yml @@ -96,3 +96,57 @@ canBuildInImpassable: true conditions: - !type:WallmountCondition + +- type: construction + name: directional light switch + id: LightSwitchDirectionalRecipe + graph: LightSwitchDirectionalGraph + startNode: start + targetNode: LightSwitchDirectionalNode + category: construction-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: directional signal switch + id: SignalSwitchDirectionalRecipe + graph: SignalSwitchDirectionalGraph + startNode: start + targetNode: SignalSwitchDirectionalNode + category: construction-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: directional signal button + id: SignalButtonDirectionalRecipe + graph: SignalButtonDirectionalGraph + startNode: start + targetNode: SignalButtonDirectionalNode + category: construction-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