From e525f2ef064d919bbd653f52664802a3a0854939 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 15:32:29 +0100 Subject: [PATCH 01/13] adjust headlamp to match flashlight --- data/json/items/tool_armor.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index a7acd1810936c..3a50f3f3d5496 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -873,12 +873,13 @@ "color": "blue", "name": { "str": "headlamp" }, "description": "An LED headlamp with an adjustable strap so as to be comfortably worn on your head or attached to your helmet. Use it to turn it on.", - "price": "40 USD", + "//":"reference: https://www.rei.com/product/202772/black-diamond-astro-300-headlamp", + "price": "20 USD", "price_postapoc": "1 USD", "material": [ "plastic", "aluminum" ], "flags": [ "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS" ], - "weight": "520 g", - "volume": "500 ml", + "weight": "150 g", + "volume": "150 ml", "charges_per_use": 1, "ammo": "battery", "use_action": { @@ -894,8 +895,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" } ], "armor": [ { "coverage": 45, "covers": [ "head" ], "specifically_covers": [ "head_crown", "head_forehead" ] } ], @@ -960,7 +961,7 @@ "name": { "str": "headlamp (on)", "str_pl": "headlamps (on)" }, "description": "An LED headlamp with an adjustable strap so as to be comfortably worn on your head or attached to your helmet. It is turned on, and continually draining batteries. Use it to turn it off.", "flags": [ "LIGHT_300", "CHARGEDIM", "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS", "TRADER_AVOID" ], - "power_draw": "10 W", + "power_draw": "1560 mW", "revert_to": "wearable_light", "use_action": { "ammo_scale": 0, From 6158a91939ded405e49e0087c28d8f08bde43f36 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 15:56:59 +0100 Subject: [PATCH 02/13] add longest side --- data/json/items/tool_armor.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 3a50f3f3d5496..a2e7374992ed9 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -880,6 +880,7 @@ "flags": [ "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS" ], "weight": "150 g", "volume": "150 ml", + "longest_side": "136 mm", "charges_per_use": 1, "ammo": "battery", "use_action": { From 106b8d17b70804f787123bf621be8c01481a7afb Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 16:04:47 +0100 Subject: [PATCH 03/13] add same for big headlight, adjust weight and dimensions --- data/json/items/tool_armor.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index a2e7374992ed9..59322f63c3dea 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -879,7 +879,7 @@ "material": [ "plastic", "aluminum" ], "flags": [ "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS" ], "weight": "150 g", - "volume": "150 ml", + "volume": "141 ml", "longest_side": "136 mm", "charges_per_use": 1, "ammo": "battery", @@ -979,7 +979,7 @@ "name": { "str": "heavy-duty headlamp (on)", "str_pl": "heavy-duty headlamps (on)" }, "description": "A large and unwieldy homemade headlamp with an overpowered LED array and adjustable strap so as to be worn on your head or attached to your helmet while being as comfortable as possible. It is turned on, and continually draining batteries. Use it to turn it off.", "flags": [ "LIGHT_500", "CHARGEDIM", "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS", "TRADER_AVOID" ], - "power_draw": "15 W", + "power_draw": "6 W", "revert_to": "wearable_big_light", "use_action": { "ammo_scale": 0, @@ -1001,8 +1001,9 @@ "price_postapoc": "2 USD", "material": [ "plastic", "aluminum" ], "flags": [ "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS" ], - "weight": "830 g", - "volume": "750 ml", + "weight": "740 g", + "volume": "4287 ml", + "longest_side": "25 cm", "charges_per_use": 1, "ammo": "battery", "use_action": { From 9400ee302a61633ec9d79fdb8e24469d3bf69b36 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 17:23:32 +0100 Subject: [PATCH 04/13] adjust power draw of heavy flashlight --- data/json/items/tool/lighting.json | 2 +- data/json/items/tool_armor.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index 11ca0af149184..cda02c9b4ce4c 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -673,7 +673,7 @@ "copy-from": "heavy_flashlight", "type": "TOOL", "name": { "str": "heavy-duty flashlight (on)", "str_pl": "heavy-duty flashlights (on)" }, - "power_draw": "6 W", + "power_draw": "2600 mW", "revert_to": "heavy_flashlight", "use_action": [ { diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 59322f63c3dea..8de5bc57c0cb3 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -979,7 +979,7 @@ "name": { "str": "heavy-duty headlamp (on)", "str_pl": "heavy-duty headlamps (on)" }, "description": "A large and unwieldy homemade headlamp with an overpowered LED array and adjustable strap so as to be worn on your head or attached to your helmet while being as comfortable as possible. It is turned on, and continually draining batteries. Use it to turn it off.", "flags": [ "LIGHT_500", "CHARGEDIM", "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS", "TRADER_AVOID" ], - "power_draw": "6 W", + "power_draw": "2600 mW", "revert_to": "wearable_big_light", "use_action": { "ammo_scale": 0, From 05688151e909df16045eee79c493c97de1ed6c98 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 19:18:06 +0100 Subject: [PATCH 05/13] do heavy flashlight in other PR --- data/json/items/tool_armor.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 8de5bc57c0cb3..63a4f0fb0f883 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -979,7 +979,7 @@ "name": { "str": "heavy-duty headlamp (on)", "str_pl": "heavy-duty headlamps (on)" }, "description": "A large and unwieldy homemade headlamp with an overpowered LED array and adjustable strap so as to be worn on your head or attached to your helmet while being as comfortable as possible. It is turned on, and continually draining batteries. Use it to turn it off.", "flags": [ "LIGHT_500", "CHARGEDIM", "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS", "TRADER_AVOID" ], - "power_draw": "2600 mW", + "power_draw": "15 W", "revert_to": "wearable_big_light", "use_action": { "ammo_scale": 0, @@ -1001,9 +1001,8 @@ "price_postapoc": "2 USD", "material": [ "plastic", "aluminum" ], "flags": [ "OVERSIZE", "BELTED", "PADDED", "ALLOWS_NATURAL_ATTACKS" ], - "weight": "740 g", - "volume": "4287 ml", - "longest_side": "25 cm", + "weight": "830 g", + "volume": "750 ml", "charges_per_use": 1, "ammo": "battery", "use_action": { From c52c3b8350e36387edb830094ef866967836a76b Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 20:27:24 +0100 Subject: [PATCH 06/13] heavy flashlight in another PR2 --- data/json/items/tool/lighting.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index cda02c9b4ce4c..1929526a373a3 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -638,11 +638,11 @@ "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. 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", + "//": "based on EXC7R https://www.ahlsell.se/external-assets/Documents/58/12/AssetDocument70255812.pdf", + "//2": "volume is 87 mm * 73 mm * 187 mm", + "weight": "523 g", + "volume": "1188 ml", + "longest_side": "19 cm", "price": "46 USD", "price_postapoc": "15 cent", "material": [ "aluminum" ], @@ -673,7 +673,7 @@ "copy-from": "heavy_flashlight", "type": "TOOL", "name": { "str": "heavy-duty flashlight (on)", "str_pl": "heavy-duty flashlights (on)" }, - "power_draw": "2600 mW", + "power_draw": "6 W", "revert_to": "heavy_flashlight", "use_action": [ { From 44279f779699239d0a9d70a8b4bcd48238092cb0 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 20:35:20 +0100 Subject: [PATCH 07/13] do heavy flashlight in other PR --- data/json/items/tool/lighting.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index 1929526a373a3..11ca0af149184 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -638,11 +638,11 @@ "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. It also has a shoulder strap on it's handle, for easier transportation.", - "//": "based on EXC7R https://www.ahlsell.se/external-assets/Documents/58/12/AssetDocument70255812.pdf", - "//2": "volume is 87 mm * 73 mm * 187 mm", - "weight": "523 g", - "volume": "1188 ml", - "longest_side": "19 cm", + "//": "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" ], From 0efcd433182f48eec1726a490fbba65429a052fa Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 20:36:22 +0100 Subject: [PATCH 08/13] add space --- 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 63a4f0fb0f883..5d1a3cb8db719 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -873,7 +873,7 @@ "color": "blue", "name": { "str": "headlamp" }, "description": "An LED headlamp with an adjustable strap so as to be comfortably worn on your head or attached to your helmet. Use it to turn it on.", - "//":"reference: https://www.rei.com/product/202772/black-diamond-astro-300-headlamp", + "//": "reference: https://www.rei.com/product/202772/black-diamond-astro-300-headlamp", "price": "20 USD", "price_postapoc": "1 USD", "material": [ "plastic", "aluminum" ], From b0324d13be43c4754887255ae9316dc43f1fbe2a Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Wed, 30 Oct 2024 22:10:00 +0100 Subject: [PATCH 09/13] adjust test to use medium battery --- tests/map_helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/map_helpers.cpp b/tests/map_helpers.cpp index 6b5c72b52fbc2..aaf531365241c 100644 --- a/tests/map_helpers.cpp +++ b/tests/map_helpers.cpp @@ -207,7 +207,7 @@ void build_water_test_map( const ter_id &surface, const ter_id &mid, const ter_i void player_add_headlamp() { item headlamp( "wearable_light_on" ); - item battery( "light_battery_cell" ); + item battery( "medium_battery_cell" ); battery.ammo_set( battery.ammo_default(), -1 ); headlamp.put_in( battery, pocket_type::MAGAZINE_WELL ); Character &you = get_player_character(); From 8b21d09f44dc4f9e3993391bf84f3c5729e90828 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Sun, 3 Nov 2024 11:12:04 +0100 Subject: [PATCH 10/13] make headlamp accept light battery to pass tests --- data/json/items/tool_armor.json | 2 +- tests/map_helpers.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 5d1a3cb8db719..10328b5441fd5 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -896,7 +896,7 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_MEDIUM" ], + "flag_restriction": [ "BATTERY_MEDIUM", "BATTERY_LIGHT" ], "default_magazine": "medium_battery_cell" } ], diff --git a/tests/map_helpers.cpp b/tests/map_helpers.cpp index aaf531365241c..6b5c72b52fbc2 100644 --- a/tests/map_helpers.cpp +++ b/tests/map_helpers.cpp @@ -207,7 +207,7 @@ void build_water_test_map( const ter_id &surface, const ter_id &mid, const ter_i void player_add_headlamp() { item headlamp( "wearable_light_on" ); - item battery( "medium_battery_cell" ); + item battery( "light_battery_cell" ); battery.ammo_set( battery.ammo_default(), -1 ); headlamp.put_in( battery, pocket_type::MAGAZINE_WELL ); Character &you = get_player_character(); From d5954cf51fd9b2b7378953f173d0633eba8c60af Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Sun, 3 Nov 2024 22:45:28 +0100 Subject: [PATCH 11/13] adjust headlight to only use medium battery and fix test --- data/json/items/tool_armor.json | 2 +- tests/map_helpers.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 10328b5441fd5..5d1a3cb8db719 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -896,7 +896,7 @@ { "pocket_type": "MAGAZINE_WELL", "rigid": true, - "flag_restriction": [ "BATTERY_MEDIUM", "BATTERY_LIGHT" ], + "flag_restriction": [ "BATTERY_MEDIUM" ], "default_magazine": "medium_battery_cell" } ], diff --git a/tests/map_helpers.cpp b/tests/map_helpers.cpp index 6b5c72b52fbc2..aaf531365241c 100644 --- a/tests/map_helpers.cpp +++ b/tests/map_helpers.cpp @@ -207,7 +207,7 @@ void build_water_test_map( const ter_id &surface, const ter_id &mid, const ter_i void player_add_headlamp() { item headlamp( "wearable_light_on" ); - item battery( "light_battery_cell" ); + item battery( "medium_battery_cell" ); battery.ammo_set( battery.ammo_default(), -1 ); headlamp.put_in( battery, pocket_type::MAGAZINE_WELL ); Character &you = get_player_character(); From 5a0442e8ce354a167efc9f20bf857fdc0fcf5a06 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Thu, 7 Nov 2024 15:11:03 +0100 Subject: [PATCH 12/13] make wearable_light for urban explorer use medium battery --- data/json/professions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/professions.json b/data/json/professions.json index 542500ab43970..b721876ecefc4 100644 --- a/data/json/professions.json +++ b/data/json/professions.json @@ -7913,8 +7913,8 @@ { "group": "charged_smart_phone" }, { "group": "starter_wallet_full" }, { "item": "pants", "variant": "pants_black" }, - { "item": "camera_pro", "charges": 300 }, - { "item": "light_battery_cell", "ammo-item": "battery", "charges": 300, "container-item": "wearable_light" } + { "item": "camera_pro", "charges": 56 }, + { "item": "medium_battery_cell", "ammo-item": "battery", "charges": 56, "container-item": "wearable_light" } ] }, "male": { "entries": [ { "item": "briefs" } ] }, From 548ac8010d471d2b37c997f764da6533df168488 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Thu, 7 Nov 2024 15:14:14 +0100 Subject: [PATCH 13/13] typo --- data/json/professions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/professions.json b/data/json/professions.json index b721876ecefc4..aeeb1c521ff08 100644 --- a/data/json/professions.json +++ b/data/json/professions.json @@ -7913,7 +7913,7 @@ { "group": "charged_smart_phone" }, { "group": "starter_wallet_full" }, { "item": "pants", "variant": "pants_black" }, - { "item": "camera_pro", "charges": 56 }, + { "item": "camera_pro", "charges": 300 }, { "item": "medium_battery_cell", "ammo-item": "battery", "charges": 56, "container-item": "wearable_light" } ] },