From 7e2c59cc86396d3d8950151b78a23df9f1b1b2a5 Mon Sep 17 00:00:00 2001 From: ymber Date: Wed, 6 May 2020 14:36:27 +0100 Subject: [PATCH] Move ammo_type to arrays --- data/json/items/battery.json | 32 +++++----- data/json/items/magazine/12mm.json | 2 +- data/json/items/magazine/20x60mm.json | 6 +- data/json/items/magazine/22.json | 18 +++--- data/json/items/magazine/223.json | 30 ++++----- data/json/items/magazine/300.json | 2 +- data/json/items/magazine/3006.json | 10 +-- data/json/items/magazine/308.json | 26 ++++---- data/json/items/magazine/32.json | 8 +-- data/json/items/magazine/357sig.json | 4 +- data/json/items/magazine/380.json | 14 ++-- data/json/items/magazine/38super.json | 4 +- data/json/items/magazine/40.json | 14 ++-- data/json/items/magazine/40mm.json | 2 +- data/json/items/magazine/410shot.json | 4 +- data/json/items/magazine/44.json | 4 +- data/json/items/magazine/45.json | 20 +++--- data/json/items/magazine/46.json | 4 +- data/json/items/magazine/50.json | 8 +-- data/json/items/magazine/500.json | 2 +- data/json/items/magazine/545x39.json | 4 +- data/json/items/magazine/57.json | 4 +- data/json/items/magazine/5x50.json | 4 +- data/json/items/magazine/762.json | 12 ++-- data/json/items/magazine/762R.json | 2 +- data/json/items/magazine/762x25.json | 6 +- data/json/items/magazine/8x40mm.json | 14 ++-- data/json/items/magazine/9mm.json | 64 +++++++++---------- data/json/items/magazine/9x18.json | 4 +- data/json/items/magazine/chemical_spray.json | 2 +- data/json/items/magazine/liquid.json | 8 +-- data/json/items/magazine/shot.json | 14 ++-- data/json/items/magazine/weldgas.json | 4 +- data/json/items/obsolete.json | 4 +- data/json/items/vehicle/battery.json | 4 +- data/json/items/vehicle/fuel_storage.json | 2 +- data/mods/Generic_Guns/magazines/grenade.json | 2 +- data/mods/Generic_Guns/magazines/pistol.json | 4 +- .../Generic_Guns/magazines/pistol_tiny.json | 2 +- data/mods/Generic_Guns/magazines/rifle.json | 6 +- .../Generic_Guns/magazines/rifle_huge.json | 4 +- data/mods/Generic_Guns/magazines/shot.json | 4 +- data/mods/Magiclysm/items/mana_crystals.json | 2 +- data/mods/Tanks/items.json | 2 +- src/item_factory.cpp | 10 +-- tools/json_tools/adjust_values.py | 7 +- 46 files changed, 200 insertions(+), 209 deletions(-) diff --git a/data/json/items/battery.json b/data/json/items/battery.json index 08ccc263f159f..7e55d81a83a87 100644 --- a/data/json/items/battery.json +++ b/data/json/items/battery.json @@ -30,7 +30,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 50, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ] @@ -49,7 +49,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "green", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 500, "capacity": 500, "looks_like": "battery", @@ -68,7 +68,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 100, "capacity": 100, "looks_like": "battery", @@ -88,7 +88,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 100, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ] @@ -106,7 +106,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 150, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ] @@ -125,7 +125,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "green", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 1000, "capacity": 1000, "looks_like": "battery", @@ -144,7 +144,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 300, "capacity": 300, "looks_like": "battery", @@ -164,7 +164,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 500, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ] @@ -182,7 +182,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 600, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ] @@ -201,7 +201,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "green", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 5000, "capacity": 5000, "looks_like": "battery", @@ -220,7 +220,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 1200, "capacity": 1200, "looks_like": "battery", @@ -240,7 +240,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 1000, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ] @@ -258,7 +258,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 1250, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "RECHARGE" ] @@ -277,7 +277,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "green", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 10000, "capacity": 10000, "looks_like": "battery", @@ -296,7 +296,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "=", "color": "red", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 100000, "capacity": 100000, "looks_like": "battery", @@ -315,7 +315,7 @@ "material": [ "iron", "plastic" ], "symbol": "=", "color": "yellow", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "count": 2500, "capacity": 2500, "looks_like": "battery", diff --git a/data/json/items/magazine/12mm.json b/data/json/items/magazine/12mm.json index e2cd4fb55ead4..b0ebdb698ad2f 100644 --- a/data/json/items/magazine/12mm.json +++ b/data/json/items/magazine/12mm.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "12mm", + "ammo_type": [ "12mm" ], "capacity": 20, "reliability": 10, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/20x60mm.json b/data/json/items/magazine/20x60mm.json index 308af560171f3..b47d530ad0fb0 100644 --- a/data/json/items/magazine/20x60mm.json +++ b/data/json/items/magazine/20x60mm.json @@ -12,7 +12,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "20x66mm", + "ammo_type": [ "20x66mm" ], "capacity": 10, "reliability": 10, "reload_time": 60, @@ -31,7 +31,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "20x66mm", + "ammo_type": [ "20x66mm" ], "capacity": 20, "reliability": 10, "reload_time": 60, @@ -50,7 +50,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "20x66mm", + "ammo_type": [ "20x66mm" ], "capacity": 40, "reliability": 10, "reload_time": 70, diff --git a/data/json/items/magazine/22.json b/data/json/items/magazine/22.json index bc25788cd2b17..7e0c644fa0802 100644 --- a/data/json/items/magazine/22.json +++ b/data/json/items/magazine/22.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 8, "flags": [ "SPEEDLOADER" ] }, @@ -29,7 +29,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 165, "reliability": 7, "reload_time": 150, @@ -48,7 +48,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 19, "flags": [ "SPEEDLOADER" ] }, @@ -65,7 +65,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -83,7 +83,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 25, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -101,7 +101,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 10, "reliability": 9, "reload_time": 160, @@ -120,7 +120,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -138,7 +138,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 6, "reliability": 6, "flags": [ "MAG_COMPACT" ] @@ -156,7 +156,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "22", + "ammo_type": [ "22" ], "capacity": 10, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/223.json b/data/json/items/magazine/223.json index 63b169868bef4..83c9e6c2023f8 100644 --- a/data/json/items/magazine/223.json +++ b/data/json/items/magazine/223.json @@ -5,7 +5,7 @@ "looks_like": "stanag30", "type": "MAGAZINE", "name": { "str": "5.56x45mm ammo belt" }, - "ammo_type": "223", + "ammo_type": [ "223" ], "capacity": 500, "count": 100, "default_ammo": "556", @@ -24,7 +24,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "223", + "ammo_type": [ "223" ], "capacity": 25, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -42,7 +42,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "223", + "ammo_type": [ "223" ], "capacity": 5, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -72,7 +72,7 @@ "type": "MAGAZINE", "name": { "str": "Ruger .223 10-round magazine" }, "description": "A compact 10-round box magazine used with the Ruger Mini-14 rifle.", - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "ruger20", @@ -81,7 +81,7 @@ "type": "MAGAZINE", "name": { "str": "Ruger .223 20-round magazine" }, "description": "A 20-round box magazine used with the Ruger Mini-14 rifle.", - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "ruger30", @@ -96,7 +96,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "223", + "ammo_type": [ "223" ], "capacity": 30, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -108,7 +108,7 @@ "type": "MAGAZINE", "name": { "str": "Ruger .223 90-round snail drum magazine" }, "description": "A bulky 90-round snail drum magazine for use with the Ruger Mini-14 rifle.", - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "ruger100", @@ -117,7 +117,7 @@ "type": "MAGAZINE", "name": { "str": "Ruger .223 100-round double drum magazine" }, "description": "A bulky 100-round double drum magazine for use with the Ruger Mini-14 rifle.", - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "stanag5", @@ -326,7 +326,7 @@ "type": "MAGAZINE", "name": { "str": "G36 30-round magazine" }, "description": "A standard capacity box magazine for use with the G36 assault rifle.", - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "g36mag_100rd", @@ -335,7 +335,7 @@ "type": "MAGAZINE", "name": { "str": "G36 100-round double drum magazine" }, "description": "A bulky 100-round double drum magazine for use with the G36 assault rifle.", - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "augmag_10rd", @@ -345,7 +345,7 @@ "name": { "str": "AUG 10-round magazine" }, "description": "A compact 10-round box magazine for use with the Steyr AUG assault rifle.", "material": [ "steel", "plastic" ], - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "augmag_30rd", @@ -355,7 +355,7 @@ "name": { "str": "AUG 30-round magazine" }, "description": "A standard capacity 30-round box magazine for use with the Steyr AUG assault rifle.", "material": [ "steel", "plastic" ], - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "augmag_42rd", @@ -369,7 +369,7 @@ "material": [ "steel", "plastic" ], "symbol": "#", "color": "light_gray", - "ammo_type": "223", + "ammo_type": [ "223" ], "capacity": 42, "reliability": 7, "flags": [ "MAG_COMPACT" ] @@ -382,7 +382,7 @@ "name": { "str": "AUG 100-round double drum magazine" }, "description": "A bulky 100-round double drum magazine for use with the Steyr AUG assault rifle.", "material": [ "steel", "plastic" ], - "ammo_type": "223" + "ammo_type": [ "223" ] }, { "id": "survivor223mag", @@ -410,6 +410,6 @@ "price_postapoc": 50, "name": { "str": "Ruger makeshift magazine" }, "description": "An improvised 5-round straight single-stack box magazine consisting of little more than a bent sheet of steel held together by duct tape and hope, for use with the Ruger Mini-14 rifle.", - "ammo_type": "223" + "ammo_type": [ "223" ] } ] diff --git a/data/json/items/magazine/300.json b/data/json/items/magazine/300.json index 57200b20a8f42..4a47ef4109af5 100644 --- a/data/json/items/magazine/300.json +++ b/data/json/items/magazine/300.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "300", + "ammo_type": [ "300" ], "capacity": 5, "reliability": 9, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/3006.json b/data/json/items/magazine/3006.json index 719887baf8417..4b004df5e70b8 100644 --- a/data/json/items/magazine/3006.json +++ b/data/json/items/magazine/3006.json @@ -13,7 +13,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "3006", + "ammo_type": [ "3006" ], "capacity": 5, "flags": [ "SPEEDLOADER" ] }, @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "3006", + "ammo_type": [ "3006" ], "capacity": 4, "reliability": 10, "flags": [ "MAG_COMPACT" ] @@ -48,7 +48,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "3006", + "ammo_type": [ "3006" ], "capacity": 8, "reliability": 8, "reload_time": 150, @@ -67,7 +67,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "3006", + "ammo_type": [ "3006" ], "capacity": 30, "reliability": 7, "reload_time": 120, @@ -87,7 +87,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "3006", + "ammo_type": [ "3006" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/308.json b/data/json/items/magazine/308.json index b54ed0e70b1ed..ace3368273adf 100644 --- a/data/json/items/magazine/308.json +++ b/data/json/items/magazine/308.json @@ -4,7 +4,7 @@ "copy-from": "magazine_belt", "type": "MAGAZINE", "name": { "str": "7.62x51mm ammo belt" }, - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 500, "count": 100, "default_ammo": "762_51", @@ -23,7 +23,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 30, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -41,7 +41,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -59,7 +59,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 5, "reliability": 1, "reload_time": 150, @@ -78,7 +78,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 50, "reliability": 7, "reload_time": 160, @@ -97,7 +97,7 @@ "material": "aluminum", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -122,7 +122,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -140,7 +140,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 5, "reliability": 10, "reload_time": 50, @@ -167,7 +167,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 50, "reliability": 7, "reload_time": 160, @@ -194,7 +194,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -220,7 +220,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -238,7 +238,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -264,7 +264,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "308", + "ammo_type": [ "308" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/32.json b/data/json/items/magazine/32.json index 122bdad9c4e5c..44f6ecfa72f01 100644 --- a/data/json/items/magazine/32.json +++ b/data/json/items/magazine/32.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "32", + "ammo_type": [ "32" ], "capacity": 8, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "32", + "ammo_type": [ "32" ], "capacity": 8, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -48,7 +48,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "32", + "ammo_type": [ "32" ], "capacity": 20, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -66,7 +66,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "32", + "ammo_type": [ "32" ], "capacity": 7, "reliability": 9, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/357sig.json b/data/json/items/magazine/357sig.json index b18329cfe8074..6fb84bfebc24e 100644 --- a/data/json/items/magazine/357sig.json +++ b/data/json/items/magazine/357sig.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "357sig", + "ammo_type": [ "357sig" ], "capacity": 12, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "357sig", + "ammo_type": [ "357sig" ], "capacity": 13, "reliability": 7, "reload_time": 140, diff --git a/data/json/items/magazine/380.json b/data/json/items/magazine/380.json index 052f11e65de73..94da1c283891d 100644 --- a/data/json/items/magazine/380.json +++ b/data/json/items/magazine/380.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "380", + "ammo_type": [ "380" ], "capacity": 6, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "380", + "ammo_type": [ "380" ], "capacity": 6, "reliability": 6, "flags": [ "MAG_COMPACT" ] @@ -48,7 +48,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "380", + "ammo_type": [ "380" ], "capacity": 6, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -66,7 +66,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "380", + "ammo_type": [ "380" ], "capacity": 32, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -84,7 +84,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "380", + "ammo_type": [ "380" ], "capacity": 8, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -102,7 +102,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "380", + "ammo_type": [ "380" ], "capacity": 10, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -120,7 +120,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "380", + "ammo_type": [ "380" ], "capacity": 6, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/38super.json b/data/json/items/magazine/38super.json index a39e092adaecb..f763d2ba1df71 100644 --- a/data/json/items/magazine/38super.json +++ b/data/json/items/magazine/38super.json @@ -12,7 +12,7 @@ "material": [ "plastic", "steel" ], "symbol": "#", "color": "light_gray", - "ammo_type": "38super", + "ammo_type": [ "38super" ], "capacity": 16, "reliability": 7, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "38super", + "ammo_type": [ "38super" ], "capacity": 9, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/40.json b/data/json/items/magazine/40.json index 2ba3faa69abb4..0cf1bb43abd2f 100644 --- a/data/json/items/magazine/40.json +++ b/data/json/items/magazine/40.json @@ -104,7 +104,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "40", + "ammo_type": [ "40" ], "capacity": 12, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -122,7 +122,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "40", + "ammo_type": [ "40" ], "capacity": 20, "reliability": 1, "reload_time": 160, @@ -141,7 +141,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "40", + "ammo_type": [ "40" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -159,7 +159,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "40", + "ammo_type": [ "40" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -177,7 +177,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "40", + "ammo_type": [ "40" ], "capacity": 12, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -195,7 +195,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "40", + "ammo_type": [ "40" ], "capacity": 14, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -213,7 +213,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "40", + "ammo_type": [ "40" ], "capacity": 10, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/40mm.json b/data/json/items/magazine/40mm.json index 2ca7e77f03d16..2e9f30c2d1a02 100644 --- a/data/json/items/magazine/40mm.json +++ b/data/json/items/magazine/40mm.json @@ -11,7 +11,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "40x53mm", + "ammo_type": [ "40x53mm" ], "capacity": 50, "count": 25, "reliability": 6, diff --git a/data/json/items/magazine/410shot.json b/data/json/items/magazine/410shot.json index 1dba65e14b0e6..5e758a809acda 100644 --- a/data/json/items/magazine/410shot.json +++ b/data/json/items/magazine/410shot.json @@ -12,7 +12,7 @@ "material": "plastic", "symbol": "#", "color": "dark_gray", - "ammo_type": "410shot", + "ammo_type": [ "410shot" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "plastic", "symbol": "#", "color": "dark_gray", - "ammo_type": "410shot", + "ammo_type": [ "410shot" ], "capacity": 30, "reliability": 8, "reload_time": 130, diff --git a/data/json/items/magazine/44.json b/data/json/items/magazine/44.json index 9ff2bde38a877..a3661867a7108 100644 --- a/data/json/items/magazine/44.json +++ b/data/json/items/magazine/44.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "44", + "ammo_type": [ "44" ], "capacity": 6, "flags": [ "SPEEDLOADER" ] }, @@ -29,7 +29,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "44", + "ammo_type": [ "44" ], "capacity": 8, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/45.json b/data/json/items/magazine/45.json index b16cd00db3f9e..265c5b7d161a3 100644 --- a/data/json/items/magazine/45.json +++ b/data/json/items/magazine/45.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 30, "reliability": 7, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 20, "reliability": 1, "reload_time": 160, @@ -49,7 +49,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 30, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -67,7 +67,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 30, "reliability": 8, "reload_time": 120, @@ -86,7 +86,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 50, "reliability": 7, "reload_time": 150, @@ -105,7 +105,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 20, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -131,7 +131,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 25, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -157,7 +157,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 12, "reliability": 10, "flags": [ "MAG_COMPACT" ] @@ -175,7 +175,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 12, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -193,7 +193,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "45", + "ammo_type": [ "45" ], "capacity": 9, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/46.json b/data/json/items/magazine/46.json index 738b011cc298c..72e951dd32e3b 100644 --- a/data/json/items/magazine/46.json +++ b/data/json/items/magazine/46.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "46", + "ammo_type": [ "46" ], "capacity": 40, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "46", + "ammo_type": [ "46" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/50.json b/data/json/items/magazine/50.json index 636f841dd219c..5d9288104c1b5 100644 --- a/data/json/items/magazine/50.json +++ b/data/json/items/magazine/50.json @@ -5,7 +5,7 @@ "copy-from": "magazine_belt", "type": "MAGAZINE", "name": { "str": ".50 BMG ammo belt" }, - "ammo_type": "50", + "ammo_type": [ "50" ], "capacity": 100, "count": 100, "linkage": "ammolink50" @@ -24,7 +24,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "50", + "ammo_type": [ "50" ], "capacity": 10, "reliability": 9, "reload_time": 130, @@ -43,7 +43,7 @@ "material": "steel", "symbol": "#", "color": "dark_gray", - "ammo_type": "50", + "ammo_type": [ "50" ], "capacity": 10, "reliability": 9, "reload_time": 110, @@ -62,7 +62,7 @@ "material": "steel", "symbol": "#", "color": "dark_gray", - "ammo_type": "50", + "ammo_type": [ "50" ], "capacity": 5, "reliability": 9, "reload_time": 200, diff --git a/data/json/items/magazine/500.json b/data/json/items/magazine/500.json index f777013d60fb4..0a7ba63b54c4b 100644 --- a/data/json/items/magazine/500.json +++ b/data/json/items/magazine/500.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "500", + "ammo_type": [ "500" ], "capacity": 5, "flags": [ "SPEEDLOADER" ] } diff --git a/data/json/items/magazine/545x39.json b/data/json/items/magazine/545x39.json index 3cc2b7df0a939..cb8afbe2cb558 100644 --- a/data/json/items/magazine/545x39.json +++ b/data/json/items/magazine/545x39.json @@ -12,7 +12,7 @@ "material": [ "steel", "plastic" ], "symbol": "#", "color": "light_gray", - "ammo_type": "545x39", + "ammo_type": [ "545x39" ], "capacity": 30, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -31,7 +31,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "545x39", + "ammo_type": [ "545x39" ], "capacity": 45, "reliability": 8, "reload_time": 130, diff --git a/data/json/items/magazine/57.json b/data/json/items/magazine/57.json index ae38699134052..6c295c9fbb6b6 100644 --- a/data/json/items/magazine/57.json +++ b/data/json/items/magazine/57.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "57", + "ammo_type": [ "57" ], "capacity": 20, "reliability": 10, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "57", + "ammo_type": [ "57" ], "capacity": 50, "reliability": 9, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/5x50.json b/data/json/items/magazine/5x50.json index 6bc8907f8a047..60c4021167c84 100644 --- a/data/json/items/magazine/5x50.json +++ b/data/json/items/magazine/5x50.json @@ -12,7 +12,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "5x50", + "ammo_type": [ "5x50" ], "capacity": 100, "reliability": 10, "reload_time": 60, @@ -31,7 +31,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "5x50", + "ammo_type": [ "5x50" ], "capacity": 50, "reliability": 10, "reload_time": 50, diff --git a/data/json/items/magazine/762.json b/data/json/items/magazine/762.json index 1baac1900e3d2..9f860e5fea69c 100644 --- a/data/json/items/magazine/762.json +++ b/data/json/items/magazine/762.json @@ -13,7 +13,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762", + "ammo_type": [ "762" ], "capacity": 10, "flags": [ "SPEEDLOADER" ] }, @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762", + "ammo_type": [ "762" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -48,7 +48,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762", + "ammo_type": [ "762" ], "capacity": 20, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -66,7 +66,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762", + "ammo_type": [ "762" ], "capacity": 30, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -84,7 +84,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762", + "ammo_type": [ "762" ], "capacity": 40, "reliability": 8, "flags": [ "MAG_BULKY" ] @@ -102,7 +102,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762", + "ammo_type": [ "762" ], "capacity": 75, "reliability": 7, "flags": [ "MAG_BULKY" ] diff --git a/data/json/items/magazine/762R.json b/data/json/items/magazine/762R.json index a28edcd210603..cc7b7273f187b 100644 --- a/data/json/items/magazine/762R.json +++ b/data/json/items/magazine/762R.json @@ -13,7 +13,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762R", + "ammo_type": [ "762R" ], "capacity": 5, "flags": [ "SPEEDLOADER" ] } diff --git a/data/json/items/magazine/762x25.json b/data/json/items/magazine/762x25.json index 44d7cf80ccea4..fe4e685857585 100644 --- a/data/json/items/magazine/762x25.json +++ b/data/json/items/magazine/762x25.json @@ -13,7 +13,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762x25", + "ammo_type": [ "762x25" ], "capacity": 71, "reliability": 7, "reload_time": 190, @@ -32,7 +32,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762x25", + "ammo_type": [ "762x25" ], "capacity": 35, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -50,7 +50,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "762x25", + "ammo_type": [ "762x25" ], "capacity": 8, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/8x40mm.json b/data/json/items/magazine/8x40mm.json index 40d1a426c545e..33c00839fcd50 100644 --- a/data/json/items/magazine/8x40mm.json +++ b/data/json/items/magazine/8x40mm.json @@ -12,7 +12,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "8x40mm", + "ammo_type": [ "8x40mm" ], "capacity": 100, "reliability": 10, "reload_time": 50, @@ -31,7 +31,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "8x40mm", + "ammo_type": [ "8x40mm" ], "capacity": 10, "reliability": 10, "reload_time": 40, @@ -50,7 +50,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "8x40mm", + "ammo_type": [ "8x40mm" ], "capacity": 250, "reliability": 10, "reload_time": 60 @@ -68,7 +68,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "8x40mm", + "ammo_type": [ "8x40mm" ], "capacity": 25, "reliability": 10, "reload_time": 50, @@ -87,7 +87,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "8x40mm", + "ammo_type": [ "8x40mm" ], "capacity": 500, "reliability": 10 }, @@ -104,7 +104,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "8x40mm", + "ammo_type": [ "8x40mm" ], "capacity": 50, "reliability": 10, "reload_time": 50, @@ -123,7 +123,7 @@ "material": [ "superalloy", "plastic" ], "symbol": "#", "color": "dark_gray", - "ammo_type": "8x40mm", + "ammo_type": [ "8x40mm" ], "capacity": 5, "flags": [ "SPEEDLOADER" ] } diff --git a/data/json/items/magazine/9mm.json b/data/json/items/magazine/9mm.json index 6187baa22ce11..b4bdfeb513109 100644 --- a/data/json/items/magazine/9mm.json +++ b/data/json/items/magazine/9mm.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 50, "reliability": 7, "reload_time": 160, @@ -31,7 +31,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 30, "reliability": 7, "reload_time": 140, @@ -50,7 +50,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 15, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -68,7 +68,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 17, "reliability": 7, "reload_time": 140, @@ -87,7 +87,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 22, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -105,7 +105,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 50, "reliability": 8, "flags": [ "MAG_BULKY" ] @@ -123,7 +123,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 100, "reliability": 8, "flags": [ "MAG_BULKY" ] @@ -141,7 +141,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 30, "reliability": 7, "reload_time": 140, @@ -160,7 +160,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 15, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -178,7 +178,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 50, "reliability": 8, "reload_time": 160, @@ -198,7 +198,7 @@ "symbol": "#", "color": "light_gray", "pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "9mm": 30 } } ], - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 30, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -216,7 +216,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 17, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -234,7 +234,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 32, "reliability": 6, "flags": [ "MAG_COMPACT" ] @@ -252,7 +252,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 20, "reliability": 1, "reload_time": 160, @@ -271,7 +271,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 32, "reliability": 7, "flags": [ "MAG_COMPACT" ] @@ -289,7 +289,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 15, "reliability": 10, "flags": [ "MAG_COMPACT" ] @@ -307,7 +307,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 32, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -325,7 +325,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 7, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -343,7 +343,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 17, "reliability": 7, "reload_time": 140, @@ -362,7 +362,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 13, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -380,7 +380,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 15, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -398,7 +398,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 8, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -416,7 +416,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -434,7 +434,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 15, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -452,7 +452,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 17, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -470,7 +470,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 8, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -488,7 +488,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 10, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -506,7 +506,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 15, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -524,7 +524,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 12, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -542,7 +542,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 20, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -560,7 +560,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 26, "reliability": 8, "flags": [ "MAG_COMPACT" ] @@ -578,7 +578,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9mm", + "ammo_type": [ "9mm" ], "capacity": 8, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/9x18.json b/data/json/items/magazine/9x18.json index e5c6e545f6648..9ae0f0583082a 100644 --- a/data/json/items/magazine/9x18.json +++ b/data/json/items/magazine/9x18.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9x18", + "ammo_type": [ "9x18" ], "capacity": 8, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "9x18", + "ammo_type": [ "9x18" ], "capacity": 20, "reliability": 8, "flags": [ "MAG_COMPACT" ] diff --git a/data/json/items/magazine/chemical_spray.json b/data/json/items/magazine/chemical_spray.json index 27c608f10b082..b10913dfb9098 100644 --- a/data/json/items/magazine/chemical_spray.json +++ b/data/json/items/magazine/chemical_spray.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "chemical_spray", + "ammo_type": [ "chemical_spray" ], "capacity": 800, "reliability": 9, "reload_time": 3 diff --git a/data/json/items/magazine/liquid.json b/data/json/items/magazine/liquid.json index 5bb5268cf6d66..4426acf3ddc32 100644 --- a/data/json/items/magazine/liquid.json +++ b/data/json/items/magazine/liquid.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "flammable", + "ammo_type": [ "flammable" ], "capacity": 3000, "reliability": 9, "reload_time": 3 @@ -30,7 +30,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "flammable", + "ammo_type": [ "flammable" ], "capacity": 500, "reliability": 9, "reload_time": 3, @@ -49,7 +49,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "flammable", + "ammo_type": [ "flammable" ], "capacity": 2000, "reliability": 10, "reload_time": 3 @@ -67,7 +67,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "flammable", + "ammo_type": [ "flammable" ], "capacity": 4000, "reliability": 10, "reload_time": 3 diff --git a/data/json/items/magazine/shot.json b/data/json/items/magazine/shot.json index e258c5f931877..b92b4a805cd0f 100644 --- a/data/json/items/magazine/shot.json +++ b/data/json/items/magazine/shot.json @@ -12,7 +12,7 @@ "material": "plastic", "symbol": "#", "color": "dark_gray", - "ammo_type": "shot", + "ammo_type": [ "shot" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -30,7 +30,7 @@ "material": "plastic", "symbol": "#", "color": "dark_gray", - "ammo_type": "shot", + "ammo_type": [ "shot" ], "capacity": 30, "reliability": 8, "reload_time": 130, @@ -49,7 +49,7 @@ "material": "plastic", "symbol": "#", "color": "dark_gray", - "ammo_type": "shot", + "ammo_type": [ "shot" ], "capacity": 10, "reliability": 9, "flags": [ "MAG_COMPACT" ] @@ -67,7 +67,7 @@ "material": "plastic", "symbol": "#", "color": "dark_gray", - "ammo_type": "shot", + "ammo_type": [ "shot" ], "capacity": 20, "reliability": 8, "reload_time": 110, @@ -86,7 +86,7 @@ "material": "cotton", "symbol": "#", "color": "light_gray", - "ammo_type": "shot", + "ammo_type": [ "shot" ], "capacity": 20, "reliability": 5, "armor_data": { "covers": [ "TORSO" ], "coverage": 5, "material_thickness": 1, "encumbrance": 2 }, @@ -105,7 +105,7 @@ "material": "plastic", "symbol": "/", "color": "light_gray", - "ammo_type": "shot", + "ammo_type": [ "shot" ], "capacity": 6, "flags": [ "SPEEDLOADER" ] }, @@ -122,7 +122,7 @@ "material": "plastic", "symbol": "/", "color": "light_gray", - "ammo_type": "shot", + "ammo_type": [ "shot" ], "capacity": 8, "flags": [ "SPEEDLOADER" ] } diff --git a/data/json/items/magazine/weldgas.json b/data/json/items/magazine/weldgas.json index 66a93b7ec2517..8f7acb6e0359b 100644 --- a/data/json/items/magazine/weldgas.json +++ b/data/json/items/magazine/weldgas.json @@ -12,7 +12,7 @@ "material": "steel", "symbol": "#", "color": "brown", - "ammo_type": "weldgas", + "ammo_type": [ "weldgas" ], "capacity": 60, "count": 60, "reliability": 10, @@ -31,7 +31,7 @@ "material": "steel", "symbol": "#", "color": "brown", - "ammo_type": "weldgas", + "ammo_type": [ "weldgas" ], "capacity": 240, "count": 240, "reliability": 10, diff --git a/data/json/items/obsolete.json b/data/json/items/obsolete.json index 38e103d11e081..e7236c8bc259c 100644 --- a/data/json/items/obsolete.json +++ b/data/json/items/obsolete.json @@ -1782,7 +1782,7 @@ "material": "plastic", "symbol": "#", "color": "light_gray", - "ammo_type": "223", + "ammo_type": [ "223" ], "capacity": 5, "flags": [ "SPEEDLOADER" ] }, @@ -2269,7 +2269,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "nail", + "ammo_type": [ "nail" ], "capacity": 50, "reliability": 6, "reload_time": 300, diff --git a/data/json/items/vehicle/battery.json b/data/json/items/vehicle/battery.json index f7c18391db9aa..06bf7f1431b99 100644 --- a/data/json/items/vehicle/battery.json +++ b/data/json/items/vehicle/battery.json @@ -12,7 +12,7 @@ "material": [ "plastic" ], "symbol": ":", "color": "light_cyan", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 2500, "//": "58Ah @ 12VDC. Could supply ~700 watts for an hour", "flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ] @@ -113,7 +113,7 @@ "material": [ "plastic", "steel" ], "symbol": ":", "color": "light_cyan", - "ammo_type": "battery", + "ammo_type": [ "battery" ], "capacity": 40000, "flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE", "NO_REPAIR" ] } diff --git a/data/json/items/vehicle/fuel_storage.json b/data/json/items/vehicle/fuel_storage.json index e35a2ba39846b..119f523f9261f 100644 --- a/data/json/items/vehicle/fuel_storage.json +++ b/data/json/items/vehicle/fuel_storage.json @@ -14,7 +14,7 @@ "capacity": 2000, "reliability": 10, "//": "mods will need to expand", - "ammo_type": "charcoal", + "ammo_type": [ "charcoal" ], "price": 3000, "price_postapoc": 100 } diff --git a/data/mods/Generic_Guns/magazines/grenade.json b/data/mods/Generic_Guns/magazines/grenade.json index 94d2726332927..3cf9f58d0c2e6 100644 --- a/data/mods/Generic_Guns/magazines/grenade.json +++ b/data/mods/Generic_Guns/magazines/grenade.json @@ -9,7 +9,7 @@ "material": "steel", "symbol": "#", "color": "light_gray", - "ammo_type": "ammo_grenade", + "ammo_type": [ "ammo_grenade" ], "capacity": 50, "count": 25, "reliability": 6, diff --git a/data/mods/Generic_Guns/magazines/pistol.json b/data/mods/Generic_Guns/magazines/pistol.json index c84174b20a81d..5664225462bd6 100644 --- a/data/mods/Generic_Guns/magazines/pistol.json +++ b/data/mods/Generic_Guns/magazines/pistol.json @@ -5,7 +5,7 @@ "type": "MAGAZINE", "name": { "str": "pistol magazine" }, "description": "A flush fitting magazine for use with pistols and submachine guns. Holds 15 rounds of standard pistol ammo.", - "ammo_type": "ammo_pistol", + "ammo_type": [ "ammo_pistol" ], "delete": { "ammo_type": "9mm" } }, { @@ -14,7 +14,7 @@ "type": "MAGAZINE", "name": { "str": "SMG magazine" }, "description": "A long stick magazine for use with pistols and submachine guns. Holds 30 rounds of standard pistol ammo.", - "ammo_type": "ammo_pistol", + "ammo_type": [ "ammo_pistol" ], "delete": { "ammo_type": "9mm" } }, { diff --git a/data/mods/Generic_Guns/magazines/pistol_tiny.json b/data/mods/Generic_Guns/magazines/pistol_tiny.json index a870526d1ce70..6f97f2876c92b 100644 --- a/data/mods/Generic_Guns/magazines/pistol_tiny.json +++ b/data/mods/Generic_Guns/magazines/pistol_tiny.json @@ -5,7 +5,7 @@ "type": "MAGAZINE", "name": "target pistol magazine", "description": "A flush fitting magazine for use with target pistols, capable of feeding 10 tiny pistol cartridges.", - "ammo_type": "ammo_pistol_tiny", + "ammo_type": [ "ammo_pistol_tiny" ], "delete": { "ammo_type": "22" } } ] diff --git a/data/mods/Generic_Guns/magazines/rifle.json b/data/mods/Generic_Guns/magazines/rifle.json index 2049e0d2176ed..8873c16cb9208 100644 --- a/data/mods/Generic_Guns/magazines/rifle.json +++ b/data/mods/Generic_Guns/magazines/rifle.json @@ -6,7 +6,7 @@ "name": { "str": "ammo belt" }, "description": "An ammo belt consisting of metal linkages which separate from the belt upon firing. Holds rifle ammunition.", "delete": { "ammo_type": "308" }, - "ammo_type": "ammo_rifle", + "ammo_type": [ "ammo_rifle" ], "capacity": 500, "count": 100, "default_ammo": "rifle_ball", @@ -20,7 +20,7 @@ "name": "standard rifle magazine", "description": "A 30 round standard capacity magazine for service rifles, cheaper than the cost of a meal due to its adoption by nearly every other common rifle. They're made of aluminum and were originally meant to be dispsoable, so they're not the most durable; don't let them get damaged.", "delete": { "ammo_type": "308" }, - "ammo_type": "ammo_rifle" + "ammo_type": [ "ammo_rifle" ] }, { "id": "rifle_sniper_mag", @@ -29,6 +29,6 @@ "name": { "str": "compact rifle magazine" }, "description": "A short 5 round steel magazine compatible with nearly every common rifle. Although it has a low capacity it is easy to store and quick to reload.", "delete": { "ammo_type": "308" }, - "ammo_type": "ammo_rifle" + "ammo_type": [ "ammo_rifle" ] } ] diff --git a/data/mods/Generic_Guns/magazines/rifle_huge.json b/data/mods/Generic_Guns/magazines/rifle_huge.json index 0051fbb85d9c1..8c29489ddbc7a 100644 --- a/data/mods/Generic_Guns/magazines/rifle_huge.json +++ b/data/mods/Generic_Guns/magazines/rifle_huge.json @@ -5,7 +5,7 @@ "type": "MAGAZINE", "name": { "str": "heavy machine gun belt" }, "description": "An ammo belt consisting of metal linkages which separate from the belt upon firing. Holds huge rifle ammunition.", - "ammo_type": "ammo_rifle_huge", + "ammo_type": [ "ammo_rifle_huge" ], "linkage": "ammolinkrifle_huge", "capacity": 100, "count": 100 @@ -17,6 +17,6 @@ "name": { "str": "anti-materiel rifle magazine" }, "description": "A huge 10 round magazine for anti-materiel rifles.", "delete": { "ammo_type": "50" }, - "ammo_type": "ammo_rifle_huge" + "ammo_type": [ "ammo_rifle_huge" ] } ] diff --git a/data/mods/Generic_Guns/magazines/shot.json b/data/mods/Generic_Guns/magazines/shot.json index 81e8b6357d171..bfcd5152deff0 100644 --- a/data/mods/Generic_Guns/magazines/shot.json +++ b/data/mods/Generic_Guns/magazines/shot.json @@ -9,7 +9,7 @@ "reliability": 6, "description": "An 8 round box magazine for tactical shotguns. Shotshells tend to not work well in box magazines due to their plastic hulls and the compression from the magazine spring.", "delete": { "ammo_type": "shot" }, - "ammo_type": "ammo_shot" + "ammo_type": [ "ammo_shot" ] }, { "id": "shot_speedloader", @@ -18,6 +18,6 @@ "type": "MAGAZINE", "description": "A shotshell 'speedloader', a long plastic tube with a prominent plastic follower. You can feed 6 shotshells into an appropriately modified shotgun by pushing the follower against the shotgun's loading port. Bulky, but sees use in competition occasionally.", "delete": { "ammo_type": "shot" }, - "ammo_type": "ammo_shot" + "ammo_type": [ "ammo_shot" ] } ] diff --git a/data/mods/Magiclysm/items/mana_crystals.json b/data/mods/Magiclysm/items/mana_crystals.json index 292c2f6a18644..cb6e75310fe8b 100644 --- a/data/mods/Magiclysm/items/mana_crystals.json +++ b/data/mods/Magiclysm/items/mana_crystals.json @@ -32,7 +32,7 @@ "price": 1500, "symbol": "=", "color": "yellow", - "ammo_type": "crystallized_mana", + "ammo_type": [ "crystallized_mana" ], "capacity": 50, "looks_like": "battery", "flags": [ "NO_SALVAGE", "NO_UNLOAD" ] diff --git a/data/mods/Tanks/items.json b/data/mods/Tanks/items.json index da11276e6989a..e5c4b8a4d67a3 100644 --- a/data/mods/Tanks/items.json +++ b/data/mods/Tanks/items.json @@ -15,7 +15,7 @@ "copy-from": "magazine_belt", "type": "MAGAZINE", "name": "30x113mm ammo belt", - "ammo_type": "30mm", + "ammo_type": [ "30mm" ], "default_ammo": "30mm_hedp", "capacity": 300, "count": 50, diff --git a/src/item_factory.cpp b/src/item_factory.cpp index 8391e2a73be57..1ef8fef19f9d2 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -1981,15 +1981,7 @@ void Item_factory::load_gunmod( const JsonObject &jo, const std::string &src ) void Item_factory::load( islot_magazine &slot, const JsonObject &jo, const std::string &src ) { bool strict = src == "dda"; - if( jo.has_array( "ammo_type" ) ) { - slot.type.clear(); - for( const std::string &id : jo.get_array( "ammo_type" ) ) { - slot.type.insert( ammotype( id ) ); - } - } else if( jo.has_string( "ammo_type" ) ) { - slot.type.clear(); - slot.type.insert( ammotype( jo.get_string( "ammo_type" ) ) ); - } + assign( jo, "ammo_type", slot.type, strict ); assign( jo, "capacity", slot.capacity, strict, 0 ); assign( jo, "count", slot.count, strict, 0 ); assign( jo, "default_ammo", slot.default_ammo, strict ); diff --git a/tools/json_tools/adjust_values.py b/tools/json_tools/adjust_values.py index b7cb081a8ca89..f7f11863ef2ea 100755 --- a/tools/json_tools/adjust_values.py +++ b/tools/json_tools/adjust_values.py @@ -14,10 +14,9 @@ def gen_new(path): with open(path, "r") as json_file: json_data = json.load(json_file) for jo in json_data: - if "ammo" in jo and type(jo["ammo"]) != list and ( - jo["type"] == "TOOL" or jo["type"] == "GUN"): - ammo_list = [jo["ammo"]] - jo["ammo"] = ammo_list + if "ammo_type" in jo and type(jo["ammo_type"]) != list and jo["type"] == "MAGAZINE": + ammo_list = [jo["ammo_type"]] + jo["ammo_type"] = ammo_list change = True return json_data if change else None