From b2c960fdff6d1f61f68794b71a0feb7e830cc2f4 Mon Sep 17 00:00:00 2001 From: bombasticSlacks Date: Mon, 14 Feb 2022 17:48:06 -0400 Subject: [PATCH 1/2] added ear plugs --- .../itemgroups/Clothing_Gear/clothing.json | 6 ++- .../locations_commercial.json | 6 ++- data/json/itemgroups/activities_hobbies.json | 1 + data/json/items/tool_armor.json | 50 +++++++++++++++++++ 4 files changed, 61 insertions(+), 2 deletions(-) diff --git a/data/json/itemgroups/Clothing_Gear/clothing.json b/data/json/itemgroups/Clothing_Gear/clothing.json index 7acdafad8ce6f..2b7cc428fb9a3 100644 --- a/data/json/itemgroups/Clothing_Gear/clothing.json +++ b/data/json/itemgroups/Clothing_Gear/clothing.json @@ -340,7 +340,11 @@ "type": "item_group", "id": "ear_protection", "//": "used in shooting_range.", - "items": [ { "item": "powered_earmuffs", "prob": 10, "charges": [ 0, 100 ] }, [ "ear_plugs", 50 ] ] + "items": [ + { "item": "powered_earmuffs", "prob": 10, "charges": [ 0, 100 ] }, + [ "ear_plugs", 50 ], + { "item": "powered_earplugs", "prob": 10, "charges": [ 0, 100 ] } + ] }, { "id": "clothing_outdoor_shoes", diff --git a/data/json/itemgroups/Locations_MapExtras/locations_commercial.json b/data/json/itemgroups/Locations_MapExtras/locations_commercial.json index 34f5f3c988cfd..3ccddcb9e16e9 100644 --- a/data/json/itemgroups/Locations_MapExtras/locations_commercial.json +++ b/data/json/itemgroups/Locations_MapExtras/locations_commercial.json @@ -1987,6 +1987,10 @@ { "type": "item_group", "id": "gunshop_accessories", - "items": [ { "item": "powered_earmuffs", "prob": 50, "charges": [ 0, 50 ] }, [ "ear_plugs", 80 ] ] + "items": [ + { "item": "powered_earmuffs", "prob": 50, "charges": [ 0, 50 ] }, + [ "ear_plugs", 80 ], + { "item": "powered_earplugs", "prob": 50, "charges": [ 0, 75 ] } + ] } ] diff --git a/data/json/itemgroups/activities_hobbies.json b/data/json/itemgroups/activities_hobbies.json index c2b3292d482fd..728db10337adc 100644 --- a/data/json/itemgroups/activities_hobbies.json +++ b/data/json/itemgroups/activities_hobbies.json @@ -168,6 +168,7 @@ { "item": "slingshot", "prob": 10 }, { "item": "wristrocket", "prob": 5 }, { "item": "powered_earmuffs", "prob": 80, "charges": [ 0, 50 ] }, + { "item": "powered_earplugs", "prob": 60, "charges": [ 0, 50 ] }, { "item": "bandolier_wrist", "prob": 100 }, { "item": "fitness_band", "prob": 5 } ] diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 5a51f43452fcf..92c9bccaa77ad 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -2879,6 +2879,56 @@ ], "armor": [ { "encumbrance": 5, "coverage": 10, "covers": [ "head" ] } ] }, + { + "id": "powered_earplugs", + "type": "TOOL_ARMOR", + "category": "armor", + "symbol": "[", + "color": "blue", + "name": { "str_sp": "shooter's ear plugs" }, + "description": "A pair of in-ear drivers designed to dampen loud sounds and amplify quiet sounds. Without batteries or when turned off, they function like normal earplugs and block most sound. They will block sounds over a certain decibel amount when turned on. The earplugs are currently off.", + "flags": [ "DEAF", "OVERSIZE", "USE_UPS", "NO_UNLOAD", "NO_RELOAD" ], + "repairs_like": "powered_earmuffs", + "price": 12500, + "price_postapoc": 1250, + "material": [ "plastic" ], + "weight": "20 g", + "volume": "200 ml", + "charges_per_use": 1, + "ammo": "battery", + "use_action": { + "type": "transform", + "msg": "You turn the earplugs on.", + "target": "powered_earplugs_on", + "active": true, + "need_charges": 1, + "need_charges_msg": "The earplugs's batteries are dead." + }, + "material_thickness": 1, + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 100 } } ], + "armor": [ { "coverage": 1 } ] + }, + { + "id": "powered_earplugs_on", + "type": "TOOL_ARMOR", + "repairs_like": "powered_earmuffs", + "copy-from": "powered_earplugs", + "symbol": "[", + "color": "blue", + "name": { "str_sp": "shooter's ear plugs (on)" }, + "description": "A pair of in-ear drivers designed to dampen loud sounds and amplify quiet sounds. Without batteries or when turned off, they function like normal earplugs and block most sound. They will block sounds over a certain decibel amount when turned on. The earplugs are currently on.", + "flags": [ "OVERSIZE", "PARTIAL_DEAF", "USE_UPS", "NO_UNLOAD", "NO_RELOAD" ], + "//": "6-8 hours batter life", + "power_draw": 4000, + "revert_to": "powered_earplugs", + "use_action": { + "ammo_scale": 0, + "type": "transform", + "menu_text": "Turn off", + "msg": "The %s flicks off.", + "target": "powered_earplugs" + } + }, { "id": "stethoscope", "type": "TOOL_ARMOR", From 9900e3076780907e142527834fcb1c544abf6f54 Mon Sep 17 00:00:00 2001 From: Dillon Matchett Date: Mon, 14 Feb 2022 18:26:40 -0400 Subject: [PATCH 2/2] Update data/json/items/tool_armor.json Co-authored-by: NetSysFire <59517351+NetSysFire@users.noreply.github.com> --- data/json/items/tool_armor.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 92c9bccaa77ad..d5ec307c4c156 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -2918,7 +2918,7 @@ "name": { "str_sp": "shooter's ear plugs (on)" }, "description": "A pair of in-ear drivers designed to dampen loud sounds and amplify quiet sounds. Without batteries or when turned off, they function like normal earplugs and block most sound. They will block sounds over a certain decibel amount when turned on. The earplugs are currently on.", "flags": [ "OVERSIZE", "PARTIAL_DEAF", "USE_UPS", "NO_UNLOAD", "NO_RELOAD" ], - "//": "6-8 hours batter life", + "//": "6-8 hours battery life", "power_draw": 4000, "revert_to": "powered_earplugs", "use_action": {