From f658970f3ef0268dbae53701c83a70879e56f676 Mon Sep 17 00:00:00 2001 From: Alekshhh <44923899+Alekshhh@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:26:16 +0300 Subject: [PATCH] U-Shape Rails (#19485) Co-authored-by: metalgearsloth --- .../Entities/Structures/Walls/railing.yml | 73 ++++++++++++++++++ .../Graphs/structures/railing.yml | 21 +++++ .../Recipes/Construction/structures.yml | 17 ++++ .../Structures/Walls/railing.rsi/meta.json | 4 + .../Structures/Walls/railing.rsi/round.png | Bin 0 -> 4958 bytes Resources/mapping_actions.yml | 14 ++++ 6 files changed, 129 insertions(+) create mode 100644 Resources/Textures/Structures/Walls/railing.rsi/round.png diff --git a/Resources/Prototypes/Entities/Structures/Walls/railing.yml b/Resources/Prototypes/Entities/Structures/Walls/railing.yml index dbb3aaabcf..b083771ea9 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/railing.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/railing.yml @@ -180,3 +180,76 @@ - type: Construction graph: Railing node: railingCornerSmall + +- type: entity + parent: BaseStructure + id: RailingRound + name: railing + description: Basic railing meant to protect idiots like you from falling. + components: + - type: Sprite + drawdepth: WallTops + sprite: Structures/Walls/railing.rsi + state: round + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,-0.25" + density: 1000 + mask: + - TableMask + layer: + - TableLayer + fix2: + shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,-0.25,0.49" + density: 1000 + mask: + - TableMask + layer: + - TableLayer + fix3: + shape: + !type:PhysShapeAabb + bounds: "0.25,-0.49,0.49,0.49" + density: 1000 + mask: + - TableMask + layer: + - TableLayer + - type: InteractionOutline + - type: Repairable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: FlimsyMetallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - 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: railingRound diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml index 897685fd4a..f050c65c42 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml @@ -28,6 +28,14 @@ - material: MetalRod amount: 1 doAfter: 2 + - to: railingRound + completed: + - !type:SnapToGrid + southRotation: true + steps: + - material: MetalRod + amount: 2 + doAfter: 2 - node: railing entity: Railing @@ -67,3 +75,16 @@ steps: - tool: Screwing doAfter: 0.25 + + - node: railingRound + entity: RailingRound + 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 a5045d8134..3539cc2065 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -627,6 +627,23 @@ conditions: - !type:TileNotBlocked +- type: construction + name: railing round + id: RailingRound + graph: Railing + startNode: start + targetNode: railingRound + category: construction-category-structures + description: Basic railing meant to protect idiots like you from falling. + icon: + sprite: Structures/Walls/railing.rsi + state: round + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked + # Chain link fencing - type: construction name: chain link fence diff --git a/Resources/Textures/Structures/Walls/railing.rsi/meta.json b/Resources/Textures/Structures/Walls/railing.rsi/meta.json index 3d1553e971..0858e0a1b2 100644 --- a/Resources/Textures/Structures/Walls/railing.rsi/meta.json +++ b/Resources/Textures/Structures/Walls/railing.rsi/meta.json @@ -18,6 +18,10 @@ { "name": "corner_small", "directions": 4 + }, + { + "name": "round", + "directions": 4 } ] } diff --git a/Resources/Textures/Structures/Walls/railing.rsi/round.png b/Resources/Textures/Structures/Walls/railing.rsi/round.png new file mode 100644 index 0000000000000000000000000000000000000000..440ac177989763b460d0dd6ab4c3d46e394bd175 GIT binary patch literal 4958 zcmeHLc~BE+7Vm%vq9`tSUm>D`n4}XDNJk<^0um({AuI73?Q}ZWLJpFK1cZQ!C#=fA zprd$9AtK^6ilQxIWU=rZCcijH_NIx5V7h@kG5fQYqIwPn@Le8z86Pj_-0=?FoPlQ>iq0j>d-!=W!Y?<3;sz~yX`Oio6iMygJ)RS~f`l}yy(RNO?U zAjot_EuBB`9CbkZQ`f0B?w*nj!qV_NP6-_&zMg|`n~=9AtDm^Ny(O%4;N-8BbC1nC zFv8g-f3@gnz7u0^-$9|Fdkf8cyP%B0w`U%R`_Qntx{*}wLz$b*BeLvY zy0ml*4jCE}#>jz}yg#r&a_jl9}hSg;KFl_%R!hLtaXjAoN_o=nIP? zFH9aX*n2Hcxi>tasefg}1)AJLy=u;wFvhzT6P?8CGx8tI(=}q>KYQ?SfAPvG)_qAv1p{<&2m*ui6%BX@JQO!XjXyulyZ}Iby z83Z|cQEOvU3*%o$`8(SU&BaItW!gI4*#XrP>!>^Kl{o#_exBxaWpWeJlrA3TZhmy? zVbiFmE3Vp9xn3jnJLK-Uj_Um-EU&F2n>cZyH_0o**kg4@=Qqmc zsTGacZrhG{wGobOevRgk`#E;2HOtGnhf1GJ3m=!pi9eQXJ9@NDz1@|sUNyc9Sf>53 zgLvI)doe+O>GoZ;5L8_P0jf(b3FBj0H3L;@6*$AB)`7BvAU}VT4#i?{lB&R?35|gE zs_YDnN+<=iD6RyS=!EzZA~Z>lM<#{Ku%s9aQPTXUIr^FS06>kCDAlBn)fo6D0nLib z2lo~+lSZ|gkTC+9Tq30kwR)V&VQ?5QJ=jDfu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