Make gear appear unstackable in inventories while other items remain stackable. Each individual piece of gear can now have its own stats.

This commit is contained in:
2023-12-29 06:25:54 -06:00
parent f987e51324
commit c528d89b85
17 changed files with 163 additions and 75 deletions
+4 -1
View File
@@ -200,8 +200,11 @@ bool Crawler::OnUserCreate(){
Inventory::AddItem("Copper Shoes");
Inventory::AddItem("Shell Helmet");
Inventory::AddItem("Shell Armor");
Inventory::AddItem("Shell Armor");
Inventory::AddItem("Shell Armor");
Inventory::AddItem("Bone Armor");
Inventory::AddItem("Shell Gloves");
Inventory::AddItem("Shell Gloves",3);
Inventory::AddItem("Shell Shoes");
Inventory::AddItem("Bone Pants");
Inventory::AddItem("Bone Gloves");
@@ -2350,7 +2353,7 @@ const std::weak_ptr<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){
loadout[slot]=Inventory::CopyItem(itemName);
loadout[slot]=Inventory::CopyItem(itemName)[0];
GetLoadoutItem(slot).lock()->amt=std::min((uint32_t)"Player.Item Loadout Limit"_I,GetLoadoutItem(slot).lock()->Amt()); //We are only allowed to have up to 10 maximum of an item on a journey.
InputGroup*inputGroup=nullptr;
switch(slot){