]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make directional barricade constructable (#22988)
authorlzk <124214523+lzk228@users.noreply.github.com>
Fri, 29 Dec 2023 00:45:10 +0000 (01:45 +0100)
committerGitHub <noreply@github.com>
Fri, 29 Dec 2023 00:45:10 +0000 (11:45 +1100)
main comit

Resources/Prototypes/Entities/Structures/barricades.yml
Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml
Resources/Prototypes/Recipes/Construction/structures.yml

index 050498cdaa2981cd0134c7a21f711060accd4c9e..a66376c0d9d64857c68f79094a0f97b47d09cd45 100644 (file)
@@ -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:
index d5553af83b084fbef5ab4e26941827f4bb9f3535..11d84ebbb7641c515e1c7d05b3a5ea4c95225a99 100644 (file)
@@ -11,7 +11,6 @@
             - material: WoodPlank
               amount: 4
               doAfter: 3
-              
     - node: barricadefull
       entity: Barricade
       edges:
             - 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
index 8e3a3cf2acbf564172768267a32445d0f586aa5a..75c3efcffb3e8f4231424d9b3746133d391dbe27 100644 (file)
   placementMode: SnapgridCenter
   canRotate: false
 
-- type: construction  
+- type: construction
   name: diagonal plasma window
   id: PlasmaWindowDiagonal
   graph: WindowDiagonal
   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
     sprite: Structures/Doors/secret_door.rsi
     state: closed
   conditions:
-    - !type:TileNotBlocked
\ No newline at end of file
+    - !type:TileNotBlocked