Skip to content

Commit

Permalink
Prying nails correctly deconstructs reinforced boarded window (#3300)
Browse files Browse the repository at this point in the history
* new else if for reinforced window

new else if for reinforced window in prying nails

* fix for cant target them

added them to valid targets, and can't pry while mounted
  • Loading branch information
RoyalFox2140 authored Sep 28, 2023
1 parent d008f4a commit 61c1386
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4131,6 +4131,16 @@ void activity_handlers::pry_nails_finish( player_activity *act, player *p )
boards = 3;
newter = t_fence_post;
p->add_msg_if_player( _( "You pry out the fence post." ) );
} else if( type == t_window_reinforced_noglass ) {
nails = 16;
boards = 8;
newter = t_window_boarded_noglass;
p->add_msg_if_player( _( "You pry the boards from the window." ) );
} else if( type == t_window_reinforced ) {
nails = 16;
boards = 8;
newter = t_window_boarded;
p->add_msg_if_player( _( "You pry the boards from the window." ) );
} else if( type == t_window_boarded ) {
nails = 8;
boards = 4;
Expand Down
3 changes: 3 additions & 0 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2387,6 +2387,8 @@ int iuse::hammer( player *p, item *it, bool, const tripoint & )
}
const std::set<ter_id> allowed_ter_id {
t_fence,
t_window_reinforced,
t_window_reinforced_noglass,
t_window_boarded,
t_window_boarded_noglass,
t_door_boarded,
Expand Down Expand Up @@ -2425,6 +2427,7 @@ int iuse::hammer( player *p, item *it, bool, const tripoint & )
}

if( type == t_fence || type == t_window_boarded || type == t_window_boarded_noglass ||
type == t_window_reinforced || type == t_window_reinforced_noglass ||
type == t_door_boarded || type == t_door_boarded_damaged ||
type == t_rdoor_boarded || type == t_rdoor_boarded_damaged ||
type == t_door_boarded_peep || type == t_door_boarded_damaged_peep ) {
Expand Down

0 comments on commit 61c1386

Please sign in to comment.