Skip to content

Commit

Permalink
Merge pull request #78209 from PatrikLundell/roof
Browse files Browse the repository at this point in the history
Corrected 'check_support'
  • Loading branch information
Maleclypse authored Nov 28, 2024
2 parents 75431d4 + 35ab0ad commit 9704dc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/construction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1493,9 +1493,11 @@ bool construct::check_support( const tripoint_bub_ms &p )
// We want to find "walls" below (including windows and doors), but not open rooms and the like.
if( here.has_flag( ter_furn_flag::TFLAG_SUPPORTS_ROOF, p + tripoint::below ) &&
( here.has_flag( ter_furn_flag::TFLAG_WALL, p + tripoint::below ) ||
here.has_flag( ter_furn_flag::TFLAG_CONNECT_WITH_WALL, p + tripoint::below ) ) ) {
here.has_flag( ter_furn_flag::TFLAG_DOOR, p + tripoint::below ) ||
here.has_flag( ter_furn_flag::TFLAG_WINDOW, p + tripoint::below ) ) ) {
num_supports += 2;
}

return num_supports >= 2;
}

Expand Down

0 comments on commit 9704dc9

Please sign in to comment.