From cd4af348495c6a2fdf4874d561f43b455ad7b9ce Mon Sep 17 00:00:00 2001 From: Stanbery Trask <64054459+StanberyTrask@users.noreply.github.com> Date: Sun, 12 Dec 2021 23:03:21 -0600 Subject: [PATCH] Railings (#5732) --- .../Entities/Structures/Walls/railing.yml | 112 ++++++++++++++++++ .../Recipes/Construction/Graphs/railing.yml | 48 ++++++++ .../Recipes/Construction/structures.yml | 34 ++++++ .../Structures/Walls/railing.rsi/corner.png | Bin 0 -> 1452 bytes .../Structures/Walls/railing.rsi/meta.json | 19 +++ .../Structures/Walls/railing.rsi/side.png | Bin 0 -> 1071 bytes 6 files changed, 213 insertions(+) create mode 100644 Resources/Prototypes/Entities/Structures/Walls/railing.yml create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/railing.yml create mode 100644 Resources/Textures/Structures/Walls/railing.rsi/corner.png create mode 100644 Resources/Textures/Structures/Walls/railing.rsi/meta.json create mode 100644 Resources/Textures/Structures/Walls/railing.rsi/side.png diff --git a/Resources/Prototypes/Entities/Structures/Walls/railing.yml b/Resources/Prototypes/Entities/Structures/Walls/railing.yml new file mode 100644 index 0000000000..08e20ae31a --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/Walls/railing.yml @@ -0,0 +1,112 @@ +- type: entity + parent: BaseStructure + id: Railing + name: railing + description: Basic railing meant to protect idiots like you from falling. + components: + - type: Sprite + netsync: false + drawdepth: WallTops + sprite: Structures/Walls/railing.rsi + state: side + - type: Icon + sprite: Structures/Walls/railing.rsi + state: side + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,-0.3" + mass: 50 + layer: + - SmallImpassable + mask: + - Impassable + - type: InteractionOutline + - type: Repairable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: FlimsyMetallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 20 + behaviors: + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/metalbreak.ogg + - !type:SpawnEntitiesBehavior + spawn: + PartRodMetal1: + min: 0 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: Climbable + - type: Construction + graph: railing + node: railing + +- type: entity + parent: BaseStructure + id: RailingCorner + name: railing + description: Basic railing meant to protect idiots like you from falling. + components: + - type: Sprite + netsync: false + drawdepth: WallTops + sprite: Structures/Walls/railing.rsi + state: corner + - type: Icon + sprite: Structures/Walls/railing.rsi + state: corner + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,-0.3" + mass: 50 + layer: + - SmallImpassable + mask: + - Impassable + - shape: + !type:PhysShapeAabb + bounds: "0.49,0.49,0.3,-0.49" + mass: 50 + layer: + - SmallImpassable + mask: + - Impassable + - type: InteractionOutline + - type: Repairable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: FlimsyMetallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 20 + behaviors: + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/metalbreak.ogg + - !type:SpawnEntitiesBehavior + spawn: + PartRodMetal1: + min: 0 + max: 2 + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: Climbable + - type: Construction + graph: railing + node: railingCorner + diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/railing.yml b/Resources/Prototypes/Recipes/Construction/Graphs/railing.yml new file mode 100644 index 0000000000..3914d5007b --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/railing.yml @@ -0,0 +1,48 @@ +- type: constructionGraph + id: railing + start: start + graph: + - node: start + edges: + - to: railing + completed: + - !type:SnapToGrid + southRotation: true + steps: + - material: MetalRod + amount: 1 + doAfter: 2 + - to: railingCorner + completed: + - !type:SnapToGrid + southRotation: true + steps: + - material: MetalRod + amount: 2 + doAfter: 2.5 + + - node: railing + entity: Railing + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: PartRodMetal1 + amount: 1 + - !type:DeleteEntity + steps: + - tool: Screwing + doAfter: 0.25 + + - node: railingCorner + entity: RailingCorner + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: PartRodMetal1 + amount: 2 + - !type:DeleteEntity + steps: + - tool: Screwing + doAfter: 0.5 diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index 6cac301c92..ec6be72df7 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -323,3 +323,37 @@ canBuildInImpassable: false conditions: - !type:TileNotBlocked {} + +- type: construction + name: railing + id: Railing + graph: railing + startNode: start + targetNode: railing + category: Structures + description: Basic railing meant to protect idiots like you from falling. + icon: + sprite: Structures/Walls/railing.rsi + state: side + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked {} + +- type: construction + name: railing corner + id: RailingCorner + graph: railing + startNode: start + targetNode: railingCorner + category: Structures + description: Basic railing meant to protect idiots like you from falling. + icon: + sprite: Structures/Walls/railing.rsi + state: corner + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked {} diff --git a/Resources/Textures/Structures/Walls/railing.rsi/corner.png b/Resources/Textures/Structures/Walls/railing.rsi/corner.png new file mode 100644 index 0000000000000000000000000000000000000000..5481bd8e07c8e293b4547f4f7327136e12f427fe GIT binary patch literal 1452 zcmV;d1ylNoP)r!Z3SBeK~Mw{8~=c>M#6e0D?}ujW%hoYnRA&r1HPE9hG&L+E&xH1`RF3W149>!V|)=b;ne^E!?H$ zlB>c;!eL7eD15E-l*ccMvmSpawi59v@Ts1m>>p13VJ&Cng$ITE@_JGGJ&(FcAZ^Ug zN$ru@i%pzqqJ&6MWDOmMVX1~>R@)b;_+}`GN0Yxv2}>MVa^ek(T9mG7sTtAJ^68XR z?*H?&GovG3_dpc<&#wF456!z!-f`XUW7jR8K;si!8dZNmavJ{>eW$AR9YSyu&abLk zY7Z{9p!?BGT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