Skip to content

Commit

Permalink
fix: mining a boulder no longer destroys the floor under it too (#4975)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosvolt committed Jul 11, 2024
1 parent a5610fb commit 3d41392
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,11 @@ void activity_handlers::pickaxe_finish( player_activity *act, player *p )
p->add_msg_player_or_npc( m_good,
_( "You finish digging." ),
_( "<npcname> finishes digging." ) );
here.destroy( pos, true );
if( here.has_flag_furn( TFLAG_MINEABLE, pos ) ) {
here.destroy_furn( pos, true );
} else {
here.destroy( pos, true );
}
if( !act->targets.empty() ) {
item &it = *act->targets.front();
p->consume_charges( it, it.ammo_required() );
Expand Down Expand Up @@ -4165,7 +4169,11 @@ void activity_handlers::jackhammer_finish( player_activity *act, player *p )
map &here = get_map();
const tripoint &pos = here.getlocal( act->placement );

here.destroy( pos, true );
if( here.has_flag_furn( TFLAG_MINEABLE, pos ) ) {
here.destroy_furn( pos, true );
} else {
here.destroy( pos, true );
}

if( p->is_avatar() ) {
const int helpersize = character_funcs::get_crafting_helpers( *p, 3 ).size();
Expand Down

0 comments on commit 3d41392

Please sign in to comment.