]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make counters climbable (#14085)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Tue, 14 Feb 2023 23:08:01 +0000 (18:08 -0500)
committerGitHub <noreply@github.com>
Tue, 14 Feb 2023 23:08:01 +0000 (10:08 +1100)
Resources/Prototypes/Entities/Structures/Furniture/Tables/base_structuretables.yml
Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml

index 0970d04bcccbaa62acb004a3b581fbf5eb7cfcde..004e0859890358befe6fd9348748170d06f64e8a 100644 (file)
     bonkSound: !type:SoundCollectionSpecifier
       collection: TrayHit
   - type: Clickable
+
+- type: entity
+  id: CounterBase
+  parent: TableBase
+  name: counter
+  abstract: true
+  components:
+  - type: Fixtures
+    fixtures:
+    - shape:
+        !type:PhysShapeAabb
+        bounds: "-0.45,-0.45,0.45,0.45"
+      density: 55
+      mask:
+      - TableMask
+      layer:
+      - TableLayer
index 87696217b1814dca0172717d693be4e0db5358d4..28786f925ad9ca4e00d0b2251ef6ae45cf414bd9 100644 (file)
   components:
   - type: SpriteFade
   - type: Sprite
-    sprite: Structures/Furniture/Tables/counterwood.rsi
+    sprite: Structures/Furniture/Tables/frame.rsi
     netsync: false
   - type: Icon
-    sprite: Structures/Furniture/Tables/counterwood.rsi
+    sprite: Structures/Furniture/Tables/frame.rsi
     state: full
   - type: Fixtures
     fixtures:
   description: Pieces of metal that make the frame of a table.
   components:
   - type: Sprite
-    sprite: Structures/Furniture/Tables/countermetal.rsi
+    sprite: Structures/Furniture/Tables/frame.rsi
   - type: Icon
-    sprite: Structures/Furniture/Tables/countermetal.rsi
+    sprite: Structures/Furniture/Tables/frame.rsi
     state: full
   - type: Damageable
     damageContainer: Inorganic
 
 - type: entity
   id: TableCounterWood
-  parent: CounterWoodFrame
+  parent: CounterBase
   name: wood counter
   description: Do not apply fire to this. Rumour says it burns easily.
   components:
+  - type: Sprite
+    sprite: Structures/Furniture/Tables/counterwood.rsi
+  - type: Icon
+    sprite: Structures/Furniture/Tables/counterwood.rsi
+    state: full
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: Wood
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 100
+      behaviors:
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+    - trigger:
+        !type:DamageTrigger
+        damage: 15
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          path: /Audio/Effects/woodhit.ogg
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          MaterialWoodPlank1:
+            min: 0
+            max: 1
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
   - type: Construction
     graph: Table
     node: CounterWood
 
 - type: entity
   id: TableCounterMetal
-  parent: CounterMetalFrame
+  parent: CounterBase
   name: metal counter
   description: Looks like a good place to put a drink down.
   components:
+  - type: Sprite
+    sprite: Structures/Furniture/Tables/countermetal.rsi
+  - type: Icon
+    sprite: Structures/Furniture/Tables/countermetal.rsi
+    state: full
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: Metallic
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 100
+      behaviors:
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+    - trigger:
+        !type:DamageTrigger
+        damage: 25
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          path: /Audio/Effects/metalbreak.ogg
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          SheetSteel1:
+            min: 0
+            max: 1
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
   - type: Construction
     graph: Table
     node: CounterMetal