From c2b61d62fff1f8fcf64b5939dd1c33d6170d1ec5 Mon Sep 17 00:00:00 2001 From: catdach <93795131+catdach@users.noreply.github.com> Date: Sun, 24 Jul 2022 08:10:02 -0400 Subject: [PATCH] Adjusted casings_handle() to work on tools. Changed the item type of Disorder to "tool" instead of "generic" (#59323) --- data/json/items/gun/artisan_guns.json | 2 +- src/item.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/items/gun/artisan_guns.json b/data/json/items/gun/artisan_guns.json index 6ab10f513332c..f5882e21c137a 100644 --- a/data/json/items/gun/artisan_guns.json +++ b/data/json/items/gun/artisan_guns.json @@ -29,7 +29,7 @@ "id": "pulverizer", "copy-from": "hammer_sledge", "name": { "str": "the Disorder" }, - "type": "GENERIC", + "type": "TOOL", "description": "A large, heavy sledge hammer converted for use as a weapon. It features a notable safety on the side, and the back of the head has a firing mechanism that can be loaded with rifle blanks. When the head impacts and the safety is off, the blanks are engaged, sending the moving piston forward and causing massive damage. Etched into the head are the words 'she's lost control'.", "proportional": { "weight": 1.2 }, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "powder_blank": 1 } } ], diff --git a/src/item.cpp b/src/item.cpp index 3382cf36fa91e..27962e5ee1d4a 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -11290,7 +11290,7 @@ int item::casings_count() const void item::casings_handle( const std::function &func ) { - if( !is_gun() ) { + if( !is_gun() && !is_tool() ) { return; } contents.casings_handle( func );