From 9dfbd30a7a6abfd455dbcd2aed4eee084fed63c3 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:58:58 +0200 Subject: [PATCH] Sweep of sanification for electronic devices (#76029) * sanify electronic * more * more * fix few errors * fix itemgroups after changes, fix battery test * more test fixes * add missed comment on heavy flashlight * add shoulder strap because it's cool and it's part of irl item * more test fixes * Update tests/item_autopickup_test.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * and more * and more * more * more * more * further tweaks of heavy-duty flashlight * more * more * more * more --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../itemgroups/Clothing_Gear/clothing.json | 4 +- .../Locations_MapExtras/locations.json | 6 +- .../locations_commercial.json | 2 +- data/json/itemgroups/SUS/domestic.json | 6 +- data/json/itemgroups/activities_hobbies.json | 4 +- data/json/itemgroups/food_service.json | 2 +- data/json/itemgroups/misc.json | 4 +- data/json/items/armor/robofac_armor.json | 2 +- data/json/items/containers/containers.json | 4 +- data/json/items/tool/cooking.json | 113 ++++---- data/json/items/tool/electronics.json | 220 ++++++---------- data/json/items/tool/fire.json | 7 +- data/json/items/tool/lighting.json | 244 ++++++++---------- .../surface_refugees/NPC_Pablo_Nunez.json | 2 +- data/json/professions.json | 24 +- data/json/uncraft/recipe_deconstruction.json | 3 +- .../itemgroups/spaceship_groups.json | 4 +- .../Isolation-Protocol/Player/profession.json | 4 +- .../TEST_DATA/expected_dps_data/axes_dps.json | 2 +- .../expected_dps_data/clubs_dps.json | 1 - .../TEST_DATA/expected_dps_data/junk_dps.json | 1 - data/mods/TEST_DATA/legacy_to_hit.json | 4 - .../TEST_DATA/vehicle_efficiency_test.json | 2 +- .../Xedra_Evolved/player/professions.json | 2 +- tests/battery_mod_test.cpp | 8 +- tests/item_autopickup_test.cpp | 4 +- tests/iuse_actor_test.cpp | 6 +- 27 files changed, 286 insertions(+), 399 deletions(-) diff --git a/data/json/itemgroups/Clothing_Gear/clothing.json b/data/json/itemgroups/Clothing_Gear/clothing.json index 0003398bc20f8..f38e46f697741 100644 --- a/data/json/itemgroups/Clothing_Gear/clothing.json +++ b/data/json/itemgroups/Clothing_Gear/clothing.json @@ -676,7 +676,7 @@ "type": "item_group", "subtype": "collection", "container-item": "hat_hard", - "items": [ { "item": "light_disposable_cell", "charges": [ 0, -1 ], "container-item": "flashlight" } ] + "items": [ { "item": "flashlight", "charges": [ 0, -1 ] } ] }, { "id": "hat_hard_modified", @@ -685,7 +685,7 @@ "container-item": "hat_hard", "items": [ { "group": "common_nape_protectors", "prob": 50 }, - { "item": "light_minus_disposable_cell", "charges": 100, "container-item": "flashlight", "prob": 50 }, + { "item": "flashlight", "charges": [ 0, -1 ], "prob": 50 }, { "group": "common_face_shields", "prob": 15 }, { "item": "plastic_chin_guard", "prob": 10 }, { "item": "attachable_ear_muffs", "prob": 5 } diff --git a/data/json/itemgroups/Locations_MapExtras/locations.json b/data/json/itemgroups/Locations_MapExtras/locations.json index 322deabe454fd..9b75f18ab2af7 100644 --- a/data/json/itemgroups/Locations_MapExtras/locations.json +++ b/data/json/itemgroups/Locations_MapExtras/locations.json @@ -684,7 +684,7 @@ [ "amplifier", 25 ], { "item": "smart_lamp", "prob": 5, "charges": [ 0, 100 ] }, { "item": "reading_light", "prob": 10, "charges": [ 0, 100 ] }, - { "item": "carver_off", "prob": 5, "charges": [ 0, 500 ] }, + { "item": "carver_off", "prob": 5 }, { "item": "coffeemaker", "prob": 5 }, { "item": "dehydrator", "prob": 5 }, { "item": "food_processor", "prob": 5 }, @@ -1250,7 +1250,7 @@ { "item": "extinguisher", "prob": 20, "charges": 100 }, { "item": "laptop", "prob": 20, "charges": [ 0, 500 ] }, { "item": "flashlight", "prob": 40, "charges": [ 0, 300 ] }, - { "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] }, + { "item": "water_purifier", "prob": 5 }, [ "flyer", 10 ], [ "decoy_elfa", 10 ], [ "tongs", 10 ], @@ -2535,7 +2535,7 @@ { "item": "popcan_stove", "prob": 5, "charges": [ 0, 500 ] }, { "item": "denat_alcohol", "prob": 6, "charges": [ 250, -1 ] }, { "item": "methed_alcohol", "prob": 4, "charges": [ 250, -1 ] }, - { "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] }, + { "item": "water_purifier", "prob": 5 }, { "item": "radio", "prob": 20, "charges": [ 0, 100 ] }, [ "rollmat", 40 ], [ "tent_kit", 17 ], diff --git a/data/json/itemgroups/Locations_MapExtras/locations_commercial.json b/data/json/itemgroups/Locations_MapExtras/locations_commercial.json index 122fc345e9273..033a09b0458f2 100644 --- a/data/json/itemgroups/Locations_MapExtras/locations_commercial.json +++ b/data/json/itemgroups/Locations_MapExtras/locations_commercial.json @@ -446,7 +446,7 @@ [ "chainsaw_off", 7 ], { "item": "elec_chainsaw_off", "prob": 4, "charges": [ 0, 500 ] }, { "item": "elec_chainsaw_cord_off", "prob": 4 }, - { "item": "carver_off", "prob": 7, "charges": [ 0, 500 ] }, + { "item": "carver_off", "prob": 7 }, [ "jackhammer", 2 ], [ "elec_jackhammer", 1 ], [ "pickaxe", 1 ], diff --git a/data/json/itemgroups/SUS/domestic.json b/data/json/itemgroups/SUS/domestic.json index ad03c8820349f..042ed492fea82 100644 --- a/data/json/itemgroups/SUS/domestic.json +++ b/data/json/itemgroups/SUS/domestic.json @@ -190,7 +190,7 @@ { "item": "ceramic_shard", "prob": 30 }, { "item": "e_scrap", "prob": 50, "count": [ 1, 5 ] }, { "item": "razor_blade", "prob": 40 }, - { "item": "flashlight", "prob": 55, "ammo-item": "battery", "charges": [ 2, 8 ] }, + { "item": "flashlight", "prob": 55, "charges": [ 2, 8 ] }, { "item": "bottle_plastic_small", "prob": 42 }, { "item": "glowstick_dead", "prob": 30 }, { "item": "condom", "prob": 40 }, @@ -332,7 +332,7 @@ { "group": "superglue", "prob": 90 }, { "item": "boxcutter", "prob": 85 }, { "item": "duct_tape", "prob": 85, "charges": [ 5, 200 ] }, - { "item": "flashlight", "prob": 80, "ammo-item": "light_battery_cell", "charges": [ 100, 300 ] }, + { "item": "flashlight", "prob": 80, "charges": [ 100, 300 ] }, { "item": "toothbrush_plain", "custom-flags": [ "FILTHY" ], "prob": 80 }, { "item": "bottle_opener", "prob": 75 }, { "item": "pockknife", "prob": 75 }, @@ -390,7 +390,7 @@ { "item": "paper", "charges": [ 25, 100 ] }, { "item": "scissors", "prob": 80 }, { "item": "stapler", "prob": 80 }, - { "item": "flashlight", "prob": 80, "ammo-item": "battery", "charges": 300 }, + { "item": "flashlight", "prob": 80, "charges": 300 }, { "item": "hairbrush", "prob": 80 }, { "item": "office_letter_opener", "prob": 75 }, { "item": "candle", "count": [ 1, 2 ], "prob": 75, "charges": [ 70, -1 ] }, diff --git a/data/json/itemgroups/activities_hobbies.json b/data/json/itemgroups/activities_hobbies.json index 41002f9c4a862..318d68dfe5f79 100644 --- a/data/json/itemgroups/activities_hobbies.json +++ b/data/json/itemgroups/activities_hobbies.json @@ -320,7 +320,7 @@ [ "hammer", 35 ], { "item": "flashlight", "prob": 40, "charges": [ 0, 300 ] }, { "item": "heavy_flashlight", "prob": 20, "charges": [ 0, 300 ] }, - { "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] }, + { "item": "water_purifier", "prob": 5 }, { "item": "radio", "prob": 20, "charges": [ 0, 100 ] }, [ "beartrap", 5 ], { "item": "UPS_OFF", "prob": 8, "charges": [ 0, 1000 ] }, @@ -517,7 +517,7 @@ [ "hammer", 35 ], { "item": "flashlight", "prob": 40, "charges": [ 0, 300 ] }, { "item": "heavy_flashlight", "prob": 20, "charges": [ 0, 300 ] }, - { "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] }, + { "item": "water_purifier", "prob": 5 }, { "item": "radio", "prob": 20, "charges": [ 0, 100 ] }, [ "string_36", 40 ], [ "wire", 50 ], diff --git a/data/json/itemgroups/food_service.json b/data/json/itemgroups/food_service.json index 233bef412c30e..be999b32150a5 100644 --- a/data/json/itemgroups/food_service.json +++ b/data/json/itemgroups/food_service.json @@ -1354,7 +1354,7 @@ { "item": "knife_huge", "variant": "knife_butcher", "prob": 30 }, { "item": "butchering_kit", "prob": 5 }, { "item": "tongs", "prob": 10 }, - { "item": "carver_off", "prob": 5, "charges": [ 0, 500 ] }, + { "item": "carver_off", "prob": 5 }, { "item": "meat", "prob": 1 }, { "item": "hacksaw", "prob": 10 }, { "item": "gloves_cut_resistant", "prob": 10 } diff --git a/data/json/itemgroups/misc.json b/data/json/itemgroups/misc.json index f04fdbd70f5af..6b467b9d54c03 100644 --- a/data/json/itemgroups/misc.json +++ b/data/json/itemgroups/misc.json @@ -226,7 +226,7 @@ { "item": "socks", "count": 3 }, { "item": "gloves_tactical" }, { "group": "batteries" }, - { "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" }, + { "item": "flashlight", "charges": 150 }, { "item": "light_battery_cell", "charges": 150, "container-item": "radio" }, { "item": "lighter", "charges": 100 }, { "item": "pockknife" }, @@ -249,7 +249,7 @@ { "item": "flint_steel" }, { "item": "whistle_multitool" }, { "item": "bottle_folding" }, - { "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" }, + { "item": "flashlight", "charges": 150 }, { "item": "picklocks" }, { "item": "lifestraw" }, { "item": "pocket_survival" }, diff --git a/data/json/items/armor/robofac_armor.json b/data/json/items/armor/robofac_armor.json index b95deb404b059..f5c865c641a4d 100644 --- a/data/json/items/armor/robofac_armor.json +++ b/data/json/items/armor/robofac_armor.json @@ -202,7 +202,7 @@ "pocket_type": "MAGAZINE_WELL", "rigid": true, "flag_restriction": [ "BATTERY_MEDIUM" ], - "default_magazine": "medimedium_battery_cellum_atomic_battery_cell" + "default_magazine": "medium_battery_cell" } ], "ammo": "battery", diff --git a/data/json/items/containers/containers.json b/data/json/items/containers/containers.json index 6df6a92caac41..6906df295a801 100644 --- a/data/json/items/containers/containers.json +++ b/data/json/items/containers/containers.json @@ -3444,8 +3444,8 @@ "pocket_data": [ { "pocket_type": "CONTAINER", - "max_contains_volume": "100 ml", - "max_contains_weight": "230 g", + "max_contains_volume": "111 ml", + "max_contains_weight": "233 g", "max_item_length": "15 cm", "moves": 100, "watertight": true, diff --git a/data/json/items/tool/cooking.json b/data/json/items/tool/cooking.json index b62f40701fe89..2359ecb5d47bb 100644 --- a/data/json/items/tool/cooking.json +++ b/data/json/items/tool/cooking.json @@ -70,46 +70,42 @@ "id": "carver_off", "type": "TOOL", "name": { "str": "electric carver (off)", "str_pl": "electric carvers (off)" }, - "description": "An electric meat carver powered by batteries. It has two serrated blades that vibrate together to slice just about anything from turkey to ham… even zombies!", - "to_hit": { "grip": "solid", "length": "hand", "surface": "line", "balance": "neutral" }, - "weight": "1106 g", + "description": "An electric meat carver powered by cord. It has two serrated blades that vibrate together to slice just about anything from turkey to ham… even zombies!", + "//": "https://www.amazon.com/dp/B07CDR4KFM", + "to_hit": { "grip": "solid", "length": "short", "surface": "line", "balance": "good" }, + "weight": "680 g", "volume": "1500 ml", - "longest_side": "30 cm", - "price": "20 USD", - "price_postapoc": "50 cent", + "longest_side": "482 mm", + "price": "24 USD", + "price_postapoc": "1 cent", "material": [ "steel", "plastic" ], "symbol": "/", "color": "yellow", "ammo": [ "battery" ], - "charges_per_use": 5, - "use_action": { - "type": "effect_on_conditions", - "menu_text": "Turn on", - "effect_on_conditions": [ - { - "id": "EOC_toolweapon_activate__carver", - "effect": { - "run_eoc_with": "EOC_toolweapon_activate", - "variables": { - "turn_cost": "0.8", - "transform_target": "carver_on", - "success_message": { "i18n": true, "str": "The electric carver's serrated blades start buzzing!" }, - "volume": "20", - "failure_message": { "i18n": true, "str": "You pull the trigger, but nothing happens." } + "charges_per_use": 1, + "use_action": [ + { + "type": "effect_on_conditions", + "menu_text": "Turn on", + "effect_on_conditions": [ + { + "id": "EOC_toolweapon_activate__carver", + "effect": { + "run_eoc_with": "EOC_toolweapon_activate", + "variables": { + "turn_cost": "0.8", + "transform_target": "carver_on", + "success_message": { "i18n": true, "str": "The electric carver's serrated blades start buzzing!" }, + "volume": "20", + "failure_message": { "i18n": true, "str": "You pull the trigger, but nothing happens." } + } } } - } - ] - }, - "flags": [ "SHEATH_SWORD", "NONCONDUCTIVE", "WATER_BREAK_ACTIVE" ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_MEDIUM" ], - "default_magazine": "medium_battery_cell" - } + ] + }, + { "type": "link_up", "cable_length": 2, "charge_rate": "120 W" } ], + "flags": [ "SHEATH_SWORD", "NONCONDUCTIVE", "WATER_BREAK_ACTIVE" ], "melee_damage": { "bash": 2, "cut": 8 } }, { @@ -118,21 +114,24 @@ "type": "TOOL", "name": { "str": "electric carver (on)", "str_pl": "electric carvers (on)" }, "description": "This carver is on and the blades are buzzing. Use it to turn it off.", - "power_draw": "150 W", + "power_draw": "120 W", "charges_per_use": 0, "revert_to": "carver_off", "qualities": [ [ "CUT", 2 ], [ "BUTCHER", 25 ] ], - "use_action": { - "type": "effect_on_conditions", - "ammo_scale": 0, - "menu_text": "Turn off", - "effect_on_conditions": [ - { - "id": "EOC_toolweapon_deactivate__carver", - "effect": { "run_eoc_with": "EOC_toolweapon_deactivate", "variables": { "transform_target": "carver_off" } } - } - ] - }, + "use_action": [ + { + "type": "effect_on_conditions", + "ammo_scale": 0, + "menu_text": "Turn off", + "effect_on_conditions": [ + { + "id": "EOC_toolweapon_deactivate__carver", + "effect": { "run_eoc_with": "EOC_toolweapon_deactivate", "variables": { "transform_target": "carver_off" } } + } + ] + }, + { "type": "link_up", "cable_length": 2, "charge_rate": "120 W" } + ], "tick_action": { "type": "effect_on_conditions", "effect_on_conditions": [ @@ -151,7 +150,7 @@ ] }, "flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE", "WATER_BREAK" ], - "melee_damage": { "bash": 2, "cut": 30 } + "melee_damage": { "bash": 2, "cut": 8 } }, { "id": "char_purifier", @@ -538,14 +537,6 @@ "ammo": [ "battery" ], "flags": [ "ALLOWS_REMOTE_USE", "WATER_BREAK" ], "use_action": { "type": "link_up", "cable_length": 4, "charge_rate": "55 W" }, - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_MEDIUM" ], - "default_magazine": "medium_battery_cell" - } - ], "melee_damage": { "bash": 8 } }, { @@ -995,14 +986,6 @@ "ammo": [ "battery" ], "flags": [ "ALLOWS_REMOTE_USE", "WATER_BREAK" ], "use_action": { "type": "link_up", "cable_length": 2, "charge_rate": "110 W" }, - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_MEDIUM" ], - "default_magazine": "medium_battery_cell" - } - ], "melee_damage": { "bash": 8 } }, { @@ -1043,14 +1026,6 @@ "charges_per_use": 14, "use_action": [ "WATER_PURIFIER", { "type": "link_up", "cable_length": 2, "charge_rate": "30 W" } ], "flags": [ "ALLOWS_REMOTE_USE" ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } - ], "melee_damage": { "bash": 2 } }, { diff --git a/data/json/items/tool/electronics.json b/data/json/items/tool/electronics.json index 546d20719c9d8..4a41673396002 100644 --- a/data/json/items/tool/electronics.json +++ b/data/json/items/tool/electronics.json @@ -13,16 +13,10 @@ "color": "yellow", "ammo": [ "battery" ], "flags": [ "WATER_BREAK_ACTIVE", "ELECTRONIC" ], - "charges_per_use": 5, + "charges_per_use": 1, "use_action": [ "CAMERA" ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } - ], + "//": "swappable, but proprietary 80g Li-Ion battery", + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 50 } } ], "melee_damage": { "bash": 1 } }, { @@ -41,26 +35,21 @@ "charges_per_use": 5, "use_action": [ "CAMERA" ], "flags": [ "CAMERA_PRO", "ALWAYS_TWOHAND", "WATER_BREAK_ACTIVE", "ELECTRONIC" ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } - ], + "//": "swappable, but proprietary 160g Li-Ion battery", + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 100 } } ], "melee_damage": { "bash": 1 } }, { "id": "cell_phone", "type": "TOOL", "name": { "str": "cellphone" }, - "description": "A cellphone, an older cousin of the smartphone that is still popular in certain circles due to its reliability, sturdiness, and ability to run on common batteries. Using the phone will turn it on and provide light, assuming it is sufficiently charged. It also tells the time and has an alarm feature.", - "weight": "200 g", - "volume": "150 ml", + "description": "A cellphone, an older cousin of the smartphone that is still popular in certain circles due to its reliability and sturdiness. Using the phone will turn it on and provide light, assuming it is sufficiently charged. It also tells the time and has an alarm feature.", + "//": "Nokia 105 4G, 26g Li-Ion battery", + "weight": "95 g", + "volume": "88 ml", "material": [ { "type": "aluminum", "portion": 75 }, { "type": "plastic", "portion": 25 } ], "price": "90 USD", - "price_postapoc": "1 USD", + "price_postapoc": "15 cent", "symbol": ";", "color": "light_gray", "ammo": [ "battery" ], @@ -74,14 +63,7 @@ "type": "transform" }, "flags": [ "WATCH", "ALARMCLOCK", "WATER_BREAK", "ELECTRONIC" ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } - ] + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 17 } } ] }, { "id": "cell_phone_flashlight", @@ -141,13 +123,14 @@ "type": "TOOL", "name": { "str": "e-ink tablet PC" }, "description": "A tablet PC using an efficient color e-ink display. Before the Cataclysm, these were nifty gadgets; now, it's an almost priceless resource. Runs on conventional batteries.", - "weight": "250 g", - "volume": "250 ml", - "longest_side": "25 cm", - "price": "200 USD", - "price_postapoc": "1 USD", - "to_hit": -1, - "material": [ "plastic" ], + "//": "amazon kindle, LIONX 6300mAh battery 42 ml", + "weight": "158 g", + "volume": "137 ml", + "longest_side": "158 mm", + "price": "85 USD", + "price_postapoc": "10 cent", + "to_hit": { "grip": "bad", "length": "hand", "surface": "line", "balance": "neutral" }, + "material": [ { "type": "aluminum", "portion": 75 }, { "type": "plastic", "portion": 25 } ], "symbol": ";", "color": "blue", "ammo": [ "battery" ], @@ -155,7 +138,6 @@ "use_action": [ "EINKTABLETPC", "ELECTRICSTORAGE", - "EBOOKSAVE", "EBOOKREAD", { "type": "transform", @@ -170,12 +152,7 @@ ], "flags": [ "WATCH", "WATER_BREAK", "ELECTRONIC" ], "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - }, + { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 85 } }, { "pocket_type": "EBOOK", "rigid": true, @@ -195,7 +172,6 @@ "use_action": [ "EINKTABLETPC", "ELECTRICSTORAGE", - "EBOOKSAVE", "EBOOKREAD", { "ammo_scale": 0, @@ -215,12 +191,13 @@ "type": "TOOL", "category": "tools", "name": { "str": "electrohack" }, - "description": "This device has many ports attached, allowing it to connect to almost any control panel or other electronic machine (but not computers). With a little skill, it can be used to crack passwords and more. It requires 5 charges of battery power per use.", + "description": "This device has many ports attached, allowing it to connect to almost any control panel or other electronic machine (but not computers). With a little skill, it can be used to crack passwords and more.", + "//": "hackrf one, + 300 ml for cables and antenna + slot for battery because real hackrf works from usb, not something we can emulate here", "weight": "114 g", - "volume": "500 ml", - "price": "400 USD", - "price_postapoc": "5 USD", - "to_hit": 1, + "volume": "478 ml", + "price": "340 USD", + "price_postapoc": "2 USD", + "to_hit": { "grip": "bad", "length": "hand", "surface": "line", "balance": "uneven" }, "material": [ "plastic", "aluminum" ], "ascii_picture": "electrohack", "symbol": ",", @@ -231,12 +208,12 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" } ], "melee_damage": { "bash": 5 }, - "charges_per_use": 5, + "charges_per_use": 1, "qualities": [ [ "HACK", 2 ] ] }, { @@ -244,10 +221,11 @@ "type": "TOOL", "name": { "str": "geiger counter (off)", "str_pl": "geiger counters (off)" }, "description": "A tool for measuring radiation. Using it will prompt you to choose whether to scan yourself or the terrain, or to turn on continuous scan, which will provide continuous feedback on ambient radiation. It is currently off.", - "weight": "225 g", - "volume": "500 ml", - "price": "150 USD", - "price_postapoc": "10 USD", + "//": "https://www.amazon.com/dp/B0B541D433 but AA instead of 14500", + "weight": "231 g", + "volume": "161 ml", + "price": "68 USD", + "price_postapoc": "20 cent", "material": [ "plastic", "aluminum" ], "symbol": ";", "color": "green", @@ -259,7 +237,7 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], + "flag_restriction": [ "BATTERY_LIGHT" ], "default_magazine": "light_battery_cell" } ], @@ -300,14 +278,7 @@ "charges_per_use": 2400, "use_action": [ "MEASURE_RESONANCE" ], "//": "Battery only, intentionally. Meant for field expeditions to other dimensions where grid power is unavailable. Too advanced for the player to make grid-useable.", - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_MEDIUM", "BATTERY_HEAVY" ], - "default_magazine": "medium_battery_cell" - } - ], + "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "rigid": true, "item_restriction": [ "heavy_atomic_battery_cell" ] } ], "melee_damage": { "bash": 2 } }, { @@ -334,8 +305,8 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" } ], "melee_damage": { "bash": 2 } @@ -360,7 +331,7 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], + "flag_restriction": [ "BATTERY_MEDIUM", "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], "default_magazine": "light_battery_cell" } ] @@ -370,19 +341,21 @@ "type": "TOOL", "category": "tools", "name": { "str": "laptop computer" }, - "description": "A laptop computer with replaceable batteries.", + "description": "A portable computer, ubiquitous tool both before and after the cataclysm. While it is little you can do with it nowadays, mostly from lack of internet, you still can load it with books (or even scan using frontal camera)", + "//": "https://www.amazon.com/dp/B0D6Z664QC, battery is FRANGWAT01", "symbol": ",", "color": "dark_gray", - "material": [ "plastic", "aluminum" ], - "weight": "2721 g", - "volume": "2500 ml", - "longest_side": "40 cm", - "price": "750 USD", + "material": [ { "type": "aluminum", "portion": 75 }, { "type": "plastic", "portion": 25 } ], + "weight": "1319 g", + "volume": "703 ml", + "longest_side": "322 mm", + "price": "1049 USD", "price_postapoc": "2 USD 50 cent", "ammo": [ "battery" ], "charges_per_use": 1, "use_action": [ "EINKTABLETPC", + "EBOOKSAVE", "EBOOKREAD", "ELECTRICSTORAGE", "PORTABLE_GAME", @@ -405,12 +378,7 @@ ], "flags": [ "WATCH", "WATER_BREAK", "ELECTRONIC", "ALLOWS_REMOTE_USE" ], "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_MEDIUM" ], - "default_magazine": "medium_battery_cell" - }, + { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 200 } }, { "pocket_type": "EBOOK", "rigid": true, @@ -430,6 +398,7 @@ "revert_to": "laptop", "use_action": [ "EINKTABLETPC", + "EBOOKSAVE", "EBOOKREAD", "ELECTRICSTORAGE", "PORTABLE_GAME", @@ -457,26 +426,20 @@ "type": "TOOL", "name": { "str": "mp3 player (off)", "str_pl": "mp3 players (off)" }, "description": "This battery-powered device is loaded up with someone's music collection. Fortunately, there's lots of songs you like, and listening to it will raise your morale slightly. Use it to turn it on.", - "weight": "140 g", - "volume": "75 ml", - "price": "30 USD", - "price_postapoc": "1 USD", + "//": "Sony NWE394 Walkman", + "weight": "40 g", + "volume": "36 ml", + "price": "40 USD", + "price_postapoc": "2 cent", "material": [ { "type": "aluminum", "portion": 75 }, { "type": "plastic", "portion": 25 } ], "ascii_picture": "mp3", "symbol": ";", "color": "dark_gray", "ammo": [ "battery" ], - "use_action": [ "MP3", { "type": "link_up", "cable_length": 4, "charge_rate": "5 W" } ], + "use_action": [ "MP3", { "type": "link_up", "cable_length": 2, "charge_rate": "5 W" } ], "charges_per_use": 1, "flags": [ "WATER_BREAK_ACTIVE", "ELECTRONIC" ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } - ] + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 50 } } ] }, { "id": "mp3_on", @@ -487,7 +450,7 @@ "power_draw": "1 W", "revert_to": "mp3", "tick_action": [ "MP3_ON" ], - "use_action": [ "MP3_DEACTIVATE", { "type": "link_up", "cable_length": 4, "charge_rate": "5 W" } ], + "use_action": [ "MP3_DEACTIVATE", { "type": "link_up", "cable_length": 2, "charge_rate": "5 W" } ], "flags": [ "TRADER_AVOID", "WATER_BREAK", "ELECTRONIC" ] }, { @@ -517,7 +480,7 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], + "flag_restriction": [ "BATTERY_HEAVY", "BATTERY_MEDIUM", "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], "default_magazine": "light_battery_cell" } ], @@ -544,7 +507,7 @@ }, { "id": "emf_detector", - "//": "Based off the TRIFIELD EMF Meter Model TF2", + "//": "Based off the TRIFIELD EMF Meter Model TF2. Supposed to use 9volt, but uses medium battery instead", "type": "TOOL", "name": { "str": "EMF detector (off)", "str_pl": "EMF detectors (off)" }, "description": "This device detects and reads out different electromagnetic wave lengths. It beeps with proximity and is sensitive enough you could use it to get a sense of direction.", @@ -552,7 +515,7 @@ "volume": "355 ml", "price": "0 cent", "price_postapoc": "50 cent", - "to_hit": -1, + "to_hit": { "grip": "solid", "length": "hand", "surface": "point", "balance": "neutral" }, "material": [ "plastic", "aluminum" ], "symbol": ";", "color": "yellow", @@ -570,8 +533,8 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" } ], "melee_damage": { "bash": 6 } @@ -583,7 +546,7 @@ "name": { "str": "EMF detector (on)", "str_pl": "EMF detectors (on)" }, "description": "This device detects and reads out different wave lengths. It is currently on, humming and beeping with proximity. It is sensitive enough you could use it to get a sense of direction.", "//": "lasts 12 hours with backlight off", - "power_draw": "6 W", + "power_draw": "1 W", "revert_to": "emf_detector", "use_action": { "type": "transform", @@ -600,43 +563,30 @@ "type": "TOOL", "name": { "str": "handheld game system" }, "description": "A portable video game console, with a backlit screen allowing you to play in the dark. You can use it to play a game, but this requires batteries. Multiple game systems can be linked together for multiplayer games.", - "weight": "200 g", - "volume": "230 ml", - "price": "120 USD", - "price_postapoc": "1 USD", - "material": [ "plastic" ], + "//": "Nintendo Switch", + "weight": "362 g", + "volume": "341 ml", + "price": "292 USD", + "price_postapoc": "3 cent", + "material": [ { "type": "aluminum", "portion": 75 }, { "type": "plastic", "portion": 25 } ], "symbol": ";", "color": "light_gray", "ammo": [ "battery" ], "charges_per_use": 1, "flags": [ "WATER_BREAK", "ELECTRONIC" ], - "use_action": [ - "PORTABLE_GAME", - { - "type": "link_up", - "//": "Based on the Nintendo Switch's power adapter", - "cable_length": 4, - "charge_rate": "39 W" - } - ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } - ] + "use_action": [ "PORTABLE_GAME", { "type": "link_up", "cable_length": 4, "charge_rate": "39 W" } ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 48 } } ] }, { "id": "smart_phone", "type": "TOOL", "name": { "str": "smartphone" }, "description": "A popular, fancy smartphone. Capable of taking photos with its integrated camera and illuminating an area with its flashlight app, assuming it has enough charge. The smartphone also has a clock app that includes an alarm and an app for tracking consumed calories. Runs on a small, rechargeable power cell compatible with a Unified Power Supply.", - "weight": "200 g", - "volume": "100 ml", + "//": "stats from samsung galaxy s24", + "weight": "233 g", + "volume": "111 ml", "longest_side": "15 cm", - "price": "200 USD", + "price": "1299 USD", "price_postapoc": "2 USD", "material": [ { "type": "aluminum", "portion": 75 }, { "type": "plastic", "portion": 25 } ], "looks_like": "cell_phone", @@ -664,7 +614,7 @@ "msg": "You activate the flashlight app.", "menu_text": "Turn on flashlight", "active": true, - "need_charges": 5, + "need_charges": 1, "need_charges_msg": "The smartphone's charge is too low.", "type": "transform" }, @@ -672,7 +622,7 @@ ], "flags": [ "WATCH", "ALARMCLOCK", "USE_UPS", "NO_UNLOAD", "NO_RELOAD", "WATER_BREAK", "CALORIES_INTAKE", "ELECTRONIC" ], "pocket_data": [ - { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 40 } }, + { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 56 } }, { "pocket_type": "EBOOK", "rigid": true, @@ -844,24 +794,24 @@ "type": "TOOL", "name": { "str": "vibrator" }, "description": "This battery-devouring device is just the thing to knead the tension out and help you relax. Use it to take a break and unwind.", - "weight": "453 g", - "volume": "500 ml", - "longest_side": "25 cm", - "price": "55 USD", - "price_postapoc": "1 USD", + "weight": "181 g", + "volume": "327 ml", + "longest_side": "198 mm", + "price": "29 USD", + "price_postapoc": "3 cent", "material": [ "aluminum", "plastic" ], "symbol": ";", "color": "dark_gray", "ammo": [ "battery" ], - "charges_per_use": 10, + "charges_per_use": 1, "use_action": [ "VIBE" ], "flags": [ "WATER_BREAK" ], "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" } ] }, diff --git a/data/json/items/tool/fire.json b/data/json/items/tool/fire.json index cd722db0206ae..edbb0c82313f7 100644 --- a/data/json/items/tool/fire.json +++ b/data/json/items/tool/fire.json @@ -4,22 +4,23 @@ "type": "TOOL", "name": { "str": "electric firestarter" }, "description": "A crudely-made electric firestarter, which can function as an inefficient lighter.", + "//": "ultra light battery seems to not have enough power to generate this amount of heat", "weight": "14 g", "volume": "50 ml", - "price": "1 USD", + "price": "0 USD", "price_postapoc": "10 cent", "material": [ "steel" ], "symbol": ",", "color": "light_gray", "ammo": [ "battery" ], - "charges_per_use": 5, + "charges_per_use": 1, "use_action": { "type": "firestarter" }, "flags": [ "FIRESTARTER" ], "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], + "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_MEDIUM" ], "default_magazine": "light_battery_cell" } ] diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index 0478ed6b8eaeb..90b4ed91a8d89 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -134,10 +134,10 @@ "type": "TOOL", "name": { "str": "electric lantern (off)", "str_pl": "electric lanterns (off)" }, "description": "A battery-powered lamp. It does not provide much light, but it lasts a long time.", - "weight": "980 g", - "volume": "1 L", - "price": "10 USD", - "price_postapoc": "1 USD", + "weight": "550 g", + "volume": "1527 ml", + "price": "68 USD", + "price_postapoc": "20 cent", "material": [ "plastic" ], "symbol": ";", "color": "green", @@ -155,14 +155,7 @@ { "type": "link_up", "cable_length": 2, "charge_rate": "20 W" } ], "flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "ALLOWS_REMOTE_USE", "WATER_BREAK" ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_minus_battery_cell" - } - ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 58 } } ], "melee_damage": { "bash": 1 } }, { @@ -189,14 +182,15 @@ "type": "TOOL", "name": { "str": "flashlight (off)", "str_pl": "flashlights (off)" }, "description": "A typical household flashlight with a plastic handle, powered by batteries.", + "//": "https://www.amazon.com/dp/B0CFLGMKQM", "material": [ "plastic", "aluminum" ], "symbol": ";", "color": "blue", - "weight": "280 g", - "volume": "270 ml", - "longest_side": "14 cm", - "price": "5 USD", - "price_postapoc": "1 USD", + "weight": "140 g", + "volume": "121 ml", + "longest_side": "136 mm", + "price": "9 USD", + "price_postapoc": "15 cent", "charges_per_use": 1, "ammo": [ "battery" ], "flags": [ "BELT_CLIP", "WATER_BREAK_ACTIVE", "HELMET_HEAD_ATTACHMENT", "HEAD_STRAP_MOUNT" ], @@ -212,8 +206,8 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" } ] }, @@ -222,7 +216,7 @@ "copy-from": "flashlight", "type": "TOOL", "name": { "str": "flashlight (on)", "str_pl": "flashlights (on)" }, - "power_draw": "10 W", + "power_draw": "1560 mW", "revert_to": "flashlight", "use_action": { "menu_text": "Turn off", @@ -238,7 +232,7 @@ "type": "TOOL", "name": { "str": "mini diving flashlight (off)", "str_pl": "mini diving flashlights (off)" }, "description": "A small waterproof flashlight with an aluminum handle, powered by batteries. Can be attached to some diving masks and hoods.", - "//": "Based on this: https://www.amazon.com/ORCATORCH-Underwater-Rotatable-Batteries-Included/dp/B07BDKRFJG?th=1", + "//": "Based on this: https://www.amazon.com/dp/B07BDKRFJG; Sinlge 18650 instead of two AAs", "material": [ "plastic", "aluminum" ], "looks_like": "flashlight", "symbol": ";", @@ -263,8 +257,8 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" } ] }, @@ -290,7 +284,7 @@ "type": "TOOL", "name": { "str": "high-power mini diving flashlight (off)", "str_pl": "high-power mini diving flashlights (off)" }, "description": "A small waterproof high-power flashlight with an aluminum handle, powered by batteries. Can be attached to some diving masks and hoods.", - "//": "Based on this: https://www.amazon.com/RAYVENGE-Headlamp-Underwater-Flashlight-Stainless/dp/B0BD6GVJH2", + "//": "Based on this: https://www.amazon.com/dp/B0BD6GVJH2", "material": [ "plastic", "aluminum", "lc_steel" ], "looks_like": "flashlight", "symbol": ";", @@ -315,7 +309,7 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], + "flag_restriction": [ "BATTERY_LIGHT" ], "default_magazine": "light_battery_cell" } ] @@ -342,7 +336,7 @@ "type": "TOOL", "name": { "str": "high-power mini diving flashlight (off)", "str_pl": "high-power mini diving flashlights (off)" }, "description": "A waterproof variable power flashlight with a plastic handle, powered by batteries. Can be attached to some diving masks and hoods and onto a proprietary wrist mount.", - "//": "Based on this: https://www.amazon.com/Aqualite-Tauchlampe-schwarz-Lumen-12516/dp/B00DI5GMOM", + "//": "Based on this: https://www.amazon.com/dp/B00DI5GMOM", "material": [ "plastic" ], "looks_like": "flashlight", "symbol": ";", @@ -372,14 +366,7 @@ "charge_rate": "20 W" } ], - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } - ] + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 35 } } ] }, { "id": "diving_flashlight_variable_on_hi", @@ -623,34 +610,35 @@ "id": "heavy_flashlight", "type": "TOOL", "name": { "str": "heavy-duty flashlight (off)", "str_pl": "heavy-duty flashlights (off)" }, - "description": "A heavy-duty aluminum LED flashlight, often used by security guards. It even works underwater, and it's not bad for smacking hooligans.", - "weight": "450 g", - "volume": "470 ml", - "longest_side": "37 cm", - "price": "9 USD 50 cent", - "price_postapoc": "2 USD", + "description": "A heavy-duty aluminum LED flashlight, often used by security guards. It even works underwater, and it's not bad for smacking hooligans. It also has a shoulder strap on it's handle, for easier transportation.", + "//": "https://www.amazon.com/dp/B00Y8AHZYC, todo add low brightness mode", + "//2": "volume is average between cylinder volume (without handle) and entire unit as rectangular. Should be fine since handle is big and hollow, and it can be strapped anyway.", + "weight": "720 g", + "volume": "4267 ml", + "longest_side": "25 cm", + "price": "46 USD", + "price_postapoc": "15 cent", "material": [ "aluminum" ], "symbol": ";", "color": "blue", "charges_per_use": 1, "ammo": [ "battery" ], - "flags": [ "BELT_CLIP" ], - "use_action": { - "type": "transform", - "msg": "You turn the heavy-duty flashlight on.", - "target": "heavy_flashlight_on", - "active": true, - "need_charges": 1, - "need_charges_msg": "The heavy-duty flashlight's batteries are dead." + "armor_data": { + "armor": [ { "covers": [ "torso" ], "coverage": 5, "encumbrance": 2, "specifically_covers": [ "torso_hanging_front" ] } ] }, - "pocket_data": [ + "flags": [ "BELT_CLIP", "BELTED" ], + "use_action": [ { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } + "type": "transform", + "msg": "You turn the heavy-duty flashlight on.", + "target": "heavy_flashlight_on", + "active": true, + "need_charges": 1, + "need_charges_msg": "The heavy-duty flashlight's battery is dead." + }, + { "type": "link_up", "cable_length": 3, "charge_rate": "20 W" } ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 48 } } ], "melee_damage": { "bash": 8 } }, { @@ -658,72 +646,59 @@ "copy-from": "heavy_flashlight", "type": "TOOL", "name": { "str": "heavy-duty flashlight (on)", "str_pl": "heavy-duty flashlights (on)" }, - "power_draw": "15 W", + "power_draw": "6 W", "revert_to": "heavy_flashlight", - "use_action": { - "ammo_scale": 0, - "menu_text": "Turn off", - "type": "transform", - "msg": "You turn the heavy-duty flashlight off.", - "target": "heavy_flashlight" - }, - "flags": [ "LIGHT_500", "CHARGEDIM", "BELT_CLIP" ] - }, - { - "abstract": "lightstrip_base", - "type": "TOOL", - "name": { "str": "lightstrip base" }, - "weight": "27 g", - "volume": "50 ml", - "price": "5 USD", - "price_postapoc": "25 cent", - "material": [ "plastic", "aluminum" ], - "symbol": ";", - "melee_damage": { "bash": 1 } + "use_action": [ + { + "ammo_scale": 0, + "menu_text": "Turn off", + "type": "transform", + "msg": "You turn the heavy-duty flashlight off.", + "target": "heavy_flashlight" + }, + { "type": "link_up", "cable_length": 3, "charge_rate": "20 W" } + ], + "flags": [ "LIGHT_500", "CHARGEDIM", "BELT_CLIP", "BELTED" ] }, { "id": "lightstrip", "type": "TOOL", - "name": { "str": "lightstrip" }, - "copy-from": "lightstrip_base", - "description": "A light-emitting circuit that has been wired directly to a battery. It provides some weak light and can't be turned off until the battery dies.", + "name": { "str": "LED strip" }, + "copy-from": "lightstrip_inactive", "color": "green", - "power_draw": "1 W", + "symbol": ";", + "power_draw": "5 W", "revert_to": "lightstrip_inactive", - "revert_msg": "The lightstrip dies.", - "flags": [ "LIGHT_4", "NO_UNLOAD", "NO_RELOAD", "WATER_BREAK" ], - "pocket_data": [ + "revert_msg": "The LED strip fades away.", + "flags": [ "LIGHT_200", "NO_UNLOAD", "NO_RELOAD", "WATER_BREAK" ], + "use_action": [ { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } + "target": "lightstrip_inactive", + "msg": "You turn off the LED strip.", + "active": true, + "need_charges": 1, + "type": "transform" + }, + { "type": "link_up", "cable_length": 10, "charge_rate": "5 W" } ] }, { - "//": "This doesn't make too much sense, flavor-wise, but it's the best I can come up with. Put it on the todo list.", "id": "lightstrip_inactive", "type": "TOOL", - "name": { "str": "lightstrip (inactive)", "str_pl": "lightstrips (inactive)" }, - "copy-from": "lightstrip_base", - "description": "A light-emitting circuit that can be wired directly to a battery. It provides some weak light and can't be turned off until the battery dies.", + "name": { "str": "LED strip (inactive)", "str_pl": "LED strips (inactive)" }, + "description": "25 feet of colorful LED strip, that are often used as house lights or on some holidays.", + "weight": "158 g", + "volume": "70 ml", + "price": "10 USD", + "price_postapoc": "2 cent", + "symbol": ";", + "material": [ { "type": "plastic", "portion": 1 }, { "type": "aluminum", "portion": 9 } ], "color": "white", "ammo": [ "battery" ], - "use_action": { - "target": "lightstrip", - "msg": "You irreversibly activate the lightstrip.", - "active": true, - "need_charges": 1, - "type": "transform" - }, - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } + "//": "25 feet (7.5 m) + 1.5 meters for plug", + "use_action": [ + { "target": "lightstrip", "msg": "You turn on the LED strip.", "active": true, "need_charges": 1, "type": "transform" }, + { "type": "link_up", "cable_length": 9, "charge_rate": "5 W" } ] }, { @@ -864,10 +839,11 @@ "type": "TOOL", "name": { "str": "reading light" }, "description": "A little clip-on LED light, meant for reading books in the dark.", - "weight": "90 g", - "volume": "100 ml", - "price": "1 USD", - "price_postapoc": "1 USD", + "//": "https://www.amazon.com/dp/B08GG42WXY", + "weight": "64 g", + "volume": "150 ml", + "price": "24 USD", + "price_postapoc": "1 cent", "material": [ "plastic", "aluminum" ], "symbol": ";", "color": "white", @@ -882,14 +858,7 @@ "need_charges_msg": "The reading light winks out.", "type": "transform" }, - "pocket_data": [ - { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_minus_disposable_cell" - } - ] + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 13 } } ] }, { "id": "reading_light_on", @@ -897,7 +866,7 @@ "type": "TOOL", "name": { "str": "reading light (active)", "str_pl": "reading lights (active)" }, "description": "A little clip-on LED light, meant for reading books in the dark. This one is turned on.", - "power_draw": "1 W", + "power_draw": "46 mW", "revert_to": "reading_light", "use_action": { "ammo_scale": 0, @@ -913,33 +882,30 @@ "type": "TOOL", "name": { "str": "smart lamp (off)", "str_pl": "smart lamps (off)" }, "description": "A smart lamp that can be activated remotely.", - "weight": "400 g", - "volume": "500 ml", - "price": "5 USD", - "price_postapoc": "1 USD", - "to_hit": -1, + "//": "https://www.amazon.com/dp/B0CM3RKR5Z", + "weight": "297 g", + "volume": "1851 ml", + "price": "30 USD", + "price_postapoc": "1 cent", + "to_hit": { "grip": "bad", "length": "hand", "surface": "any", "balance": "uneven" }, "material": [ "plastic", "aluminum" ], "symbol": "&", "color": "blue", "ammo": [ "battery" ], "charges_per_use": 1, - "use_action": { - "target": "smart_lamp_on", - "msg": "You turn the smart lamp on.", - "active": true, - "need_charges": 1, - "need_charges_msg": "The smart lamp batteries are dead.", - "type": "transform" - }, - "flags": [ "ALLOWS_REMOTE_USE", "RADIO_ACTIVATION", "RADIO_INVOKE_PROC", "RADIOSIGNAL_2", "WATER_BREAK", "ELECTRONIC" ], - "pocket_data": [ + "use_action": [ { - "pocket_type": "MAGAZINE_WELL", - "rigid": true, - "flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ], - "default_magazine": "light_battery_cell" - } + "target": "smart_lamp_on", + "msg": "You turn the smart lamp on.", + "active": true, + "need_charges": 1, + "need_charges_msg": "The smart lamp batteries are dead.", + "type": "transform" + }, + { "type": "link_up", "cable_length": 3, "charge_rate": "6 W" } ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 33 } } ], + "flags": [ "ALLOWS_REMOTE_USE", "RADIO_ACTIVATION", "RADIO_INVOKE_PROC", "RADIOSIGNAL_2", "WATER_BREAK", "ELECTRONIC" ], "melee_damage": { "bash": 1 } }, { @@ -948,7 +914,7 @@ "type": "TOOL", "name": { "str": "smart lamp (on)", "str_pl": "smart lamps (on)" }, "description": "A smart lamp which can be deactivated remotely. Currently it is turned on.", - "power_draw": "10 W", + "power_draw": "1321 mW", "revert_to": "smart_lamp", "use_action": { "ammo_scale": 0, diff --git a/data/json/npcs/refugee_center/surface_refugees/NPC_Pablo_Nunez.json b/data/json/npcs/refugee_center/surface_refugees/NPC_Pablo_Nunez.json index e07093156211d..9c84d87b0e623 100644 --- a/data/json/npcs/refugee_center/surface_refugees/NPC_Pablo_Nunez.json +++ b/data/json/npcs/refugee_center/surface_refugees/NPC_Pablo_Nunez.json @@ -74,7 +74,7 @@ "type": "item_group", "id": "REFUGEE_Pablo_wield", "subtype": "collection", - "entries": [ { "item": "heavy_flashlight", "ammo-item": "battery", "charges": 200 } ] + "entries": [ { "item": "heavy_flashlight", "charges": 200 } ] }, { "type": "talk_topic", diff --git a/data/json/professions.json b/data/json/professions.json index 50bebec3c64bf..641ac245831b9 100644 --- a/data/json/professions.json +++ b/data/json/professions.json @@ -96,13 +96,13 @@ "type": "item_group", "subtype": "collection", "id": "charged_cell_phone", - "entries": [ { "item": "light_battery_cell", "ammo-item": "battery", "charges": 150, "container-item": "cell_phone" } ] + "entries": [ { "item": "cell_phone", "charges": 150 } ] }, { "type": "item_group", "subtype": "collection", "id": "charged_laptop", - "entries": [ { "item": "medium_battery_cell", "ammo-item": "battery", "charges": 600, "container-item": "laptop" } ] + "entries": [ { "item": "laptop", "charges": 600 } ] }, { "type": "item_group", @@ -131,19 +131,19 @@ "type": "item_group", "subtype": "collection", "id": "charged_flashlight", - "entries": [ { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "flashlight" } ] + "entries": [ { "item": "flashlight", "charges": 300 } ] }, { "type": "item_group", "subtype": "collection", "id": "charged_heavy_flashlight", - "entries": [ { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "heavy_flashlight" } ] + "entries": [ { "item": "heavy_flashlight", "charges": 300 } ] }, { "type": "item_group", "subtype": "collection", "id": "charged_mp3", - "entries": [ { "item": "light_battery_cell", "ammo-item": "battery", "charges": 150, "container-item": "mp3" } ] + "entries": [ { "item": "mp3", "charges": 150 } ] }, { "type": "item_group", @@ -3746,7 +3746,7 @@ { "item": "caff_gum", "count": 3 }, { "item": "memory_card" }, { "item": "usb_drive" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 150, "container-item": "portable_game" }, + { "item": "portable_game", "charges": 150 }, { "item": "pants", "variant": "pants_stone" }, { "group": "charged_smart_phone" }, { "group": "starter_wallet_full" }, @@ -4142,7 +4142,7 @@ { "item": "cheeseburger" }, { "group": "charged_smart_phone" }, { "group": "starter_wallet_full" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 150, "container-item": "eink_tablet_pc" }, + { "item": "eink_tablet_pc", "charges": 150 }, { "item": "light_minus_battery_cell", "ammo-item": "battery", @@ -5640,7 +5640,7 @@ { "item": "camera_bag" }, { "group": "charged_smart_phone" }, { "group": "starter_wallet_full" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "camera_pro" }, + { "item": "camera_pro", "charges": 300 }, { "item": "pants", "variant": "pants_black" } ] }, @@ -5797,7 +5797,7 @@ { "item": "wristwatch" }, { "group": "charged_smart_phone" }, { "group": "starter_rich_wallet_full" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "camera" }, + { "item": "camera", "charges": 300 }, { "item": "tshirt", "variant": "generic_tshirt" }, { "item": "tshirt_cropped" }, { "item": "pants", "variant": "pants_black" } @@ -6963,8 +6963,8 @@ "container-item": "rad_monitor" }, { "item": "light_battery_cell", "ammo-item": "battery", "charges": 100, "container-item": "radio" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 100, "container-item": "camera_pro" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 100, "container-item": "emf_detector" } + { "item": "camera_pro", "charges": 300 }, + { "item": "emf_detector", "charges": 100 } ] }, "male": { "entries": [ { "item": "boxer_shorts" } ] }, @@ -7539,7 +7539,7 @@ { "group": "charged_smart_phone" }, { "group": "starter_wallet_full" }, { "item": "pants", "variant": "pants_black" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "camera_pro" }, + { "item": "camera_pro", "charges": 300 }, { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "wearable_light" } ] }, diff --git a/data/json/uncraft/recipe_deconstruction.json b/data/json/uncraft/recipe_deconstruction.json index de4741d1ababf..179d76c8f8bcc 100644 --- a/data/json/uncraft/recipe_deconstruction.json +++ b/data/json/uncraft/recipe_deconstruction.json @@ -3123,7 +3123,8 @@ [ [ "amplifier", 1 ] ], [ [ "power_supply", 1 ] ], [ [ "plastic_chunk", 6 ] ], - [ [ "small_lcd_screen", 1 ] ] + [ [ "small_lcd_screen", 1 ] ], + [ [ "medium_battery_cell", 4 ] ] ] }, { diff --git a/data/mods/Aftershock/itemgroups/spaceship_groups.json b/data/mods/Aftershock/itemgroups/spaceship_groups.json index 0ebf968b54bb9..2efcbfd05f2f4 100644 --- a/data/mods/Aftershock/itemgroups/spaceship_groups.json +++ b/data/mods/Aftershock/itemgroups/spaceship_groups.json @@ -13,8 +13,8 @@ { "item": "water_clean", "container-item": "bottle_twoliter", "count": 3 }, { "count": 3, "group": "afs_escapepod_ration_bag_plastic_4" }, { "item": "cream_prot_cold", "count": 3 }, - { "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" }, - { "item": "light_battery_cell", "charges": 150, "container-item": "water_purifier" }, + { "item": "flashlight", "charges": 150 }, + { "item": "water_purifier" }, { "item": "medium_battery_cell", "ammo-item": "battery", "charges": 600, "container-item": "multi_cooker" }, { "item": "rope_6" }, { "item": "emer_blanket", "count": 2 }, diff --git a/data/mods/Isolation-Protocol/Player/profession.json b/data/mods/Isolation-Protocol/Player/profession.json index c16f8548dd6cb..f3ebdfce87c53 100644 --- a/data/mods/Isolation-Protocol/Player/profession.json +++ b/data/mods/Isolation-Protocol/Player/profession.json @@ -89,9 +89,9 @@ { "item": "caff_gum" }, { "item": "memory_card" }, { "item": "usb_drive" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 150, "container-item": "electrohack" }, + { "item": "electrohack", "charges": 150 }, { "item": "light_battery_cell", "ammo-item": "battery", "charges": 150, "container-item": "noise_emitter" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 150, "container-item": "camera" }, + { "item": "camera", "charges": 150 }, { "group": "charged_smart_phone" }, { "group": "charged_laptop" } ] diff --git a/data/mods/TEST_DATA/expected_dps_data/axes_dps.json b/data/mods/TEST_DATA/expected_dps_data/axes_dps.json index 047847873e93f..92e3dedbb8641 100644 --- a/data/mods/TEST_DATA/expected_dps_data/axes_dps.json +++ b/data/mods/TEST_DATA/expected_dps_data/axes_dps.json @@ -20,7 +20,7 @@ "hatchet": 18.0, "crash_axe": 18.0, "lc_battleaxe": 18.11, - "carver_on": 15.41, + "carver_on": 5.05, "mc_battleaxe": 24.53, "hc_battleaxe": 29.72, "ch_battleaxe": 30.49, diff --git a/data/mods/TEST_DATA/expected_dps_data/clubs_dps.json b/data/mods/TEST_DATA/expected_dps_data/clubs_dps.json index 93bd40752753c..0222f3869e2f4 100644 --- a/data/mods/TEST_DATA/expected_dps_data/clubs_dps.json +++ b/data/mods/TEST_DATA/expected_dps_data/clubs_dps.json @@ -12,7 +12,6 @@ "rebar": 7.0, "primitive_shovel": 5.47, "makeshift_cane": 7.1, - "heavy_flashlight": 5.84, "wrench": 6.29, "glass_macuahuitl": 8.2, "sword_wood": 8.5, diff --git a/data/mods/TEST_DATA/expected_dps_data/junk_dps.json b/data/mods/TEST_DATA/expected_dps_data/junk_dps.json index ff3ea4f42f29f..c0d013764a514 100644 --- a/data/mods/TEST_DATA/expected_dps_data/junk_dps.json +++ b/data/mods/TEST_DATA/expected_dps_data/junk_dps.json @@ -64,7 +64,6 @@ "bipod_mod": 7.69, "bipod": 7.69, "bipod_handguard_deployed": 7.69, - "heavy_flashlight_on": 5.84, "wizard_cane": 7.86, "wizard_cane_on": 7.86, "modern_handguard": 7.94, diff --git a/data/mods/TEST_DATA/legacy_to_hit.json b/data/mods/TEST_DATA/legacy_to_hit.json index eb9fe77c5faff..b4ac9b26d6102 100644 --- a/data/mods/TEST_DATA/legacy_to_hit.json +++ b/data/mods/TEST_DATA/legacy_to_hit.json @@ -387,7 +387,6 @@ "dynamite_bomb", "e_handcuffs", "earthworm", - "eink_tablet_pc", "elbow_pads", "elec_chainsaw_off", "elec_chainsaw_on", @@ -396,10 +395,8 @@ "electric_blanket", "electric_masonrysaw_off", "electric_masonrysaw_on", - "electrohack", "electrolyzer_makeshift", "electronics_controls", - "emf_detector", "emp_frond", "emp_gun", "engineering_engine_kit", @@ -980,7 +977,6 @@ "small_printout_portal_storm_data", "small_scuba_tank", "small_scuba_tank_on", - "smart_lamp", "smart_watch", "smg_40", "smg_45", diff --git a/data/mods/TEST_DATA/vehicle_efficiency_test.json b/data/mods/TEST_DATA/vehicle_efficiency_test.json index 4820f1f3e3dbf..1617f3f430855 100644 --- a/data/mods/TEST_DATA/vehicle_efficiency_test.json +++ b/data/mods/TEST_DATA/vehicle_efficiency_test.json @@ -10,7 +10,7 @@ "fire_engine": { "forward": [ 2100450, 2051000, 2051000, 447892, 447892 ], "reverse": [ 2100450, 254700, 254700, 189000, 189000 ] }, "motorcycle": { "forward": [ 157935, 133200, 112200, 68030, 55620 ], "reverse": [ 157935, 21230, 19620, 16300, 15350 ] }, "car_sports": { "forward": [ 1006190, 665500, 483000, 44490, 31712 ], "reverse": [ 1006190, 667700, 484600, 42877, 28849 ] }, - "ambulance": { "forward": [ 1718761, 581126, 494600, 92170, 74550 ], "reverse": [ 1718761, 54450, 54030, 41110, 39970 ] }, + "ambulance": { "forward": [ 1718621, 581126, 494600, 92170, 74550 ], "reverse": [ 1718621, 54450, 54030, 41110, 39970 ] }, "superbike": { "forward": [ 232935, 126400, 73470, 45480, 26130 ], "reverse": [ 232935, 19660, 11160, 13860, 8875 ] }, "electric_car": { "forward": [ 676949, 209900, 192700, 17800, 15810 ], "reverse": [ 676949, 210200, 193000, 17830, 15850 ] }, "test_beetle": { "forward": [ 711045, 499600, 434400, 116300, 95800 ], "reverse": [ 711045, 60380, 60270, 47140, 45680 ] }, diff --git a/data/mods/Xedra_Evolved/player/professions.json b/data/mods/Xedra_Evolved/player/professions.json index 5a529176373ab..3284c4b231842 100644 --- a/data/mods/Xedra_Evolved/player/professions.json +++ b/data/mods/Xedra_Evolved/player/professions.json @@ -128,7 +128,7 @@ { "item": "pants_cargo" }, { "group": "charged_smart_phone" }, { "item": "tshirt", "variant": "generic_tshirt" }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "camera_pro" } + { "item": "camera_pro", "charges": 300 } ] }, "male": { "entries": [ { "item": "briefs" }, { "item": "socks" } ] }, diff --git a/tests/battery_mod_test.cpp b/tests/battery_mod_test.cpp index b339ad139513b..1572cbfc3b694 100644 --- a/tests/battery_mod_test.cpp +++ b/tests/battery_mod_test.cpp @@ -93,7 +93,7 @@ TEST_CASE( "battery_tool_mod_test", "[battery][mod]" ) } GIVEN( "tool compatible with light batteries" ) { - item flashlight( "flashlight" ); + item flashlight( "diving_flashlight_small_hipower" ); REQUIRE( flashlight.is_reloadable() ); REQUIRE( flashlight.can_reload_with( item( itype_light_battery_cell ), true ) ); @@ -111,7 +111,7 @@ TEST_CASE( "battery_tool_mod_test", "[battery][mod]" ) CHECK_FALSE( flashlight.toolmods().empty() ); CHECK_FALSE( flashlight.get_contents().magazine_flag_restrictions().empty() ); - CHECK( flashlight.tname() == "flashlight (off)+1" ); + CHECK( flashlight.tname() == "high-power mini diving flashlight (off)+1" ); } THEN( "tool contents remain empty unless you count the mod" ) { @@ -210,7 +210,7 @@ TEST_CASE( "battery_tool_mod_test", "[battery][mod]" ) TEST_CASE( "battery_and_tool_properties", "[battery][tool][properties]" ) { const item bat_cell( "light_battery_cell" ); - const item flashlight( "flashlight" ); + const item flashlight( "diving_flashlight_small_hipower" ); SECTION( "battery cell" ) { SECTION( "is a magazine" ) { @@ -305,7 +305,7 @@ TEST_CASE( "battery_and_tool_properties", "[battery][tool][properties]" ) TEST_CASE( "installing_battery_in_tool", "[battery][tool][install]" ) { item bat_cell( "light_battery_cell" ); - item flashlight( "flashlight" ); + item flashlight( "diving_flashlight_small_hipower" ); const int bat_charges = bat_cell.ammo_capacity( ammo_battery ); REQUIRE( bat_charges > 0 ); diff --git a/tests/item_autopickup_test.cpp b/tests/item_autopickup_test.cpp index 9d0bcaa9e1154..c39794440e781 100644 --- a/tests/item_autopickup_test.cpp +++ b/tests/item_autopickup_test.cpp @@ -24,7 +24,7 @@ static const itype_id itype_candycigarette( "candycigarette" ); static const itype_id itype_cig( "cig" ); static const itype_id itype_codeine( "codeine" ); static const itype_id itype_corpse( "corpse" ); -static const itype_id itype_flashlight( "flashlight" ); +static const itype_id itype_diving_flashlight_small_hipower( "diving_flashlight_small_hipower" ); static const itype_id itype_light_battery_cell( "light_battery_cell" ); static const itype_id itype_marble( "marble" ); static const itype_id itype_meat_canned( "meat_canned" ); @@ -287,7 +287,7 @@ TEST_CASE( "auto_pickup_should_improve_your_life", "[autopickup][item]" ) // flashlight > light battery (WL) WHEN( "there is a powered tool on the ground loaded with a light battery whitelisted in auto-pickup rules" ) { - item item_flashlight = item( itype_flashlight ); + item item_flashlight = item( itype_diving_flashlight_small_hipower ); item *item_light_battery = &here.add_item( ground, item( itype_light_battery_cell ) ); REQUIRE_FALSE( item_light_battery->is_null() ); diff --git a/tests/iuse_actor_test.cpp b/tests/iuse_actor_test.cpp index 82a1da741c675..c65f9398a5c05 100644 --- a/tests/iuse_actor_test.cpp +++ b/tests/iuse_actor_test.cpp @@ -34,7 +34,7 @@ static const ammotype ammo_battery( "battery" ); static const itype_id itype_bot_manhack( "bot_manhack" ); -static const itype_id itype_light_battery_cell( "light_battery_cell" ); +static const itype_id itype_medium_battery_cell( "medium_battery_cell" ); static const mtype_id mon_manhack( "mon_manhack" ); @@ -89,8 +89,8 @@ TEST_CASE( "tool_transform_when_activated", "[iuse][tool][transform]" ) GIVEN( "flashlight with a charged battery installed" ) { item flashlight( "flashlight" ); - item bat_cell( "light_battery_cell" ); - REQUIRE( flashlight.can_reload_with( item( itype_light_battery_cell ), true ) ); + item bat_cell( "medium_battery_cell" ); + REQUIRE( flashlight.can_reload_with( item( itype_medium_battery_cell ), true ) ); // Charge the battery const int bat_charges = bat_cell.ammo_capacity( ammo_battery );