Make cPlayer::give_item() return the reason for failure

This commit is contained in:
2025-03-19 18:38:25 -05:00
parent 599f1030f2
commit c63bbd96dc
8 changed files with 42 additions and 34 deletions

View File

@@ -419,7 +419,7 @@ void handle_menu_choice(eMenu item_hit) {
if(choice < all_items.size()) {
cItem store_i = all_items[choice];
store_i.ident = true;
if(!univ.party[current_active_pc].give_item(store_i,GIVE_ALLOW_OVERLOAD))
if(univ.party[current_active_pc].give_item(store_i,GIVE_ALLOW_OVERLOAD) != eBuyStatus::OK)
showError("Sorry, that PC has no free inventory slots left! You'll have to either drop something or give it to a different PC.");
else redraw_screen();
}