Skip to content

Commit e2dc3f5

Browse files
authored
feat: unhardcode RM-13 night vision enhancement as RECON_VISION item flag, add to active power armor helmets (#8256)
* feat: unharded RM-13 night vision enhancement as `RECON_VISION` item flag, add to active power armor helmets * Add flag descriptions
1 parent 86069de commit e2dc3f5

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

data/json/flags.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,14 @@
16491649
{
16501650
"id": "GNV_EFFECT",
16511651
"type": "json_flag",
1652-
"context": [ ]
1652+
"context": [ ],
1653+
"info": "This gear <good>enhances your vision</good> when worn, and <info>tints your field of view</info>."
1654+
},
1655+
{
1656+
"id": "RECON_VISION",
1657+
"type": "json_flag",
1658+
"context": [ ],
1659+
"info": "This gear <good>enhances your vision</good> when worn."
16531660
},
16541661
{
16551662
"id": "HELMET_COMPAT",
@@ -1699,7 +1706,8 @@
16991706
{
17001707
"id": "IR_EFFECT",
17011708
"type": "json_flag",
1702-
"context": [ ]
1709+
"context": [ ],
1710+
"info": "This gear allows you to <good>see heat signatures</good> when worn."
17031711
},
17041712
{
17051713
"id": "IS_ARMOR",

data/json/items/armor/power_armor.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
"type": "TOOL_ARMOR",
272272
"name": { "str": "power armor helmet (active)", "str_pl": "power armor helmets (active)" },
273273
"description": "A fully enclosed combat helmet for hazardous environments, this was designed to fit with a powered exoskeleton, using cameras to expand visual range. In practice, the cameras were unreliable and easily fouled. The environmental controls function best with direct-skin contact.",
274-
"extend": { "flags": [ "THERMOMETER", "CLIMATE_CONTROL", "TRADER_AVOID" ] },
274+
"extend": { "flags": [ "THERMOMETER", "RECON_VISION", "CLIMATE_CONTROL", "TRADER_AVOID" ] },
275275
"power_draw": 500000,
276276
"qualities": [ [ "GLARE", 2 ] ],
277277
"revert_to": "power_armor_helmet_basic",
@@ -327,7 +327,7 @@
327327
"type": "TOOL_ARMOR",
328328
"name": { "str": "heavy power armor helmet (active)", "str_pl": "heavy power armor helmets (active)" },
329329
"description": "An extremely heavy-duty fully enclosed combat helmet for hazardous environments, this was designed to fit with a powered exoskeleton. In the field, soldiers reported that the protection was not worth the awkward size and limited visuals. The environmental controls function best with direct-skin contact.",
330-
"extend": { "flags": [ "THERMOMETER", "CLIMATE_CONTROL", "TRADER_AVOID" ] },
330+
"extend": { "flags": [ "THERMOMETER", "RECON_VISION", "CLIMATE_CONTROL", "TRADER_AVOID" ] },
331331
"power_draw": 750000,
332332
"qualities": [ [ "GLARE", 2 ] ],
333333
"revert_to": "power_armor_helmet_heavy",
@@ -383,7 +383,7 @@
383383
"type": "TOOL_ARMOR",
384384
"name": { "str": "light power armor helmet (active)", "str_pl": "light power armor helmets (active)" },
385385
"description": "This full-enclosure helmet was designed based on commercial diving equipment, in response to complaints that earlier designs were impossible to use in combat. While still a little more restrictive than regular combat headgear - and frustrating should your nose itch - this one received far better reviews from soldiers. Sadly, civilization ended before they could roll out in significant numbers. The environmental controls function best with direct-skin contact.",
386-
"extend": { "flags": [ "THERMOMETER", "CLIMATE_CONTROL", "TRADER_AVOID" ] },
386+
"extend": { "flags": [ "THERMOMETER", "RECON_VISION", "CLIMATE_CONTROL", "TRADER_AVOID" ] },
387387
"power_draw": 250000,
388388
"qualities": [ [ "GLARE", 1 ] ],
389389
"revert_to": "power_armor_helmet_light",

data/json/items/tool_armor.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@
896896
"ALARMCLOCK",
897897
"SWIM_GOGGLES",
898898
"SUN_GLASSES",
899+
"RECON_VISION",
899900
"RAD_PROOF",
900901
"ELECTRIC_IMMUNE",
901902
"THERMOMETER",

src/character.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@ void Character::recalc_sight_limits()
19661966
for( const mutation_branch *mut : cached_mutations ) {
19671967
best_bonus_nv = std::max( best_bonus_nv, mut->night_vision_range );
19681968
}
1969-
if( is_wearing( itype_rm13_armor_on ) ||
1969+
if( worn_with_flag( flag_RECON_VISION ) ||
19701970
( is_mounted() && mounted_creature->has_flag( MF_MECH_RECON_VISION ) ) ) {
19711971
best_bonus_nv = std::max( best_bonus_nv, 10.0f );
19721972
}

src/flag.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ const flag_id flag_REACH3( "REACH3" );
283283
const flag_id flag_REACH_ATTACK( "REACH_ATTACK" );
284284
const flag_id flag_REBREATHER( "REBREATHER" );
285285
const flag_id flag_RECHARGE( "RECHARGE" );
286+
const flag_id flag_RECON_VISION( "RECON_VISION" );
286287
const flag_id flag_REDUCED_BASHING( "REDUCED_BASHING" );
287288
const flag_id flag_REDUCED_WEIGHT( "REDUCED_WEIGHT" );
288289
const flag_id flag_RELOAD_AND_SHOOT( "RELOAD_AND_SHOOT" );

src/flag.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ extern const flag_id flag_REACH;
285285
extern const flag_id flag_REACH_ATTACK;
286286
extern const flag_id flag_REBREATHER;
287287
extern const flag_id flag_RECHARGE;
288+
extern const flag_id flag_RECON_VISION;
288289
extern const flag_id flag_REDUCED_BASHING;
289290
extern const flag_id flag_REDUCED_WEIGHT;
290291
extern const flag_id flag_RELOAD_AND_SHOOT;

0 commit comments

Comments
 (0)