From d8350902eaa8bf91761d74f03ce50fa8afc95f9c Mon Sep 17 00:00:00 2001 From: catdach <93795131+catdach@users.noreply.github.com> Date: Tue, 24 May 2022 17:05:46 -0400 Subject: [PATCH] Adjusted casings_handle() to work on tools. Changed the item type of Disorder to "tool" instead of "generic" --- 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 f91fbc6f8d96e..2b32282b131a5 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -11170,7 +11170,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 );