From: Alekshhh <44923899+Alekshhh@users.noreply.github.com> Date: Wed, 20 Sep 2023 08:26:16 +0000 (+0300) Subject: U-Shape Rails (#19485) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=f658970f3ef0268dbae53701c83a70879e56f676;p=space-station-14.git U-Shape Rails (#19485) Co-authored-by: metalgearsloth --- 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 0000000000..440ac17798 Binary files /dev/null and b/Resources/Textures/Structures/Walls/railing.rsi/round.png differ diff --git a/Resources/mapping_actions.yml b/Resources/mapping_actions.yml index 9bd170ee35..918333adfb 100644 --- a/Resources/mapping_actions.yml +++ b/Resources/mapping_actions.yml @@ -688,6 +688,20 @@ - 5: 8 name: RailingCornerSmall - action: !type:InstantActionComponent + icon: + entity: RailingRound + name: RailingRound + keywords: [] + clientExclusive: True + autoPopulate: False + temporary: True + event: !type:StartPlacementActionEvent + placementOption: SnapgridCenter + entityType: RailingRound + assignments: + - 5: 9 +- action: !type:InstantAction + checkCanInteract: False icon: entity: AirlockMaintLocked keywords: []