From 632a4bcd959b15562fcd83850b1fedaeb3c02027 Mon Sep 17 00:00:00 2001 From: 20kdc Date: Tue, 26 Oct 2021 15:15:02 +0100 Subject: [PATCH] Apc and light construction partial fix (#5030) * Fix APC placement type * Fix wall tags. * Change wall light placement to match how it actually is now * Change spawn-entity wall light snap mode Separate commit so it can be nixed out for JREV * Default switch placement mode to SnapgridCenter --- .../Entities/Structures/Wallmounts/lighting.yml | 1 + .../Entities/Structures/Wallmounts/switch.yml | 3 +++ .../Entities/Structures/Walls/walls.yml | 16 ++++++++++++++++ .../Prototypes/Recipes/Construction/lighting.yml | 15 +++++++++------ .../Prototypes/Recipes/Construction/power.yml | 2 +- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml index d5c5cdbe9a..e5d1050acd 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml @@ -53,6 +53,7 @@ - !type:DoActsBehavior acts: ["Destruction"] placement: + mode: SnapgridCenter snap: - Wallmount diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml index cd9dfa4f54..32c4ae5d71 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml @@ -21,6 +21,7 @@ - key: enum.SignalTransmitterUiKey.Key type: SignalPortSelectorBoundUserInterface placement: + mode: SnapgridCenter snap: - Wallmount @@ -41,6 +42,7 @@ outputs: - name: pressed placement: + mode: SnapgridCenter snap: - Wallmount @@ -65,5 +67,6 @@ - type: ApcNetworkConnection - type: ApcNetSwitch placement: + mode: SnapgridCenter snap: - Wallmount diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index b0477f2fc2..c07b433ba2 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -5,6 +5,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/brick.rsi @@ -34,6 +35,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/clock.rsi @@ -63,6 +65,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/clown.rsi @@ -93,6 +96,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/cult.rsi @@ -123,6 +127,7 @@ components: - type: Tag tags: + - Wall - Debug - RCDDeconstructWhitelist - type: Sprite @@ -153,6 +158,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/diamond.rsi @@ -182,6 +188,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/gold.rsi @@ -211,6 +218,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/ice.rsi @@ -240,6 +248,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/metal.rsi @@ -269,6 +278,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/plasma.rsi @@ -298,6 +308,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/plastic.rsi @@ -359,6 +370,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/riveted.rsi @@ -388,6 +400,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/sandstone.rsi @@ -417,6 +430,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/silver.rsi @@ -446,6 +460,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/solid.rsi @@ -506,6 +521,7 @@ components: - type: Tag tags: + - Wall - RCDDeconstructWhitelist - type: Sprite sprite: Structures/Walls/wood.rsi diff --git a/Resources/Prototypes/Recipes/Construction/lighting.yml b/Resources/Prototypes/Recipes/Construction/lighting.yml index c910b31805..389dd4d44d 100644 --- a/Resources/Prototypes/Recipes/Construction/lighting.yml +++ b/Resources/Prototypes/Recipes/Construction/lighting.yml @@ -10,11 +10,13 @@ sprite: Structures/Wallmounts/Lighting/light_tube.rsi state: off objectType: Structure - placementMode: WallmountLight + placementMode: SnapgridCenter canRotate: true - canBuildInImpassable: true + canBuildInImpassable: false conditions: - - !type:WallmountCondition {} + # Need an *additional* condition here that forces there to be a wall in the opposite direction to the one used for placement. + # Also see below. Didn't add it b/c construction ECS work going on. Cheers, - 20kdc + - !type:TileNotBlocked {} - type: construction name: small wall light @@ -28,11 +30,12 @@ sprite: Structures/Wallmounts/Lighting/light_small.rsi state: off objectType: Structure - placementMode: WallmountLight + placementMode: SnapgridCenter canRotate: true - canBuildInImpassable: true + canBuildInImpassable: false conditions: - - !type:WallmountCondition {} + # Same here. - 20kdc + - !type:TileNotBlocked {} - type: construction name: light switch diff --git a/Resources/Prototypes/Recipes/Construction/power.yml b/Resources/Prototypes/Recipes/Construction/power.yml index 96a44d058f..26d5488266 100644 --- a/Resources/Prototypes/Recipes/Construction/power.yml +++ b/Resources/Prototypes/Recipes/Construction/power.yml @@ -10,7 +10,7 @@ sprite: Structures/Power/apc.rsi state: apc0 objectType: Structure - placementMode: AlignWallProper + placementMode: SnapgridCenter canBuildInImpassable: true - type: construction