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 0000000000..5481bd8e07 Binary files /dev/null and b/Resources/Textures/Structures/Walls/railing.rsi/corner.png differ diff --git a/Resources/Textures/Structures/Walls/railing.rsi/meta.json b/Resources/Textures/Structures/Walls/railing.rsi/meta.json new file mode 100644 index 0000000000..7bb4d81ee4 --- /dev/null +++ b/Resources/Textures/Structures/Walls/railing.rsi/meta.json @@ -0,0 +1,19 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "tgstation at cf5fa29c1458b50fa2811169534b9e4f7f9f3252", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "side", + "directions": 4 + }, + { + "name": "corner", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Structures/Walls/railing.rsi/side.png b/Resources/Textures/Structures/Walls/railing.rsi/side.png new file mode 100644 index 0000000000..a4596a5ebb Binary files /dev/null and b/Resources/Textures/Structures/Walls/railing.rsi/side.png differ