]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Modified bone-spear to correctly break into 1-2 bones when breaking (#30951)
authorPreston Smith <92108534+thetolbean@users.noreply.github.com>
Sat, 17 Aug 2024 04:54:53 +0000 (23:54 -0500)
committerGitHub <noreply@github.com>
Sat, 17 Aug 2024 04:54:53 +0000 (00:54 -0400)
Resources/Prototypes/Entities/Objects/Weapons/Melee/spear.yml

index 1d010c0976e69cbd3cd7bbf287b364f911c75cbc..c5c300008cd34c3de73840189449b0007f65c663 100644 (file)
     sprite: Objects/Weapons/Melee/bone_spear.rsi
   - type: Construction
     graph: SpearBone
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 30 #excess damage avoids cost of spawning entities.
+      behaviors:
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+    - trigger:
+        !type:DamageTrigger
+        damage: 20
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          collection: GlassBreak
+          params:
+            volume: -4
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          MaterialBones1:
+            min: 1
+            max: 2
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]