Skip to content

Commit

Permalink
all changes (CleverRaven#54640)
Browse files Browse the repository at this point in the history
  • Loading branch information
bombasticSlacks authored Jan 21, 2022
1 parent 8d7edb9 commit 2f4c5a5
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
"id": "NORMAL",
"type": "json_flag",
"//": "Item is on the normal layer.",
"info": "This gear <info>fits like</info> clothing."
"info": "This gear <info>fits like</info> normal clothing."
},
{
"id": "NO_CVD",
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/armor/robofac_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
}
],
"armor": [
{ "encumbrance": [ 4, 6 ], "coverage": 100, "cover_vitals": 90, "covers": [ "torso" ], "layers": [ "Outer", "Belted" ] },
{ "encumbrance": [ 4, 6 ], "coverage": 100, "cover_vitals": 90, "covers": [ "torso" ], "layers": [ "OUTER", "BELTED" ] },
{
"encumbrance": [ 4, 4 ],
"coverage": 100,
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2788,7 +2788,7 @@
"covers": [ "eyes" ],
"coverage": 80,
"encumbrance": 5,
"layers": [ "Outer" ]
"layers": [ "OUTER" ]
},
{
"material": [
Expand All @@ -2798,7 +2798,7 @@
"covers": [ "mouth" ],
"coverage": 50,
"encumbrance": 2,
"layers": [ "Outer" ]
"layers": [ "OUTER" ]
}
],
"environmental_protection": 2,
Expand Down
4 changes: 2 additions & 2 deletions src/armor_layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ void draw_mid_pane( const catacurses::window &w_sort_middle,
case layer_level::PERSONAL:
outstring.append( _( "in your <color_light_blue>personal aura</color>" ) );
break;
case layer_level::UNDERWEAR:
case layer_level::SKINTIGHT:
outstring.append( _( "<color_light_blue>close to your skin</color>" ) );
break;
case layer_level::REGULAR:
case layer_level::NORMAL:
outstring.append( _( "of <color_light_blue>normal</color> clothing" ) );
break;
case layer_level::WAIST:
Expand Down
4 changes: 2 additions & 2 deletions src/character_attire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ int Character::item_wear_cost( const item &it ) const

for( layer_level layer : it.get_layer() )
switch( layer ) {
case layer_level::UNDERWEAR:
case layer_level::SKINTIGHT:
mv *= 1.5;
break;

case layer_level::REGULAR:
case layer_level::NORMAL:
break;

case layer_level::WAIST:
Expand Down
6 changes: 3 additions & 3 deletions src/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ enum class layer_level : int {
/* "Personal effects" layer, corresponds to PERSONAL flag */
PERSONAL = 0,
/* "Close to skin" layer, corresponds to SKINTIGHT flag. */
UNDERWEAR,
/* "Normal" layer, default if no flags set */
REGULAR,
SKINTIGHT,
/* "Normal" layer, default if no flags set, also if NORMAL flag is used*/
NORMAL,
/* "Waist" layer, corresponds to WAIST flag. */
WAIST,
/* "Outer" layer, corresponds to OUTER flag. */
Expand Down
8 changes: 4 additions & 4 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3101,10 +3101,10 @@ static void armor_encumb_bp_info( const item &it, std::vector<iteminfo> &info,
case layer_level::PERSONAL:
layering += _( " <stat>Personal aura</stat>." );
break;
case layer_level::UNDERWEAR:
case layer_level::SKINTIGHT:
layering += _( " <stat>Close to skin</stat>." );
break;
case layer_level::REGULAR:
case layer_level::NORMAL:
layering += _( " <stat>Normal</stat>." );
break;
case layer_level::WAIST:
Expand Down Expand Up @@ -3527,10 +3527,10 @@ void item::armor_info( std::vector<iteminfo> &info, const iteminfo_query *parts,
case layer_level::PERSONAL:
layering += _( " <stat>Personal aura</stat>." );
break;
case layer_level::UNDERWEAR:
case layer_level::SKINTIGHT:
layering += _( " <stat>Close to skin</stat>." );
break;
case layer_level::REGULAR:
case layer_level::NORMAL:
layering += _( " <stat>Normal</stat>." );
break;
case layer_level::WAIST:
Expand Down
24 changes: 12 additions & 12 deletions src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,10 @@ void Item_factory::finalize_post( itype &obj )
obj.armor->all_layers.push_back( layer_level::PERSONAL );
}
if( obj.has_flag( flag_SKINTIGHT ) ) {
obj.armor->all_layers.push_back( layer_level::UNDERWEAR );
obj.armor->all_layers.push_back( layer_level::SKINTIGHT );
}
if( obj.has_flag( flag_NORMAL ) ) {
obj.armor->all_layers.push_back( layer_level::REGULAR );
obj.armor->all_layers.push_back( layer_level::NORMAL );
}
if( obj.has_flag( flag_WAIST ) ) {
obj.armor->all_layers.push_back( layer_level::WAIST );
Expand All @@ -896,7 +896,7 @@ void Item_factory::finalize_post( itype &obj )
}
// fallback for old way of doing items
if( obj.armor->all_layers.empty() ) {
obj.armor->all_layers.push_back( layer_level::REGULAR );
obj.armor->all_layers.push_back( layer_level::NORMAL );
}

// generate the vector of flags that the item will default to if not override
Expand Down Expand Up @@ -2389,19 +2389,19 @@ std::string enum_to_string<layer_level>( layer_level data )
{
switch( data ) {
case layer_level::PERSONAL:
return "Personal";
case layer_level::UNDERWEAR:
return "Underwear";
case layer_level::REGULAR:
return "Regular";
return "PERSONAL";
case layer_level::SKINTIGHT:
return "SKINTIGHT";
case layer_level::NORMAL:
return "NORMAL";
case layer_level::WAIST:
return "Waist";
return "WAIST";
case layer_level::OUTER:
return "Outer";
return "OUTER";
case layer_level::BELTED:
return "Belted";
return "BELTED";
case layer_level::AURA:
return "Aura";
return "AURA";
case layer_level::NUM_LAYER_LEVELS:
break;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/item_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ TEST_CASE( "item_volume", "[item]" )

TEST_CASE( "simple_item_layers", "[item]" )
{
CHECK( item( "arm_warmers" ).get_layer().front() == layer_level::UNDERWEAR );
CHECK( item( "10gal_hat" ).get_layer().front() == layer_level::REGULAR );
CHECK( item( "arm_warmers" ).get_layer().front() == layer_level::SKINTIGHT );
CHECK( item( "10gal_hat" ).get_layer().front() == layer_level::NORMAL );
CHECK( item( "baldric" ).get_layer().front() == layer_level::WAIST );
CHECK( item( "armor_lightplate" ).get_layer().front() == layer_level::OUTER );
CHECK( item( "legrig" ).get_layer().front() == layer_level::BELTED );
Expand Down

0 comments on commit 2f4c5a5

Please sign in to comment.