]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[construction] Craftable Curtains (#15697)
authorKit0vras <123590995+Kit0vras@users.noreply.github.com>
Mon, 24 Apr 2023 02:12:11 +0000 (05:12 +0300)
committerGitHub <noreply@github.com>
Mon, 24 Apr 2023 02:12:11 +0000 (20:12 -0600)
Resources/Prototypes/Entities/Structures/Decoration/curtains.yml
Resources/Prototypes/Recipes/Construction/Graphs/furniture/curtains.yml [new file with mode: 0644]
Resources/Prototypes/Recipes/Construction/furniture.yml

index a478418b2e9f6292a6d9e2daa1e95951f9e16af3..53f5b371c1b596209321d95e7b030e980296b9e3 100644 (file)
@@ -40,6 +40,9 @@
   - type: Damageable
     damageContainer: Inorganic
     damageModifierSet: Wood
+  - type: Construction
+    graph: Curtains
+    node: Curtains
   - type: Destructible
     thresholds:
     - trigger:
@@ -52,7 +55,7 @@
         spawn:
           MaterialCloth1:
             min: 1
-            max: 3
+            max: 2
   placement:
     mode: SnapgridCenter
 
@@ -67,3 +70,6 @@
     enabled: false
   - type: Physics
     canCollide: false
+  - type: Construction
+    graph: Curtains
+    node: CurtainsOpen
diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/curtains.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/curtains.yml
new file mode 100644 (file)
index 0000000..2f9edcb
--- /dev/null
@@ -0,0 +1,37 @@
+- type: constructionGraph
+  id: Curtains
+  start: start
+  graph:
+    - node: start
+      actions:
+        - !type:DestroyEntity {}
+      edges:
+        - to: Curtains
+          completed:
+            - !type:SnapToGrid { }
+          steps:
+            - material: Cloth
+              amount: 2
+              doAfter: 1
+    - node: Curtains
+      entity: HospitalCurtains
+      edges:
+        - to: start
+          completed:
+            - !type:SpawnPrototype
+              prototype: MaterialCloth1
+              amount: 2
+          steps:
+            - tool: Cutting
+              doAfter: 1
+    - node: CurtainsOpen
+      entity: HospitalCurtainsOpen
+      edges:
+        - to: start
+          completed:
+            - !type:SpawnPrototype
+              prototype: MaterialCloth1
+              amount: 2
+          steps:
+            - tool: Cutting
+              doAfter: 1
index ef2df6559855cc07d76093b04f47ff66a7594136..02b7a26bb6a2cc585a7d32551a47b131d9e148fc 100644 (file)
   canBuildInImpassable: false
   conditions:
     - !type:TileNotBlocked
+
+- type: construction
+  id: Curtains
+  name: curtains
+  description: Contains less than 1% mercury.
+  graph: Curtains
+  startNode: start
+  targetNode: Curtains
+  category: construction-category-furniture
+  icon:
+    sprite: Structures/Decoration/curtains.rsi
+    state: closed
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canBuildInImpassable: false
+  conditions:
+    - !type:TileNotBlocked