diff --git a/data/json/itemgroups/Clothing_Gear/clothing.json b/data/json/itemgroups/Clothing_Gear/clothing.json index 36b93f0dc0ae6..fca3edb3f15ba 100644 --- a/data/json/itemgroups/Clothing_Gear/clothing.json +++ b/data/json/itemgroups/Clothing_Gear/clothing.json @@ -1836,9 +1836,7 @@ [ "winter_gloves_army", 30 ], [ "army_top", 30 ], [ "kevlar", 10 ], - [ "modularvest", 25 ], - [ "modularvestkevlar", 23 ], - [ "modularvestceramic", 30 ], + [ "ballistic_vest_esapi", 30 ], [ "vest", 15 ], [ "mask_gas", 10 ], [ "goggles_nv", 1 ], @@ -1917,9 +1915,7 @@ "id": "mil_armor_torso", "items": [ [ "kevlar", 10 ], - [ "modularvest", 25 ], - [ "modularvestkevlar", 23 ], - [ "modularvestceramic", 30 ], + [ "ballistic_vest_esapi", 30 ], [ "winter_jacket_army", 30 ], [ "vest", 15 ], [ "tacvest", 10 ], @@ -1976,11 +1972,7 @@ [ "sleeveless_duster", 2 ], [ "sleeveless_duster_leather", 5 ], [ "kevlar", 30 ], - [ "modularvest", 12 ], - [ "modularvestkevlar", 10 ], - [ "modularvestceramic", 8 ], - [ "modularveststeel", 5 ], - [ "modularvestsuper", 1 ], + [ "ballistic_vest_esapi", 8 ], [ "dump_pouch", 20 ], [ "mask_bal", 5 ], [ "vest", 15 ], @@ -2206,12 +2198,6 @@ [ "bookplate", 10 ], [ "ballistic_vest_empty", 2 ], [ "ballistic_vest_esapi", 4 ], - [ "modularvest", 4 ], - [ "modularvesthard", 1 ], - [ "modularvestkevlar", 2 ], - [ "modularvestceramic", 2 ], - [ "modularveststeel", 1 ], - [ "modularvestsuper", 1 ], [ "dragonskin", 1 ], [ "corset", 1 ], [ "football_armor", 18 ], diff --git a/data/json/itemgroups/Clothing_Gear/gear.json b/data/json/itemgroups/Clothing_Gear/gear.json index c75899d1fe53b..0dfa98f2ea509 100644 --- a/data/json/itemgroups/Clothing_Gear/gear.json +++ b/data/json/itemgroups/Clothing_Gear/gear.json @@ -25,8 +25,7 @@ [ "legpouch_large", 5 ], [ "mask_bal", 10 ], [ "mask_gas", 10 ], - [ "modularvest", 15 ], - [ "modularvestkevlar", 15 ], + [ "ballistic_vest_esapi", 15 ], [ "smokebomb", 5 ], [ "suppressor", 25 ], [ "suppressor_compact", 20 ], diff --git a/data/json/itemgroups/Locations_MapExtras/locations.json b/data/json/itemgroups/Locations_MapExtras/locations.json index 75b464e33c9c9..26cef7fa505e0 100644 --- a/data/json/itemgroups/Locations_MapExtras/locations.json +++ b/data/json/itemgroups/Locations_MapExtras/locations.json @@ -1387,7 +1387,7 @@ "items": [ [ "helmet_riot", 25 ], [ "mask_gas", 25 ], - [ "modularveststeel", 20 ], + [ "armor_riot", 20 ], [ "gloves_tactical", 10 ], [ "armguard_hard", 20 ], [ "legguard_hard", 20 ], diff --git a/data/json/itemgroups/military.json b/data/json/itemgroups/military.json index 3cdd70eb8100f..3eea4a5a0eefc 100644 --- a/data/json/itemgroups/military.json +++ b/data/json/itemgroups/military.json @@ -485,9 +485,7 @@ { "item": "gloves_tactical", "prob": 10 }, { "item": "jumpsuit", "prob": 20 }, { "item": "kevlar", "prob": 10 }, - { "item": "modularvest", "prob": 27 }, - { "item": "modularvestkevlar", "prob": 28 }, - { "item": "modularvestceramic", "prob": 34 }, + { "item": "ballistic_vest_esapi", "prob": 40 }, { "item": "kevlar_plate", "prob": 10 }, { "item": "mask_gas", "prob": 10 }, { "item": "helmet_army", "prob": 40 }, diff --git a/data/json/items/armor/ammo_pouch.json b/data/json/items/armor/ammo_pouch.json index 3b61f63766cb8..6a668e2ec84eb 100644 --- a/data/json/items/armor/ammo_pouch.json +++ b/data/json/items/armor/ammo_pouch.json @@ -238,210 +238,6 @@ }, "flags": [ "WATER_FRIENDLY", "BELTED" ] }, - { - "id": "modularvest", - "type": "ARMOR", - "category": "armor", - "name": { "str": "MBR vest (empty)", "str_pl": "MBR vests (empty)" }, - "description": "A Modular Bullet Resistant Vest. It has pouches for extra armor inserts, but without them provides little more protection over a regular vest. It has four pouches capable of carrying magazines.", - "weight": "2860 g", - "volume": "6 L", - "price": 29900, - "price_postapoc": 2000, - "to_hit": -3, - "bashing": 6, - "material": [ "kevlar" ], - "symbol": "[", - "looks_like": "modularvestkevlar", - "color": "light_gray", - "covers": [ "TORSO" ], - "coverage": 85, - "encumbrance": 7, - "storage": "2500 ml", - "warmth": 15, - "material_thickness": 4, - "use_action": { - "type": "holster", - "holster_prompt": "Stash ammo", - "holster_msg": "You stash your %s.", - "multi": 4, - "min_volume": "250 ml", - "max_volume": "1 L", - "draw_cost": 60, - "flags": [ "MAG_COMPACT" ] - }, - "flags": [ "STURDY", "OUTER" ] - }, - { - "id": "modularvestceramic", - "type": "ARMOR", - "category": "armor", - "name": { "str": "MBR vest (ceramic plates)", "str_pl": "MBR vests (ceramic plates)" }, - "description": "A Modular Bullet Resistant Vest. Ceramic plates have been inserted to improve its protection. The ceramic plates cannot be repaired, only replaced. It has four pouches capable of carrying magazines.", - "weight": "4308 g", - "volume": "6 L", - "price": 39900, - "price_postapoc": 4000, - "to_hit": -3, - "bashing": 6, - "material": [ "kevlar", "ceramic" ], - "symbol": "[", - "looks_like": "modularvestkevlar", - "color": "light_gray", - "covers": [ "TORSO" ], - "coverage": 85, - "encumbrance": 15, - "storage": "1 L", - "warmth": 15, - "material_thickness": 9, - "use_action": { - "type": "holster", - "holster_prompt": "Stash ammo", - "holster_msg": "You stash your %s.", - "multi": 4, - "min_volume": "250 ml", - "max_volume": "1 L", - "draw_cost": 60, - "flags": [ "MAG_COMPACT" ] - }, - "flags": [ "STURDY", "OUTER" ] - }, - { - "id": "modularvesthard", - "type": "ARMOR", - "category": "armor", - "name": { "str": "MBR vest (hard plates)", "str_pl": "MBR vests (hard plates)" }, - "description": "A Modular Bullet Resistant Vest. Hardened steel plates have been inserted, greatly increasing its protection at the cost of a great deal of weight and loss of flexibility. It has four pouches capable of carrying magazines.", - "weight": "14860 g", - "volume": "6 L", - "price": 39900, - "price_postapoc": 3500, - "to_hit": -3, - "bashing": 6, - "material": [ "kevlar", "hardsteel" ], - "symbol": "[", - "looks_like": "modularvestkevlar", - "color": "light_cyan", - "covers": [ "TORSO" ], - "coverage": 85, - "encumbrance": 25, - "storage": "1 L", - "warmth": 15, - "material_thickness": 5, - "use_action": { - "type": "holster", - "holster_prompt": "Stash ammo", - "holster_msg": "You stash your %s.", - "multi": 4, - "min_volume": "250 ml", - "max_volume": "1 L", - "draw_cost": 60, - "flags": [ "MAG_COMPACT" ] - }, - "flags": [ "STURDY", "OUTER" ] - }, - { - "id": "modularvestkevlar", - "type": "ARMOR", - "category": "armor", - "name": { "str": "MBR vest (Kevlar plates)", "str_pl": "MBR vests (Kevlar plates)" }, - "description": "A Modular Bullet Resistant Vest. Kevlar plates have been inserted to improve its protection. It has four pouches capable of carrying magazines.", - "weight": "5721 g", - "volume": "6 L", - "price": 39900, - "price_postapoc": 3000, - "to_hit": -3, - "bashing": 6, - "material": [ "kevlar", "kevlar_rigid" ], - "symbol": "[", - "looks_like": "vest", - "color": "light_gray", - "covers": [ "TORSO" ], - "coverage": 85, - "encumbrance": 12, - "storage": "1 L", - "warmth": 15, - "material_thickness": 6, - "use_action": { - "type": "holster", - "holster_prompt": "Stash ammo", - "holster_msg": "You stash your %s.", - "multi": 4, - "min_volume": "250 ml", - "max_volume": "1 L", - "draw_cost": 60, - "flags": [ "MAG_COMPACT" ] - }, - "flags": [ "STURDY", "OUTER" ] - }, - { - "id": "modularveststeel", - "type": "ARMOR", - "category": "armor", - "name": { "str": "MBR vest (steel plating)", "str_pl": "MBR vests (steel plating)" }, - "description": "A Modular Bullet Resistant Vest. Its armor pouches have steel plates in them; this improves protection, but makes the vest much heavier and encumbering. It has four pouches capable of carrying magazines.", - "weight": "10860 g", - "volume": "6 L", - "price": 39900, - "price_postapoc": 2500, - "to_hit": -3, - "bashing": 8, - "material": [ "kevlar", "steel" ], - "symbol": "[", - "looks_like": "modularvestkevlar", - "color": "light_cyan", - "covers": [ "TORSO" ], - "coverage": 85, - "encumbrance": 20, - "storage": "1 L", - "warmth": 15, - "material_thickness": 7, - "use_action": { - "type": "holster", - "holster_prompt": "Stash ammo", - "holster_msg": "You stash your %s.", - "multi": 4, - "min_volume": "250 ml", - "max_volume": "1 L", - "draw_cost": 60, - "flags": [ "MAG_COMPACT" ] - }, - "flags": [ "STURDY", "OUTER" ] - }, - { - "id": "modularvestsuper", - "type": "ARMOR", - "category": "armor", - "name": { "str": "MBR vest (superalloy)", "str_pl": "MBR vests (superalloy)" }, - "description": "A Modular Bullet Resistant Vest. Its armor pouches have superalloy plating in them, giving it extra protection with marginal flexibility loss and additional weight. It has four pouches capable of carrying magazines.", - "weight": "6460 g", - "volume": "6 L", - "price": 80000, - "price_postapoc": 5000, - "to_hit": -3, - "bashing": 8, - "material": [ "kevlar", "superalloy" ], - "symbol": "[", - "looks_like": "modularvestkevlar", - "color": "light_cyan", - "covers": [ "TORSO" ], - "coverage": 85, - "encumbrance": 15, - "storage": "1 L", - "warmth": 15, - "material_thickness": 6, - "use_action": { - "type": "holster", - "holster_prompt": "Stash ammo", - "holster_msg": "You stash your %s.", - "multi": 4, - "min_volume": "250 ml", - "max_volume": "1 L", - "draw_cost": 60, - "flags": [ "MAG_COMPACT" ] - }, - "flags": [ "STURDY", "OUTER" ] - }, { "id": "quiver", "type": "ARMOR", diff --git a/data/json/items/obsolete.json b/data/json/items/obsolete.json index a4906c942a848..6a3da600eaca9 100644 --- a/data/json/items/obsolete.json +++ b/data/json/items/obsolete.json @@ -2316,5 +2316,209 @@ "flags": [ "EATEN_COLD", "NUTRIENT_OVERRIDE" ], "freezing_point": -22, "fun": -15 + }, + { + "id": "modularvest", + "type": "ARMOR", + "category": "armor", + "name": { "str": "MBR vest (empty)", "str_pl": "MBR vests (empty)" }, + "description": "A Modular Bullet Resistant Vest. It has pouches for extra armor inserts, but without them provides little more protection over a regular vest. It has four pouches capable of carrying magazines.", + "weight": "2860 g", + "volume": "6 L", + "price": 29900, + "price_postapoc": 2000, + "to_hit": -3, + "bashing": 6, + "material": [ "kevlar" ], + "symbol": "[", + "looks_like": "modularvestkevlar", + "color": "light_gray", + "covers": [ "TORSO" ], + "coverage": 85, + "encumbrance": 7, + "storage": "2500 ml", + "warmth": 15, + "material_thickness": 4, + "use_action": { + "type": "holster", + "holster_prompt": "Stash ammo", + "holster_msg": "You stash your %s.", + "multi": 4, + "min_volume": "250 ml", + "max_volume": "1 L", + "draw_cost": 60, + "flags": [ "MAG_COMPACT" ] + }, + "flags": [ "STURDY", "OUTER" ] + }, + { + "id": "modularvestceramic", + "type": "ARMOR", + "category": "armor", + "name": { "str": "MBR vest (ceramic plates)", "str_pl": "MBR vests (ceramic plates)" }, + "description": "A Modular Bullet Resistant Vest. Ceramic plates have been inserted to improve its protection. The ceramic plates cannot be repaired, only replaced. It has four pouches capable of carrying magazines.", + "weight": "4308 g", + "volume": "6 L", + "price": 39900, + "price_postapoc": 4000, + "to_hit": -3, + "bashing": 6, + "material": [ "kevlar", "ceramic" ], + "symbol": "[", + "looks_like": "modularvestkevlar", + "color": "light_gray", + "covers": [ "TORSO" ], + "coverage": 85, + "encumbrance": 15, + "storage": "1 L", + "warmth": 15, + "material_thickness": 9, + "use_action": { + "type": "holster", + "holster_prompt": "Stash ammo", + "holster_msg": "You stash your %s.", + "multi": 4, + "min_volume": "250 ml", + "max_volume": "1 L", + "draw_cost": 60, + "flags": [ "MAG_COMPACT" ] + }, + "flags": [ "STURDY", "OUTER" ] + }, + { + "id": "modularvesthard", + "type": "ARMOR", + "category": "armor", + "name": { "str": "MBR vest (hard plates)", "str_pl": "MBR vests (hard plates)" }, + "description": "A Modular Bullet Resistant Vest. Hardened steel plates have been inserted, greatly increasing its protection at the cost of a great deal of weight and loss of flexibility. It has four pouches capable of carrying magazines.", + "weight": "14860 g", + "volume": "6 L", + "price": 39900, + "price_postapoc": 3500, + "to_hit": -3, + "bashing": 6, + "material": [ "kevlar", "hardsteel" ], + "symbol": "[", + "looks_like": "modularvestkevlar", + "color": "light_cyan", + "covers": [ "TORSO" ], + "coverage": 85, + "encumbrance": 25, + "storage": "1 L", + "warmth": 15, + "material_thickness": 5, + "use_action": { + "type": "holster", + "holster_prompt": "Stash ammo", + "holster_msg": "You stash your %s.", + "multi": 4, + "min_volume": "250 ml", + "max_volume": "1 L", + "draw_cost": 60, + "flags": [ "MAG_COMPACT" ] + }, + "flags": [ "STURDY", "OUTER" ] + }, + { + "id": "modularvestkevlar", + "type": "ARMOR", + "category": "armor", + "name": { "str": "MBR vest (Kevlar plates)", "str_pl": "MBR vests (Kevlar plates)" }, + "description": "A Modular Bullet Resistant Vest. Kevlar plates have been inserted to improve its protection. It has four pouches capable of carrying magazines.", + "weight": "5721 g", + "volume": "6 L", + "price": 39900, + "price_postapoc": 3000, + "to_hit": -3, + "bashing": 6, + "material": [ "kevlar", "kevlar_rigid" ], + "symbol": "[", + "looks_like": "vest", + "color": "light_gray", + "covers": [ "TORSO" ], + "coverage": 85, + "encumbrance": 12, + "storage": "1 L", + "warmth": 15, + "material_thickness": 6, + "use_action": { + "type": "holster", + "holster_prompt": "Stash ammo", + "holster_msg": "You stash your %s.", + "multi": 4, + "min_volume": "250 ml", + "max_volume": "1 L", + "draw_cost": 60, + "flags": [ "MAG_COMPACT" ] + }, + "flags": [ "STURDY", "OUTER" ] + }, + { + "id": "modularveststeel", + "type": "ARMOR", + "category": "armor", + "name": { "str": "MBR vest (steel plating)", "str_pl": "MBR vests (steel plating)" }, + "description": "A Modular Bullet Resistant Vest. Its armor pouches have steel plates in them; this improves protection, but makes the vest much heavier and encumbering. It has four pouches capable of carrying magazines.", + "weight": "10860 g", + "volume": "6 L", + "price": 39900, + "price_postapoc": 2500, + "to_hit": -3, + "bashing": 8, + "material": [ "kevlar", "steel" ], + "symbol": "[", + "looks_like": "modularvestkevlar", + "color": "light_cyan", + "covers": [ "TORSO" ], + "coverage": 85, + "encumbrance": 20, + "storage": "1 L", + "warmth": 15, + "material_thickness": 7, + "use_action": { + "type": "holster", + "holster_prompt": "Stash ammo", + "holster_msg": "You stash your %s.", + "multi": 4, + "min_volume": "250 ml", + "max_volume": "1 L", + "draw_cost": 60, + "flags": [ "MAG_COMPACT" ] + }, + "flags": [ "STURDY", "OUTER" ] + }, + { + "id": "modularvestsuper", + "type": "ARMOR", + "category": "armor", + "name": { "str": "MBR vest (superalloy)", "str_pl": "MBR vests (superalloy)" }, + "description": "A Modular Bullet Resistant Vest. Its armor pouches have superalloy plating in them, giving it extra protection with marginal flexibility loss and additional weight. It has four pouches capable of carrying magazines.", + "weight": "6460 g", + "volume": "6 L", + "price": 80000, + "price_postapoc": 5000, + "to_hit": -3, + "bashing": 8, + "material": [ "kevlar", "superalloy" ], + "symbol": "[", + "looks_like": "modularvestkevlar", + "color": "light_cyan", + "covers": [ "TORSO" ], + "coverage": 85, + "encumbrance": 15, + "storage": "1 L", + "warmth": 15, + "material_thickness": 6, + "use_action": { + "type": "holster", + "holster_prompt": "Stash ammo", + "holster_msg": "You stash your %s.", + "multi": 4, + "min_volume": "250 ml", + "max_volume": "1 L", + "draw_cost": 60, + "flags": [ "MAG_COMPACT" ] + }, + "flags": [ "STURDY", "OUTER" ] } ] diff --git a/data/json/npcs/NC_SOLDIER.json b/data/json/npcs/NC_SOLDIER.json index e81bf3a13a23d..4abb8d3099882 100644 --- a/data/json/npcs/NC_SOLDIER.json +++ b/data/json/npcs/NC_SOLDIER.json @@ -41,9 +41,7 @@ { "item": "null", "prob": 10 }, { "item": "jacket_army", "prob": 50 }, { "item": "kevlar", "prob": 10 }, - { "item": "modularvest", "prob": 15 }, - { "item": "modularvestkevlar", "prob": 25 }, - { "item": "modularvestceramic", "prob": 25 } + { "item": "ballistic_vest_esapi", "prob": 25 } ] }, { diff --git a/data/json/npcs/items_generic.json b/data/json/npcs/items_generic.json index 609959db1da90..386f64bb0daa2 100644 --- a/data/json/npcs/items_generic.json +++ b/data/json/npcs/items_generic.json @@ -285,7 +285,7 @@ [ "vest", 10 ], [ "vest_leather", 5 ], [ "kevlar", 10 ], - [ "modularvest", 5 ], + [ "ballistic_vest_esapi", 5 ], [ "waistcoat", 5 ], [ "flotation_vest", 10 ], [ "chainmail_vest", 5 ] @@ -793,7 +793,7 @@ [ "minispeargun", 1 ], [ "mintpatties", 3 ], [ "misc_repairkit", 5 ], - [ "modularvest", 1 ], + [ "ballistic_vest_empty", 1 ], [ "molasses", 3 ], [ "money_bundle", 10 ], [ "moonshine", 5 ], diff --git a/data/json/npcs/refugee_center/surface_visitors/NPC_scavenger_mercenary.json b/data/json/npcs/refugee_center/surface_visitors/NPC_scavenger_mercenary.json index 40c278309cbe7..913e305681401 100644 --- a/data/json/npcs/refugee_center/surface_visitors/NPC_scavenger_mercenary.json +++ b/data/json/npcs/refugee_center/surface_visitors/NPC_scavenger_mercenary.json @@ -45,7 +45,8 @@ "id": "NC_SCAVENGER_MERC_worn", "subtype": "collection", "items": [ - { "item": "modularvestkevlar", "contents-group": "army_mags_m4" }, + { "item": "ballistic_vest_esapi" }, + { "item": "legpouch_large", "contents-group": "army_mags_m4" }, { "item": "boxer_briefs" }, { "item": "pants_army" }, { "item": "duster" }, diff --git a/data/json/npcs/robofac/NPC_ROBOFAC_MERC_1.json b/data/json/npcs/robofac/NPC_ROBOFAC_MERC_1.json index 7c0a8ecf4f420..11f4061308b30 100644 --- a/data/json/npcs/robofac/NPC_ROBOFAC_MERC_1.json +++ b/data/json/npcs/robofac/NPC_ROBOFAC_MERC_1.json @@ -37,7 +37,7 @@ "id": "NC_ROBOFAC_MERC_1_worn", "subtype": "collection", "items": [ - { "item": "modularvestkevlar", "contents-group": "army_mags_m4" }, + { "item": "ballistic_vest_esapi" }, { "item": "chestrig", "contents-group": "army_mags_m4" }, { "item": "under_armor" }, { "item": "under_armor_shorts" }, diff --git a/data/json/npcs/robofac/NPC_robofac_generic_security.json b/data/json/npcs/robofac/NPC_robofac_generic_security.json index 3c4392502c166..817ba4c2ebb87 100644 --- a/data/json/npcs/robofac/NPC_robofac_generic_security.json +++ b/data/json/npcs/robofac/NPC_robofac_generic_security.json @@ -38,7 +38,7 @@ { "item": "under_armor_shorts" }, { "item": "robofac_jumpsuit" }, { "item": "tac_helmet" }, - { "item": "modularvestceramic" }, + { "item": "ballistic_vest_esapi" }, { "item": "gloves_tactical" }, { "item": "glasses_bal", "prob": 33 }, { "item": "boots_combat" }, diff --git a/data/json/professions.json b/data/json/professions.json index 8920f5362dd88..ab57c24a6f890 100644 --- a/data/json/professions.json +++ b/data/json/professions.json @@ -750,6 +750,7 @@ "pants_army", "undershirt", "jacket_army", + "ballistic_vest_esapi", "helmet_army", "mask_ski", "gloves_liner", @@ -761,7 +762,7 @@ ], "entries": [ { "group": "charged_two_way_radio" }, - { "item": "modularvest", "contents-group": "army_mags_m4" }, + { "item": "legpouch_large", "contents-group": "army_mags_m4" }, { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] }, { "item": "knife_combat", "container-item": "sheath" }, { "item": "m4a1", "ammo-item": "556", "charges": 30, "contents-item": [ "shoulder_strap", "holo_sight" ] } @@ -1976,7 +1977,8 @@ "charges": 30, "contents-item": [ "shoulder_strap", "acog_scope" ] }, - { "item": "modularvestceramic", "contents-group": "army_mags_m4" } + { "item": "ballistic_vest_esapi" }, + { "item": "legpouch_large", "contents-group": "army_mags_m4" } ] }, "male": [ "boxer_shorts" ], diff --git a/data/json/recipes/armor/legs.json b/data/json/recipes/armor/legs.json index a769d54fa514f..1aaed6df39e1f 100644 --- a/data/json/recipes/armor/legs.json +++ b/data/json/recipes/armor/legs.json @@ -478,7 +478,7 @@ "using": [ [ "sewing_standard", 100 ] ], "components": [ [ [ "pants_army", 1 ], [ "pants_cargo", 1 ], [ "shorts_cargo", 1 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "kevlar_plate", 12 ] ], + [ [ "kevlar", 1 ], [ "kevlar_plate", 12 ] ], [ [ "rag", 12 ] ], [ [ "tacvest", 1 ], diff --git a/data/json/recipes/armor/suit.json b/data/json/recipes/armor/suit.json index d4dcd0a6d8b8c..a4295f4551334 100644 --- a/data/json/recipes/armor/suit.json +++ b/data/json/recipes/armor/suit.json @@ -14,7 +14,7 @@ "components": [ [ [ "cleansuit", 1 ] ], [ [ "duct_tape", 600 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ], + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ], [ [ "plastic_sheet", 1 ] ] ] }, @@ -255,7 +255,7 @@ [ [ "fanny", 2 ], [ "dump_pouch", 1 ] ], [ [ "tool_belt", 1 ], [ "legrig", 1 ] ], [ [ "pants_army", 1 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -426,7 +426,7 @@ [ [ "nomex", 40 ] ], [ [ "kevlar_plate", 8 ] ], [ [ "duct_tape", 200 ], [ "superglue", 5 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -458,7 +458,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 200 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -501,7 +501,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 400 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -533,7 +533,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 300 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -612,7 +612,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 200 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -668,7 +668,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 300 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -812,7 +812,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 300 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 24 ] ] ] }, { @@ -844,7 +844,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 400 ] ], - [ [ "kevlar", 2 ], [ "modularvest", 2 ], [ "swat_armor", 2 ], [ "kevlar_plate", 48 ] ] + [ [ "kevlar", 2 ], [ "ballistic_vest_empty", 2 ], [ "swat_armor", 2 ], [ "kevlar_plate", 48 ] ] ] }, { @@ -876,7 +876,7 @@ [ "fanny", 2 ] ], [ [ "duct_tape", 400 ] ], - [ [ "kevlar", 2 ], [ "modularvest", 2 ], [ "swat_armor", 2 ], [ "kevlar_plate", 42 ] ] + [ [ "kevlar", 2 ], [ "ballistic_vest_empty", 2 ], [ "swat_armor", 2 ], [ "kevlar_plate", 42 ] ] ] }, { diff --git a/data/json/recipes/armor/torso.json b/data/json/recipes/armor/torso.json index 98a3300132187..3c051cf2a27e0 100644 --- a/data/json/recipes/armor/torso.json +++ b/data/json/recipes/armor/torso.json @@ -292,7 +292,7 @@ "components": [ [ [ "coat_rain", 1 ] ], [ [ "duster", 1 ], [ "jacket_army", 1 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "kevlar_plate", 16 ] ], + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "kevlar_plate", 16 ] ], [ [ "rag", 19 ] ], [ [ "tacvest", 1 ], @@ -488,7 +488,7 @@ [ "fanny", 1 ] ], [ [ "duct_tape", 150 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 16 ] ] + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "swat_armor", 1 ], [ "kevlar_plate", 16 ] ] ] }, { @@ -504,85 +504,6 @@ "components": [ [ [ "ballistic_vest_empty", 1 ] ], [ [ "esapi_plate", 2 ] ], [ [ "esbi_plate", 2 ] ] ], "flags": [ "BLIND_EASY" ] }, - { - "result": "modularvest", - "type": "recipe", - "category": "CC_ARMOR", - "subcategory": "CSC_ARMOR_TORSO", - "skill_used": "tailor", - "difficulty": 4, - "time": "30 m", - "reversible": true, - "decomp_learn": 4, - "autolearn": true, - "using": [ [ "sewing_standard", 30 ] ], - "components": [ [ [ "kevlar_plate", 24 ] ] ] - }, - { - "result": "modularvestceramic", - "type": "recipe", - "category": "CC_ARMOR", - "subcategory": "CSC_ARMOR_TORSO", - "skill_used": "tailor", - "time": "5 m", - "reversible": true, - "decomp_learn": 0, - "autolearn": true, - "components": [ [ [ "modularvest", 1 ] ], [ [ "ceramic_armor", 4 ] ] ], - "flags": [ "BLIND_EASY" ] - }, - { - "result": "modularvesthard", - "type": "recipe", - "category": "CC_ARMOR", - "subcategory": "CSC_ARMOR_TORSO", - "skill_used": "tailor", - "time": "5 m", - "reversible": true, - "decomp_learn": 0, - "autolearn": true, - "components": [ [ [ "modularvest", 1 ] ], [ [ "hard_steel_armor", 8 ] ] ], - "flags": [ "BLIND_EASY" ] - }, - { - "result": "modularvestkevlar", - "type": "recipe", - "category": "CC_ARMOR", - "subcategory": "CSC_ARMOR_TORSO", - "skill_used": "tailor", - "time": "5 m", - "reversible": true, - "decomp_learn": 0, - "autolearn": true, - "components": [ [ [ "modularvest", 1 ] ], [ [ "kevlar_plate", 8 ] ] ], - "flags": [ "BLIND_EASY" ] - }, - { - "result": "modularveststeel", - "type": "recipe", - "category": "CC_ARMOR", - "subcategory": "CSC_ARMOR_TORSO", - "skill_used": "tailor", - "time": "5 m", - "reversible": true, - "decomp_learn": 0, - "autolearn": true, - "components": [ [ [ "modularvest", 1 ] ], [ [ "steel_armor", 8 ] ] ], - "flags": [ "BLIND_EASY" ] - }, - { - "result": "modularvestsuper", - "type": "recipe", - "category": "CC_ARMOR", - "subcategory": "CSC_ARMOR_TORSO", - "skill_used": "tailor", - "time": "5 m", - "reversible": true, - "decomp_learn": 0, - "autolearn": true, - "components": [ [ [ "modularvest", 1 ] ], [ [ "alloy_sheet", 8 ] ] ], - "flags": [ "BLIND_EASY" ] - }, { "result": "dragonskin", "type": "recipe", @@ -777,7 +698,7 @@ "components": [ [ [ "coat_rain", 1 ] ], [ [ "duster", 1 ], [ "jacket_army", 1 ], [ "sleeveless_duster", 1 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "kevlar_plate", 13 ] ], + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "kevlar_plate", 13 ] ], [ [ "rag", 14 ] ], [ [ "tacvest", 1 ], @@ -922,7 +843,7 @@ "components": [ [ [ "coat_rain", 1 ] ], [ [ "trenchcoat", 1 ], [ "jacket_army", 1 ], [ "sleeveless_trenchcoat", 1 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "kevlar_plate", 10 ] ], + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "kevlar_plate", 10 ] ], [ [ "rag", 11 ] ], [ [ "tacvest", 1 ], @@ -1104,7 +1025,7 @@ "components": [ [ [ "coat_rain", 1 ] ], [ [ "trenchcoat", 1 ], [ "jacket_army", 1 ] ], - [ [ "kevlar", 1 ], [ "modularvest", 1 ], [ "kevlar_plate", 12 ] ], + [ [ "kevlar", 1 ], [ "ballistic_vest_empty", 1 ], [ "kevlar_plate", 12 ] ], [ [ "rag", 14 ] ], [ [ "tacvest", 1 ], diff --git a/data/json/recipes/recipe_obsolete.json b/data/json/recipes/recipe_obsolete.json index bb65ead165aba..a317ae43b8cdc 100644 --- a/data/json/recipes/recipe_obsolete.json +++ b/data/json/recipes/recipe_obsolete.json @@ -2394,5 +2394,35 @@ "result": "plastic_chunk", "id_suffix": "from_cash_cards", "obsolete": true + }, + { + "type": "recipe", + "result": "modularvest", + "obsolete": true + }, + { + "type": "recipe", + "result": "modularvestsuper", + "obsolete": true + }, + { + "type": "recipe", + "result": "modularveststeel", + "obsolete": true + }, + { + "type": "recipe", + "result": "modularvestkevlar", + "obsolete": true + }, + { + "type": "recipe", + "result": "modularvesthard", + "obsolete": true + }, + { + "type": "recipe", + "result": "modularvestceramic", + "obsolete": true } ] diff --git a/data/json/vehicles/helicopters.json b/data/json/vehicles/helicopters.json index 6125d6c4ea9aa..f9769e43c3c80 100644 --- a/data/json/vehicles/helicopters.json +++ b/data/json/vehicles/helicopters.json @@ -1913,8 +1913,7 @@ { "x": -7, "y": 2, "chance": 10, "items": [ "9mmfmj" ] }, { "x": -7, "y": 2, "chance": 20, "ammo": 80, "items": [ "mask_gas" ] }, { "x": -7, "y": 2, "chance": 10, "items": [ "flashlight" ] }, - { "x": -7, "y": 2, "chance": 7, "items": [ "modularvest" ] }, - { "x": -6, "y": 1, "chance": 7, "items": [ "modularvestkevlar" ] }, + { "x": -7, "y": 2, "chance": 7, "items": [ "ballistic_vest_empty" ] }, { "x": -4, "y": -1, "chance": 7, "ammo": 80, "items": [ "mp3" ] }, { "x": -2, "y": 1, "chance": 7, "items": [ "screwdriver" ] }, { "x": -2, "y": 1, "chance": 10, "items": [ "mag_fieldrepair" ] }, @@ -2354,9 +2353,8 @@ { "x": -7, "y": 2, "chance": 10, "items": [ "9mmfmj" ] }, { "x": -7, "y": 2, "chance": 20, "ammo": 80, "items": [ "mask_gas" ] }, { "x": -7, "y": 2, "chance": 10, "items": [ "flashlight" ] }, - { "x": -7, "y": 2, "chance": 7, "items": [ "modularvest" ] }, + { "x": -7, "y": 2, "chance": 7, "items": [ "ballistic_vest_empty" ] }, { "x": -6, "y": -1, "chance": 20, "item_groups": [ "remains_soldier" ] }, - { "x": -6, "y": 1, "chance": 7, "items": [ "modularvestkevlar" ] }, { "x": -5, "y": 1, "chance": 20, "item_groups": [ "remains_soldier" ] }, { "x": -4, "y": -1, "chance": 7, "ammo": 80, "items": [ "mp3" ] }, { "x": -2, "y": -1, "chance": 7, "items": [ "aspirin" ] }, @@ -2730,9 +2728,8 @@ { "x": -7, "y": 2, "chance": 10, "items": [ "9mmfmj" ] }, { "x": -7, "y": 2, "chance": 20, "ammo": 80, "items": [ "mask_gas" ] }, { "x": -7, "y": 2, "chance": 10, "items": [ "flashlight" ] }, - { "x": -7, "y": 2, "chance": 7, "items": [ "modularvest" ] }, + { "x": -7, "y": 2, "chance": 7, "items": [ "ballistic_vest_empty" ] }, { "x": -6, "y": -1, "chance": 20, "item_groups": [ "remains_soldier" ] }, - { "x": -6, "y": 1, "chance": 7, "items": [ "modularvestkevlar" ] }, { "x": -5, "y": 1, "chance": 20, "item_groups": [ "remains_soldier" ] }, { "x": -4, "y": -1, "chance": 7, "ammo": 80, "items": [ "mp3" ] }, { "x": -2, "y": 1, "chance": 7, "items": [ "screwdriver" ] }, diff --git a/doc/PLAYER_ACTIVITY.md b/doc/PLAYER_ACTIVITY.md index 0042576ac93cd..c01dc6c24430f 100644 --- a/doc/PLAYER_ACTIVITY.md +++ b/doc/PLAYER_ACTIVITY.md @@ -1,70 +1,131 @@ # Activities -Activities are long term actions, that can be interrupted and (optionally) continued. This allows the player to react to events (like monsters appearing, getting hurt) while doing something that takes more than just one turn. +Activities are long term actions, that can be interrupted and (optionally) +continued. This allows the avatar or an npc to react to events (like +monsters appearing, getting hurt) while doing something that takes more +than just one turn. ## Adding new activities -1. `player_activities.json` Define properties that apply to all instances of the activity in question. -2. `activity_handlers.h` Optionally declare a do_turn and/or finish function. -3. `player_activity.cpp` Optionally update `can_resume_with`. -4. `activity_handlers.cpp` Add the functions from #2 into the do_turn and finish maps, and define the functions. -5. Start the activity by calling `player::assign_activity`. +1. `player_activities.json` Define properties that apply to all instances +of the activity in question. + +2. `activity_actor.h` Create a new subclass of `activity_actor` +(e.g. move_items_activity_actor) to store state and handle turns of the +new activity. + +3. `activity_actor.cpp` Define the `do_turn` and `finish` functions +needed for the new actor as well as the required serialization functions. + +4. `player_activity.cpp` Optionally update `can_resume_with`. + +5. Construct your activity actor and then pass it to the constructor for +`player_activity`. The newly constructed activity can then be assigned +to the character and started using `Character::assign_activity`. ## JSON Properties -* verb: A descriptive term to describe the activity to be used in the query to stop the activity, and strings that describe it, example : `"verb": "mining"` or `"verb": { "ctxt": "instrument", "str": "playing" }`. -* suspendable (true): If true, the activity can be continued without starting from scratch again. This is only possible if `can_resume_with()` returns true. -* rooted (false): If true, then during the activity, recoil is reduced, and plant mutants sink their roots into the ground. Should be true if the activity lasts longer than a few minutes, and can always be accomplished without moving your feet. +* verb: A descriptive term to describe the activity to be used in the +query to stop the activity, and strings that describe it, for example: +`"verb": "mining"` or +`"verb": { "ctxt": "instrument", "str": "playing" }`. + +* suspendable (true): If true, the activity can be continued without +starting from scratch again. This is only possible if `can_resume_with()` +returns true. + +* rooted (false): If true, then during the activity, recoil is reduced, +and plant mutants sink their roots into the ground. Should be true if the +activity lasts longer than a few minutes, and can always be accomplished +without moving your feet. + * based_on: Can be 'time', 'speed', or 'neither'. - * time: The amount that `player_activity::moves_left` is decremented by is independent from the character's speed. - * speed: `player_activity::moves_left` may be decremented faster or slower, depending on the character's speed. - * neither: `moves_left` will not be decremented. Thus you must define a do_turn function; otherwise the activity will never end! -* no_resume (false): Rather than resuming, you must always restart the activity from scratch. -* multi_activity(false): This activity will repeat until it cannot do any more work, used for NPC and player zone activities. -* refuel_fires( false ): If true, the player will automatically refuel fires during the long activity. -* auto_needs( false ) : If true, the player will automatically eat and drink from specific auto_consume zones during long activities. + + * time: The amount that `player_activity::moves_left` is + decremented by is independent from the character's speed. + + * speed: `player_activity::moves_left` may be decremented faster + or slower, depending on the character's speed. + + * neither: `moves_left` will not be decremented. Thus you must + define a do_turn function; otherwise the activity will never end! + +* no_resume (false): Rather than resuming, you must always restart the +activity from scratch. + +* multi_activity(false): This activity will repeat until it cannot do +any more work, used for NPC and avatar zone activities. + +* refuel_fires( false ): If true, the character will automatically refuel +fires during the long activity. + +* auto_needs( false ) : If true, the character will automatically eat and +drink from specific auto_consume zones during long activities. ## Termination There are several ways an activity can be ended: 1. Call `player_activity::set_to_null()` - This can be called if it finished early or something went wrong, such as corrupt data, disappearing items, etc. The activity will not be put into the backlog. + + This can be called if it finished early or something went wrong, + such as corrupt data, disappearing items, etc. The activity will + not be put into the backlog. + 2. `moves_left` <= 0 - Once this condition is true, the finish function, if there is one, is called. The finish function should call `set_to_null()`. If there isn't a finish function, `set_to_null()` will be called for you (from player_activity::do_turn). -3. `game::cancel_activity` or `player::cancel_activity` - Canceling an activity prevents the `player_activity::finish` function from running, and the activity does therefore not yield a result. A copy of the activity is written to `player::backlog` if it's suspendable. + + Once this condition is true, the finish function, if there is one, + is called. The finish function should call `set_to_null()`. If + there isn't a finish function, `set_to_null()` will be called + for you (from activity_actor::do_turn). + +3. `Character::cancel_activity` + + Canceling an activity prevents the `activity_actor::finish` + function from running, and the activity does therefore not yield a + result. A copy of the activity is written to `Character::backlog` + if it's suspendable. ## Notes -While the player character performs the activity, `player_activity::do_turn` is called on each turn. Depending on the JSON properties, this will do some stuff. It will also call the do_turn function, and if `moves_left` is non-positive, the finish function. +While the character performs the activity, +`activity_actor::do_turn` is called on each turn. Depending on the +JSON properties, this will do some stuff. It will also call the do_turn +function, and if `moves_left` is non-positive, the finish function. -Some activities (like playing music on a mp3 player) don't have an end result but instead do something each turn (playing music on the mp3 player decreases its batteries and gives a morale bonus). +Some activities (like playing music on a mp3 player) don't have an end +result but instead do something each turn (playing music on the mp3 +player decreases its batteries and gives a morale bonus). -If the activity needs any information during its execution or when it's finished (like *where* to do something, *which* item to use to do something, ...), use any of: +If the activity needs any information during its execution or when +it's finished (like *where* to do something, *which* item to use to do +something, ...), simply add data members to your activity actor as well +as serialization functions for the data so that the activity can persist +across save/load cycles. -- `player_activity::index` - what to do (which recipe to craft, ...) -- `player_activity::position` - item position in player's inventory (`player::i_at`) -- `player_activity::name` - name of something to do (skill to be trained) -- `player_activity::values` - vector of any `int` values -- `player_activity::str_values` - vector of any `std::string` values -- `player_activity::placement` - where to do something +Be careful when storing coordinates as the activity may be carried out +by NPCS. If its, the coordinates must be absolute not local as local +coordinates are based on the avatars position. -Those values are automatically saved and restored when loading a game. Other than that they are not changed/examined by any common code. Different types of activities can use them however they need to. +### `activity_actor::do_turn` -If you are adding an activity that may be possible for NPCs to perform, then please make the activity placement in absolute coords. -As the local coordinate system is based on the avatar position. +To prevent an infinite loop, ensure that one of the following is +satisfied: -### `activity_handlers::_do_turn` function +- The `based_on` JSON property is `speed` or `time` -To prevent an infinite loop, ensure that one of the following is satisfied: +- The `player_activity::moves_left` is decreased in `do_turn` -- The `based_on` JSON property is `speed` or `time`, -- Or `player_activity::moves_left` is decreased (in `_do_turn`, -- Or that the activity is stopped there (see 'Termination', above). +- The the activity is stopped in `do_turn` (see 'Termination' above) -For example the pulp activity finishes itself when there are no more unpulped corpses on the map. It therefore does not need to decrease `player_activity::moves_left` on each turn. +For example, `move_items_activity_actor::do_turn` will either move as +many items as possible given the character's current moves or, if there +are no target items remaining, terminate the activity. -### `activity_handlers::_finish` function +### `activity_actor::finish` -This function is called when the activity has been completed (`moves_left` <= 0). It must call `set_to_null()` or assign a new activity. One should not call `cancel_activity` for the finished activity, as this could make a copy of the activity in `player::backlog`, which allows resuming an already finished activity. +This function is called when the activity has been completed +(`moves_left` <= 0). It must call `player_activity::set_to_null()` or +assign a new activity. One should not call `Character::cancel_activity` +for the finished activity, as this could make a copy of the activity in +`Character::backlog`, which allows resuming an already finished activity. diff --git a/src/crafting_gui.cpp b/src/crafting_gui.cpp index 0d6cac1a30bb9..beaa308570f1b 100644 --- a/src/crafting_gui.cpp +++ b/src/crafting_gui.cpp @@ -213,6 +213,8 @@ const recipe *select_crafting_recipe( int &batch_size ) w_head = catacurses::newwin( headHeight, width, point( wStart, 0 ) ); w_subhead = catacurses::newwin( subHeadHeight, width, point( wStart, 3 ) ); + w_data = catacurses::newwin( dataHeight, width, point( wStart, + headHeight + subHeadHeight ) ); if( isWide ) { item_info_width = width - FULL_SCREEN_WIDTH - 2; @@ -227,9 +229,6 @@ const recipe *select_crafting_recipe( int &batch_size ) w_iteminfo = {}; } - w_data = catacurses::newwin( dataHeight, width - item_info_width, - point( wStart, headHeight + subHeadHeight ) ); - ui.position( point( wStart, 0 ), point( width, TERMY ) ); } ); ui.mark_resize(); @@ -571,6 +570,7 @@ const recipe *select_crafting_recipe( int &batch_size ) } draw_scrollbar( w_data, line, dataLines, recmax, point_zero ); + wrefresh( w_data ); if( isWide && !current.empty() ) { item_info_data data = item_info_data_from_recipe( current[line], count, item_info_scroll ); @@ -584,8 +584,8 @@ const recipe *select_crafting_recipe( int &batch_size ) if( cursor_pos ) { // place the cursor at the selected item name as expected by screen readers wmove( w_data, cursor_pos.value() ); + wrefresh( w_data ); } - wrefresh( w_data ); } ); do {