| 2588 | // 3D bashable |
| 2589 | |
| 2590 | bool map::is_bashable( const tripoint &p, const bool allow_floor ) const |
| 2591 | { |
| 2592 | if( !inbounds( p ) ) { |
| 2593 | DebugLog( D_WARNING, D_MAP ) << "Looking for out-of-bounds is_bashable at " |
| 2594 | << p.x << ", " << p.y << ", " << p.z; |
| 2595 | return false; |
| 2596 | } |
| 2597 | |
| 2598 | if( veh_at( p ).obstacle_at_part() ) { |
| 2599 | return true; |
| 2600 | } |
| 2601 | |
| 2602 | if( has_furn( p ) && furn( p ).obj().bash.str_max != -1 ) { |
| 2603 | return true; |
| 2604 | } |
| 2605 | |
| 2606 | const auto &ter_bash = ter( p ).obj().bash; |
| 2607 | return ter_bash.str_max != -1 && ( !ter_bash.bash_below || allow_floor ); |
| 2608 | } |
| 2609 | |
| 2610 | bool map::is_bashable_ter( const tripoint &p, const bool allow_floor ) const |
| 2611 | { |
no test coverage detected