Item reference system deprecated in favor of smart pointer system. Converted all items to use pointers instead, removed all reference wrappers for item system. Fixed buggy last item sorting when removing items from InventoryScrollableWindowComponents. Implemented proper inventory removal checks when items are completely removed from an inventory. Sorted inventories now copy the pointer as a shared pointer from the main inventory code instead of needlessly creating extra copies of the same item.

This commit is contained in:
2023-12-22 06:14:37 -06:00
parent d801a41900
commit 70423be9d4
20 changed files with 259 additions and 224 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ void Menu::InitializeConsumableInventoryWindow(){
}
}
button->selected=data.menu.I(A::LOADOUT_SLOT);
data.game->SetLoadoutItem(button->selected,button->GetItem().ActualName());
data.game->SetLoadoutItem(button->selected,button->GetItem().lock()->ActualName());
return true;
})END;
Menu::AddInventoryListener(consumableWindow,"Consumables");