Skip to content

Commit

Permalink
Merge pull request #36760 from CleverRaven/kevingranade-charged-batte…
Browse files Browse the repository at this point in the history
…ries-for-debug

Wished for items span with full charges or ammunition
  • Loading branch information
ZhilkinSerg committed Jan 10, 2020
2 parents 7b22e58 + 5fbd6dd commit f09c223
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wish.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@ void debug_menu::wishitem( player *p, int x, int y, int z )
if( cb.has_flag ) {
granted.item_tags.insert( cb.flag );
}
// If the item has an ammunition, this loads it to capacity, including magazines.
if( granted.ammo_default() != "NULL" ) {
granted.ammo_set( granted.ammo_default(), -1 );
}

granted.set_birthday( calendar::turn );
prev_amount = amount;
bool canceled = false;
Expand Down

0 comments on commit f09c223

Please sign in to comment.