Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust headlamp to match flashlight #77461

Merged
merged 13 commits into from
Nov 7, 2024
14 changes: 8 additions & 6 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -873,12 +873,14 @@
"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": "141 ml",
"longest_side": "136 mm",
"charges_per_use": 1,
"ammo": "battery",
"use_action": {
Expand All @@ -894,8 +896,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" ] } ],
Expand Down Expand Up @@ -960,7 +962,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,
Expand Down
2 changes: 1 addition & 1 deletion data/json/professions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7914,7 +7914,7 @@
{ "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": "medium_battery_cell", "ammo-item": "battery", "charges": 56, "container-item": "wearable_light" }
]
},
"male": { "entries": [ { "item": "briefs" } ] },
Expand Down
2 changes: 1 addition & 1 deletion tests/map_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading