Skip to content

Commit

Permalink
Create wished for items with maximum charge or ammunition.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed Jan 8, 2020
1 parent 09cf3e4 commit 5fbd6dd
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 5fbd6dd

Please sign in to comment.