Implemented equipping of items, reading of slot types from item database, and prepared set items and stats structures.

This commit is contained in:
2023-11-30 23:33:40 -06:00
parent b97c63f7b0
commit 298b0c4ca7
9 changed files with 147 additions and 28 deletions
+6 -1
View File
@@ -199,7 +199,12 @@ bool Crawler::OnUserCreate(){
ItemDrop::Initialize();
ValidateGameStatus(); //Checks to make sure everything has been initialized properly.
Item&it=Inventory::GetItem("Dummy Item 10");
Inventory::EquipItem(it,EquipSlot::RING1);
Inventory::EquipItem(it,EquipSlot::RING2);
return true;
}
@@ -2138,7 +2143,7 @@ Item&Crawler::GetLoadoutItem(int slot){
void Crawler::SetLoadoutItem(int slot,std::string itemName){
if(slot<0||slot>loadout.size()-1)ERR("Invalid inventory slot "+std::to_string(slot)+", please choose a slot in range (0-"+std::to_string(loadout.size()-1)+").");
if(Inventory::GetItemCount(itemName)>0){
GetLoadoutItem(slot)=Inventory::GetItem(itemName);
GetLoadoutItem(slot)=Inventory::CopyItem(itemName);
GetLoadoutItem(slot).amt=std::min((uint32_t)"Player.Item Loadout Limit"_I,GetLoadoutItem(slot).Amt()); //We are only allowed to have up to 10 maximum of an item on a journey.
InputGroup*inputGroup=nullptr;
switch(slot){