Skip to content

Commit

Permalink
TFLAG
Browse files Browse the repository at this point in the history
  • Loading branch information
KheirFerrum committed Nov 18, 2022
1 parent 24860d0 commit 27abb64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4624,10 +4624,10 @@ void map::process_items_in_submap( submap &current_submap, const tripoint &gridp
if( ter( map_location ) == t_rootcellar ) {
flag = temperature_flag::TEMP_ROOT_CELLAR;
}
if( has_flag_furn( "FRIDGE", map_location ) ) {
if( has_flag_furn( TFLAG_FRIDGE, map_location ) ) {
flag = temperature_flag::TEMP_FRIDGE;
}
if( has_flag_furn( "FREEZER", map_location ) ) {
if( has_flag_furn( TFLAG_FREEZER, map_location ) ) {
flag = temperature_flag::TEMP_FREEZER;
}
map_stack items = i_at( map_location );
Expand Down
6 changes: 4 additions & 2 deletions src/mapdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ static const std::unordered_map<std::string, ter_bitflags> ter_bitflags_map = {
{ "THIN_OBSTACLE", TFLAG_THIN_OBSTACLE }, // Passable by players and monsters. Vehicles destroy it.
{ "SMALL_PASSAGE", TFLAG_SMALL_PASSAGE }, // A small passage, that large or huge things cannot pass through
{ "Z_TRANSPARENT", TFLAG_Z_TRANSPARENT }, // Doesn't block vision passing through the z-level
{ "SUN_ROOF_ABOVE", TFLAG_SUN_ROOF_ABOVE }, // This furniture has a "fake roof" above, that blocks sunlight (see #44421).
{ "SUSPENDED", TFLAG_SUSPENDED } // This furniture is suspended between other terrain, and will cause a cascading failure on break.
{ "SUN_ROOF_ABOVE", TFLAG_SUN_ROOF_ABOVE }, // This furniture has a "fake roof" above, that blocks sunlight (see #44421).
{ "SUSPENDED", TFLAG_SUSPENDED }, // This furniture is suspended between other terrain, and will cause a cascading failure on break.
{ "FRIDGE", TFLAG_FRIDGE }, // This is an active fridge.
{ "FREEZER", TFLAG_FREEZER }, // This is an active freezer.
}
};

Expand Down
2 changes: 2 additions & 0 deletions src/mapdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ enum ter_bitflags : int {
TFLAG_Z_TRANSPARENT,
TFLAG_SUN_ROOF_ABOVE,
TFLAG_SUSPENDED,
TFLAG_FRIDGE,
TFLAG_FREEZER,

NUM_TERFLAGS
};
Expand Down

0 comments on commit 27abb64

Please sign in to comment.