Allow PC to accept item that will stack, even if slots full
This commit is contained in:
@@ -67,7 +67,7 @@ bool handle_action(const sf::Event & event) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(short i = 0; i < univ.party[current_active_pc].items.size(); i++) {
|
||||
for(short i = 0; i < cPlayer::INVENTORY_SIZE; i++) {
|
||||
if((the_point.in(item_string_rects[i][1])) && // drop item
|
||||
univ.party[current_active_pc].items[i].variety != eItemType::NO_ITEM) {
|
||||
flash_rect(item_string_rects[i][1]);
|
||||
|
@@ -344,7 +344,7 @@ void draw_items() {
|
||||
return; // If PC is dead, it has no items
|
||||
}
|
||||
sf::Texture& invenbtn_gworld = *ResMgr::graphics.get("invenbtns");
|
||||
for(short i = 0; i < univ.party[current_active_pc].items.size(); i++) // Loop through items and draw each
|
||||
for(short i = 0; i < cPlayer::INVENTORY_SIZE; i++) // Loop through items and draw each
|
||||
if(univ.party[current_active_pc].items[i].variety != eItemType::NO_ITEM) { // i.e. does item exist
|
||||
std::string to_draw = std::to_string(i + 1) + ". ";
|
||||
if(!univ.party[current_active_pc].items[i].ident)
|
||||
|
Reference in New Issue
Block a user