Skip to content

Commit

Permalink
Add missing NO_RELOAD flags (CleverRaven#48592)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirmuolio authored Apr 21, 2021
1 parent 84be480 commit 207a94d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 31 deletions.
34 changes: 17 additions & 17 deletions data/json/items/battery.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"color": "yellow",
"max_capacity": "30 kJ",
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ]
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ]
},
{
"id": "light_minus_battery_cell",
Expand All @@ -33,7 +33,7 @@
"ammo_type": [ "battery" ],
"capacity": 50,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 50 } } ]
},
{
Expand All @@ -54,7 +54,7 @@
"count": 500,
"capacity": 500,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "LEAK_DAM", "RADIOACTIVE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 500 } } ]
},
{
Expand All @@ -74,7 +74,7 @@
"count": 100,
"capacity": 100,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 100 } } ]
},
{
Expand All @@ -94,7 +94,7 @@
"ammo_type": [ "battery" ],
"capacity": 100,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 100 } } ]
},
{
Expand All @@ -113,7 +113,7 @@
"ammo_type": [ "battery" ],
"capacity": 150,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 150 } } ]
},
{
Expand All @@ -134,7 +134,7 @@
"count": 1000,
"capacity": 1000,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "LEAK_DAM", "RADIOACTIVE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1000 } } ]
},
{
Expand All @@ -154,7 +154,7 @@
"count": 300,
"capacity": 300,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 300 } } ]
},
{
Expand All @@ -174,7 +174,7 @@
"ammo_type": [ "battery" ],
"capacity": 500,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 500 } } ]
},
{
Expand All @@ -193,7 +193,7 @@
"ammo_type": [ "battery" ],
"capacity": 600,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 600 } } ]
},
{
Expand All @@ -214,7 +214,7 @@
"count": 5000,
"capacity": 5000,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "LEAK_DAM", "RADIOACTIVE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 5000 } } ]
},
{
Expand All @@ -234,7 +234,7 @@
"count": 1200,
"capacity": 1200,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1200 } } ]
},
{
Expand All @@ -254,7 +254,7 @@
"ammo_type": [ "battery" ],
"capacity": 1000,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1000 } } ]
},
{
Expand All @@ -273,7 +273,7 @@
"ammo_type": [ "battery" ],
"capacity": 1250,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1250 } } ]
},
{
Expand All @@ -294,7 +294,7 @@
"count": 10000,
"capacity": 10000,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "LEAK_DAM", "RADIOACTIVE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "LEAK_DAM", "RADIOACTIVE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 10000 } } ]
},
{
Expand All @@ -314,7 +314,7 @@
"count": 100000,
"capacity": 100000,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "MECH_BAT", "LEAK_DAM", "RADIOACTIVE" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "MECH_BAT", "LEAK_DAM", "RADIOACTIVE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 100000 } } ]
},
{
Expand All @@ -334,7 +334,7 @@
"count": 2500,
"capacity": 2500,
"looks_like": "battery",
"flags": [ "NO_SALVAGE", "NO_UNLOAD" ],
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 2500 } } ]
}
]
8 changes: 4 additions & 4 deletions data/json/items/tool/lighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
"menu_text": "Activate",
"type": "transform"
},
"flags": [ "NO_UNLOAD" ]
"flags": [ "NO_UNLOAD", "NO_RELOAD" ]
},
{
"id": "glowstick_dead",
Expand Down Expand Up @@ -332,7 +332,7 @@
"turns_per_charge": 30,
"revert_to": "glowstick_dead",
"revert_msg": "The glowstick fades out.",
"flags": [ "LIGHT_8", "TRADER_AVOID", "SLEEP_IGNORE", "NO_UNLOAD" ]
"flags": [ "LIGHT_8", "TRADER_AVOID", "SLEEP_IGNORE", "NO_UNLOAD", "NO_RELOAD" ]
},
{
"id": "handflare",
Expand All @@ -355,7 +355,7 @@
"active": true,
"msg": "You strike your flare and light it."
},
"flags": [ "NO_UNLOAD" ]
"flags": [ "NO_UNLOAD", "NO_RELOAD" ]
},
{
"id": "handflare_lit",
Expand All @@ -368,7 +368,7 @@
"revert_to": "handflare_dead",
"revert_msg": "The flare sputters out",
"use_action": { "type": "firestarter", "moves": 50 },
"flags": [ "FIRE", "LIGHT_240", "CHARGEDIM", "FLAMING", "TRADER_AVOID", "FIRESTARTER", "NO_UNLOAD" ]
"flags": [ "FIRE", "LIGHT_240", "CHARGEDIM", "FLAMING", "TRADER_AVOID", "FIRESTARTER", "NO_UNLOAD", "NO_RELOAD" ]
},
{
"id": "heavy_flashlight",
Expand Down
8 changes: 4 additions & 4 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2915,7 +2915,7 @@
{ "pocket_type": "MAGAZINE", "airtight": true, "rigid": true, "watertight": true, "ammo_restriction": { "nitrox": 60 } }
],
"covers": [ "torso" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD", "NO_RELOAD" ],
"environmental_protection": 1,
"environmental_protection_with_filter": 16,
"encumbrance": 30,
Expand Down Expand Up @@ -2947,7 +2947,7 @@
"charges_per_use": 1,
"turns_per_charge": 60,
"covers": [ "torso", "mouth" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD", "NO_RELOAD" ],
"environmental_protection": 1,
"environmental_protection_with_filter": 16,
"encumbrance": 30,
Expand Down Expand Up @@ -2976,7 +2976,7 @@
{ "pocket_type": "MAGAZINE", "airtight": true, "rigid": true, "watertight": true, "ammo_restriction": { "nitrox": 20 } }
],
"covers": [ "torso" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD", "NO_RELOAD" ],
"environmental_protection": 1,
"environmental_protection_with_filter": 16,
"encumbrance": 30,
Expand Down Expand Up @@ -3008,7 +3008,7 @@
"charges_per_use": 1,
"turns_per_charge": 60,
"covers": [ "torso", "mouth" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD" ],
"flags": [ "WATER_FRIENDLY", "BELTED", "ONLY_ONE", "STURDY", "NO_UNLOAD", "NO_RELOAD" ],
"environmental_protection": 1,
"environmental_protection_with_filter": 16,
"encumbrance": 30,
Expand Down
6 changes: 0 additions & 6 deletions tests/battery_mod_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ TEST_CASE( "battery tool mod test", "[battery][mod]" )
//
// - Batteries are "magazines"
// - Have "ammo types" compatible with them
// - Can be reloaded with "ammo" (battery charges)
// - Charge left in the battery is "ammo remaining"
//
// - Tools have a "magazine well" (battery compartment)
Expand Down Expand Up @@ -228,11 +227,6 @@ TEST_CASE( "battery and tool properties", "[battery][tool][properties]" )
CHECK( bat_cell.ammo_default() == bat_ammo );
}

SECTION( "is reloadable with battery ammo" ) {
CHECK( bat_cell.is_reloadable() );
CHECK( bat_cell.is_reloadable_with( bat_ammo ) );
}

SECTION( "is not counted by charges" ) {
CHECK_FALSE( bat_cell.count_by_charges() );
}
Expand Down

0 comments on commit 207a94d

Please sign in to comment.