From da256333bdec54461fe0082ba8196ab5c3145978 Mon Sep 17 00:00:00 2001 From: GearheadLydia <26730040+GearheadLydia@users.noreply.github.com> Date: Mon, 3 Aug 2020 10:19:50 -0700 Subject: [PATCH] Add max_charges to items that throw "cannot have charges" error (#42603) * Add max_charges to items in tool_armor.json * remove charges entirely from musical instruments --- data/json/items/tool/musical_instruments.json | 8 ------- data/json/items/tool_armor.json | 24 ++++++++++++++----- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/data/json/items/tool/musical_instruments.json b/data/json/items/tool/musical_instruments.json index 341ebe3e6ec42..b83585366c593 100644 --- a/data/json/items/tool/musical_instruments.json +++ b/data/json/items/tool/musical_instruments.json @@ -15,7 +15,6 @@ "material": [ "wood", "iron" ], "symbol": "|", "color": "white", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 18, @@ -45,7 +44,6 @@ "material": [ "bone" ], "symbol": "-", "color": "white", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 12, @@ -77,7 +75,6 @@ "material": [ "wood", "iron" ], "symbol": "|", "color": "light_gray", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 14, @@ -107,7 +104,6 @@ "material": [ "iron", "silver" ], "symbol": "-", "color": "light_gray", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 12, @@ -138,7 +134,6 @@ "material": [ "brass" ], "symbol": "-", "color": "yellow", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 21, @@ -169,7 +164,6 @@ "material": [ "wood" ], "symbol": "(", "color": "brown", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 16, @@ -200,7 +194,6 @@ "material": [ "wood" ], "symbol": "}", "color": "brown", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 18, @@ -231,7 +224,6 @@ "material": [ "gold" ], "symbol": "}", "color": "yellow", - "initial_charges": 1, "use_action": { "type": "musical_instrument", "volume": 25, diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 68a6b466c548d..7d0da34ea9044 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -438,6 +438,7 @@ } ], "ammo": "battery", + "max_charges": 500, "initial_charges": 500, "charges_per_use": 25, "warmth": 10, @@ -1032,6 +1033,7 @@ } ], "ammo": "battery", + "max_charges": 1000, "initial_charges": 1000, "use_action": { "type": "transform", @@ -1092,6 +1094,7 @@ } ], "ammo": "battery", + "max_charges": 1000, "initial_charges": 1000, "use_action": { "type": "transform", @@ -1172,6 +1175,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "rebreather_filter": 60 } } ], "ammo": "rebreather_filter", + "max_charges": 60, "initial_charges": 60, "charges_per_use": 1, "use_action": { @@ -1220,6 +1224,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "rebreather_filter": 60 } } ], "ammo": "rebreather_filter", + "max_charges": 60, "initial_charges": 60, "charges_per_use": 1, "use_action": { @@ -1275,6 +1280,7 @@ "environmental_protection_with_filter": 7, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_s": 100 } } ], "ammo": "gasfilter_s", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ] }, @@ -1303,6 +1309,7 @@ "environmental_protection_with_filter": 16, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ] }, @@ -1330,6 +1337,7 @@ "environmental_protection_with_filter": 16, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "flags": [ "OVERSIZE", "SLEEP_IGNORE" ] @@ -1359,6 +1367,7 @@ "environmental_protection_with_filter": 15, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "flags": [ "VARSIZE", "STURDY", "SUN_GLASSES", "SLEEP_IGNORE" ] @@ -1388,6 +1397,7 @@ "environmental_protection_with_filter": 15, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "flags": [ "VARSIZE", "STURDY", "OVERSIZE", "SUN_GLASSES", "SLEEP_IGNORE" ] @@ -1410,6 +1420,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "warmth": 30, @@ -1435,6 +1446,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "material": [ "kevlar_layered", "steel" ], @@ -1464,6 +1476,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "material": [ "kevlar_layered", "cotton" ], @@ -1493,6 +1506,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "material": [ "kevlar_layered", "leather" ], @@ -1522,6 +1536,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "material": [ "kevlar_layered", "plastic" ], @@ -1551,6 +1566,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "material": [ "kevlar_layered", "fur" ], @@ -1580,6 +1596,7 @@ "to_hit": -3, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "gasfilter_m": 100 } } ], "ammo": "gasfilter_m", + "max_charges": 100, "initial_charges": 100, "use_action": [ "GASMASK" ], "material": [ "kevlar_layered", "fur" ], @@ -2657,7 +2674,6 @@ "weight": "200 g", "color": "brown", "covers": [ "head" ], - "initial_charges": 1, "use_action": { "type": "musical_instrument", "speed_penalty": 10, @@ -2686,7 +2702,6 @@ "color": "brown", "covers": [ "torso" ], "to_hit": 2, - "initial_charges": 1, "use_action": { "type": "musical_instrument", "speed_penalty": 15, @@ -2723,7 +2738,6 @@ "color": "red", "covers": [ "torso" ], "to_hit": 2, - "initial_charges": 1, "use_action": { "type": "musical_instrument", "speed_penalty": 15, @@ -2765,7 +2779,6 @@ "color": "green", "covers": [ "torso" ], "to_hit": -2, - "initial_charges": 1, "use_action": { "type": "musical_instrument", "speed_penalty": 15, @@ -2806,7 +2819,6 @@ "covers": [ "torso" ], "flags": [ "BELTED", "SLEEP_IGNORE" ], "to_hit": -1, - "initial_charges": 1, "use_action": { "type": "musical_instrument", "speed_penalty": 25, @@ -2841,7 +2853,6 @@ "covers": [ "torso" ], "flags": [ "BELTED", "SLEEP_IGNORE" ], "to_hit": 1, - "initial_charges": 1, "use_action": { "type": "musical_instrument", "speed_penalty": 18, @@ -3091,6 +3102,7 @@ "material": [ "steel", "plastic" ], "symbol": ";", "color": "light_gray", + "max_charges": 60, "initial_charges": 60, "ammo": "nitrox", "pocket_data": [