From 99fceaf2e4371bf221fadd9a9f709b3155752e16 Mon Sep 17 00:00:00 2001 From: PeterFuto Date: Sat, 13 May 2023 04:56:54 +0200 Subject: [PATCH] Regular boxes are now destructible (#16300) --- Resources/Maps/box.yml | 2 +- Resources/Maps/fland.yml | 2 +- Resources/Maps/kettle.yml | 2 +- Resources/Maps/origin.yml | 2 +- .../Structures/Storage/Closets/big_boxes.yml | 34 +++++++++---------- .../Crafting/Graphs/storage/bigbox.yml | 2 +- .../Prototypes/Recipes/Crafting/crates.yml | 4 +-- 7 files changed, 23 insertions(+), 25 deletions(-) diff --git a/Resources/Maps/box.yml b/Resources/Maps/box.yml index aaded257da..010f3949d2 100644 --- a/Resources/Maps/box.yml +++ b/Resources/Maps/box.yml @@ -14025,7 +14025,7 @@ entities: - pos: -34.5,17.5 parent: 8364 type: Transform -- proto: BaseBigBox +- proto: BigBox entities: - uid: 25967 components: diff --git a/Resources/Maps/fland.yml b/Resources/Maps/fland.yml index d9a0865556..2f99078866 100644 --- a/Resources/Maps/fland.yml +++ b/Resources/Maps/fland.yml @@ -27622,7 +27622,7 @@ entities: - pos: -23.5,33.5 parent: 13329 type: Transform -- proto: BaseBigBox +- proto: BigBox entities: - uid: 11622 components: diff --git a/Resources/Maps/kettle.yml b/Resources/Maps/kettle.yml index dca2439230..0d0a15e593 100644 --- a/Resources/Maps/kettle.yml +++ b/Resources/Maps/kettle.yml @@ -18249,7 +18249,7 @@ entities: pos: -11.5,24.5 parent: 82 type: Transform -- proto: BaseBigBox +- proto: BigBox entities: - uid: 10063 components: diff --git a/Resources/Maps/origin.yml b/Resources/Maps/origin.yml index 61ffaceba7..cef897e7eb 100644 --- a/Resources/Maps/origin.yml +++ b/Resources/Maps/origin.yml @@ -21539,7 +21539,7 @@ entities: - pos: 33.5,48.5 parent: 2 type: Transform -- proto: BaseBigBox +- proto: BigBox entities: - uid: 1961 components: diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml index 9ecc6f99ab..25d7b946e0 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml @@ -1,7 +1,8 @@ - type: entity id: BaseBigBox - name: cardboard box + name: cardboard box #it's still just a box description: Huh? Just a box... + abstract: true components: - type: Transform noRot: true @@ -61,32 +62,29 @@ id: StealthBox suffix: stealth parent: BaseBigBox - name: cardboard box #it's still just a box description: Kept ya waiting, huh? components: - - type: CardboardBox - effectSound: /Audio/Effects/chime.ogg - type: Damageable - damageContainer: Box damageModifierSet: FlimsyMetallic #Syndicate boxes should have a bit of protection - - type: Sprite - noRot: true - netsync: false - sprite: Structures/Storage/closet.rsi - layers: - - state: agentbox - - state: cardboard_open - map: ["enum.StorageVisualLayers.Door"] - - type: Appearance - visuals: - - type: StorageVisualizer - state: agentbox - state_open: cardboard_open - type: Stealth - type: StealthOnMove passiveVisibilityRate: -0.37 movementVisibilityRate: 0.20 +- type: entity + id: BigBox + parent: BaseBigBox + components: + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 15 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + + #For admin spawning only - type: entity id: GhostBox diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml index eef5d5c553..5975f559e4 100644 --- a/Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/bigbox.yml @@ -12,4 +12,4 @@ - node: basebigbox - entity: BaseBigBox \ No newline at end of file + entity: BigBox diff --git a/Resources/Prototypes/Recipes/Crafting/crates.yml b/Resources/Prototypes/Recipes/Crafting/crates.yml index a55d6211e7..a4313dfa74 100644 --- a/Resources/Prototypes/Recipes/Crafting/crates.yml +++ b/Resources/Prototypes/Recipes/Crafting/crates.yml @@ -33,7 +33,7 @@ - type: construction name: cardboard box - id: BaseBigBox + id: BigBox graph: BaseBigBox startNode: start targetNode: basebigbox @@ -51,4 +51,4 @@ category: construction-category-storage description: A small box for storing things. icon: { sprite: Objects/Storage/boxes.rsi, state: box } - objectType: Item \ No newline at end of file + objectType: Item -- 2.51.2