Skip to content

Commit

Permalink
Add max_charges to items that throw "cannot have charges" error (#42603)
Browse files Browse the repository at this point in the history
* Add max_charges to items in tool_armor.json
* remove charges entirely from musical instruments
  • Loading branch information
GearheadLydia authored Aug 3, 2020
1 parent 20b4523 commit da25633
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
8 changes: 0 additions & 8 deletions data/json/items/tool/musical_instruments.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"material": [ "wood", "iron" ],
"symbol": "|",
"color": "white",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 18,
Expand Down Expand Up @@ -45,7 +44,6 @@
"material": [ "bone" ],
"symbol": "-",
"color": "white",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 12,
Expand Down Expand Up @@ -77,7 +75,6 @@
"material": [ "wood", "iron" ],
"symbol": "|",
"color": "light_gray",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 14,
Expand Down Expand Up @@ -107,7 +104,6 @@
"material": [ "iron", "silver" ],
"symbol": "-",
"color": "light_gray",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 12,
Expand Down Expand Up @@ -138,7 +134,6 @@
"material": [ "brass" ],
"symbol": "-",
"color": "yellow",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 21,
Expand Down Expand Up @@ -169,7 +164,6 @@
"material": [ "wood" ],
"symbol": "(",
"color": "brown",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 16,
Expand Down Expand Up @@ -200,7 +194,6 @@
"material": [ "wood" ],
"symbol": "}",
"color": "brown",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 18,
Expand Down Expand Up @@ -231,7 +224,6 @@
"material": [ "gold" ],
"symbol": "}",
"color": "yellow",
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"volume": 25,
Expand Down
24 changes: 18 additions & 6 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@
}
],
"ammo": "battery",
"max_charges": 500,
"initial_charges": 500,
"charges_per_use": 25,
"warmth": 10,
Expand Down Expand Up @@ -1032,6 +1033,7 @@
}
],
"ammo": "battery",
"max_charges": 1000,
"initial_charges": 1000,
"use_action": {
"type": "transform",
Expand Down Expand Up @@ -1092,6 +1094,7 @@
}
],
"ammo": "battery",
"max_charges": 1000,
"initial_charges": 1000,
"use_action": {
"type": "transform",
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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" ]
},
Expand Down Expand Up @@ -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" ]
},
Expand Down Expand Up @@ -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" ]
Expand Down Expand Up @@ -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" ]
Expand Down Expand Up @@ -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" ]
Expand All @@ -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,
Expand All @@ -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" ],
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -2657,7 +2674,6 @@
"weight": "200 g",
"color": "brown",
"covers": [ "head" ],
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"speed_penalty": 10,
Expand Down Expand Up @@ -2686,7 +2702,6 @@
"color": "brown",
"covers": [ "torso" ],
"to_hit": 2,
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"speed_penalty": 15,
Expand Down Expand Up @@ -2723,7 +2738,6 @@
"color": "red",
"covers": [ "torso" ],
"to_hit": 2,
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"speed_penalty": 15,
Expand Down Expand Up @@ -2765,7 +2779,6 @@
"color": "green",
"covers": [ "torso" ],
"to_hit": -2,
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"speed_penalty": 15,
Expand Down Expand Up @@ -2806,7 +2819,6 @@
"covers": [ "torso" ],
"flags": [ "BELTED", "SLEEP_IGNORE" ],
"to_hit": -1,
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"speed_penalty": 25,
Expand Down Expand Up @@ -2841,7 +2853,6 @@
"covers": [ "torso" ],
"flags": [ "BELTED", "SLEEP_IGNORE" ],
"to_hit": 1,
"initial_charges": 1,
"use_action": {
"type": "musical_instrument",
"speed_penalty": 18,
Expand Down Expand Up @@ -3091,6 +3102,7 @@
"material": [ "steel", "plastic" ],
"symbol": ";",
"color": "light_gray",
"max_charges": 60,
"initial_charges": 60,
"ammo": "nitrox",
"pocket_data": [
Expand Down

0 comments on commit da25633

Please sign in to comment.