From ae25c2aff4515b8d17e56c3fbdfdee903d9d4b02 Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Fri, 29 Dec 2023 01:45:10 +0100 Subject: [PATCH] Make directional barricade constructable (#22988) main comit (cherry picked from commit 03ec7bac6700209b90075a247a23c01dab34ee7b) --- .../Entities/Structures/barricades.yml | 3 +++ .../Graphs/structures/barricades.yml | 27 ++++++++++++++++++- .../Recipes/Construction/structures.yml | 19 ++++++++++++- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/Entities/Structures/barricades.yml b/Resources/Prototypes/Entities/Structures/barricades.yml index 050498cdaa..a66376c0d9 100644 --- a/Resources/Prototypes/Entities/Structures/barricades.yml +++ b/Resources/Prototypes/Entities/Structures/barricades.yml @@ -86,6 +86,9 @@ sprite: Structures/barricades.rsi state: barricade_directional noRot: false #Results in smoother rotation when turning the camera, the sprite's dirs are just it rotated anyways so there's no reason to not set this. + - type: Construction + graph: BarricadeDirectional + node: barricadefull - type: Physics - type: Fixtures fixtures: diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml index d5553af83b..11d84ebbb7 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml @@ -11,7 +11,6 @@ - material: WoodPlank amount: 4 doAfter: 3 - - node: barricadefull entity: Barricade edges: @@ -28,3 +27,29 @@ - tool: Prying doAfter: 5 +- type: constructionGraph + id: BarricadeDirectional + start: start + graph: + - node: start + edges: + - to: barricadefull + steps: + - material: WoodPlank + amount: 4 + doAfter: 3 + - node: barricadefull + entity: BarricadeDirectional + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: MaterialWoodPlank1 + amount: 3 #returns 1 less as one breaks + - !type:DeleteEntity {} + conditions: + - !type:EntityAnchored + anchored: true + steps: + - tool: Prying + doAfter: 5 diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index 20343111a0..e263fc1174 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -701,6 +701,23 @@ conditions: - !type:TileNotBlocked +- type: construction + name: wooden barricade + id: BarricadeDirectional + graph: BarricadeDirectional + startNode: start + targetNode: barricadefull + category: construction-category-structures + description: An improvised barricade made out of wooden planks. + icon: + sprite: Structures/barricades.rsi + state: barricade_directional + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked + - type: construction name: railing id: Railing @@ -1203,4 +1220,4 @@ sprite: Structures/Doors/secret_door.rsi state: closed conditions: - - !type:TileNotBlocked \ No newline at end of file + - !type:TileNotBlocked