diff --git a/Crawler/ConsumableCraftingWindow.cpp b/Crawler/ConsumableCraftingWindow.cpp index e257860d..7527fd70 100644 --- a/Crawler/ConsumableCraftingWindow.cpp +++ b/Crawler/ConsumableCraftingWindow.cpp @@ -51,47 +51,9 @@ INCLUDE_GFX void Menu::InitializeConsumableCraftingWindow(){ Menu*consumableCraftingWindow=CreateMenu(CRAFT_CONSUMABLE,CENTERED,game->GetScreenSize()-vi2d{52,52}); - - std::vector>categories; - std::vector>weaponInventory; - std::vector>armorInventory; - - #pragma region Build Equipment Lists - std::for_each(Inventory::get("Equipment").begin(),Inventory::get("Equipment").end(),[&](const std::shared_ptr item){ - switch(item.get()->GetEquipSlot()){ - case EquipSlot::WEAPON:{ - weaponInventory.push_back(item); - }break; - case EquipSlot::NONE: - case EquipSlot::RING1: - case EquipSlot::RING2:break;//No-op - default:{ //We assume everything else is armor. - armorInventory.push_back(item); - } - } - }); - #pragma endregion - auto weaponTab=consumableCraftingWindow->ADD("Weapon Tab",MenuComponent)({{2,0},{consumableCraftingWindow->size.x/2-4,24}},"Weapon",[](MenuFuncData data){ - Component(CRAFT_CONSUMABLE,"Armor Tab")->selected=false; - Component(CRAFT_CONSUMABLE,"Weapon Inventory Display")->Enable(true); - Component(CRAFT_CONSUMABLE,"Armor Inventory Display")->Enable(false); - data.component->selected=true; - return true; - })END; - weaponTab->selected=true; - weaponTab->selectionType=SelectionType::HIGHLIGHT; - auto armorTab=consumableCraftingWindow->ADD("Armor Tab",MenuComponent)({{consumableCraftingWindow->size.x/2+2,0},{consumableCraftingWindow->size.x/2-4,24}},"Armor",[](MenuFuncData data){ - Component(CRAFT_CONSUMABLE,"Weapon Tab")->selected=false; - Component(CRAFT_CONSUMABLE,"Weapon Inventory Display")->Enable(false); - Component(CRAFT_CONSUMABLE,"Armor Inventory Display")->Enable(true); - data.component->selected=true; - return true; - })END; - armorTab->selectionType=SelectionType::HIGHLIGHT; - - #pragma region Weapon Inventory Display - auto weaponsDisplay=consumableCraftingWindow->ADD("Weapon Inventory Display",RowInventoryScrollableWindowComponent)({{2,28},{220,consumableCraftingWindow->size.y-44}},"Item Name Label","Item Description Label", + #pragma region Craftables Inventory Display + auto craftingItemsDisplay=consumableCraftingWindow->ADD("Crafting Inventory Display",RowInventoryScrollableWindowComponent)({{2,28},{220,consumableCraftingWindow->size.y-44}},"Item Name Label","Item Description Label", [](MenuFuncData data){ RowItemDisplay*comp=DYNAMIC_CAST(data.component); const std::weak_ptritem=comp->GetItem(); @@ -110,6 +72,11 @@ void Menu::InitializeConsumableCraftingWindow(){ }, [](MenuFuncData data){ RowItemDisplay*rowItem=DYNAMIC_CAST(data.component); + if(rowItem->GetItem().lock()->GetEnhancementInfo().AvailableChapter()<=game->GetCurrentChapter()){ + Component(CRAFT_CONSUMABLE,"Item Icon")->SetHideDetails(false); + }else{ + Component(CRAFT_CONSUMABLE,"Item Icon")->SetHideDetails(true); + } Component(CRAFT_CONSUMABLE,"Item Icon")->SetItem(rowItem->GetItem()); return true; }, @@ -120,49 +87,36 @@ void Menu::InitializeConsumableCraftingWindow(){ InventoryCreator::RowPlayerWeapons_InventoryUpdate, {.padding=1,.size={207,28}} )END; - AddInventoryListener(weaponsDisplay,"Equipment"); - weaponsDisplay->SetCompactDescriptions(CRAFTING_INFO); - #pragma endregion - #pragma region Armor Inventory Display - auto armorDisplay=consumableCraftingWindow->ADD("Armor Inventory Display",RowInventoryScrollableWindowComponent)({{2,28},{220,consumableCraftingWindow->size.y-44}},"Item Name Label","Item Description Label", - [](MenuFuncData data){ - Menu::OpenMenu(CRAFT_ITEM); - RowItemDisplay*comp=DYNAMIC_CAST(data.component); - const std::weak_ptritem=comp->GetItem(); + craftingItemsDisplay->SetCompactDescriptions(CRAFTING_INFO); + + vf2d buttonSize=craftingItemsDisplay->options.size; + vf2d totalSpacing={craftingItemsDisplay->options.padding+buttonSize.x,craftingItemsDisplay->options.padding+buttonSize.y}; + + for(auto item:ItemInfo::craftableConsumables){ + size_t invSize=craftingItemsDisplay->components.size()+1; + int invWidth=int(craftingItemsDisplay->rect.size.x/(float(craftingItemsDisplay->options.size.x)+craftingItemsDisplay->options.padding)); + int x=int((invSize-1)%invWidth); + int y=int((invSize-1)/invWidth); + int itemIndex=y*invWidth+x; + auto newItem=craftingItemsDisplay->ADD("item_Craftables_"+std::to_string(itemIndex),RowItemDisplay)({totalSpacing*vf2d{float(x),float(y)},buttonSize},item,craftingItemsDisplay->inventoryButtonClickAction,craftingItemsDisplay->itemNameLabelName,craftingItemsDisplay->itemDescriptionLabelName,craftingItemsDisplay->inventoryButtonsActive?ButtonAttr::NONE:ButtonAttr::UNSELECTABLE)END; + newItem->SetShowQuantity(false); + newItem->SetCompactDescriptions(craftingItemsDisplay->compact); + newItem->SetPriceLabelType(craftingItemsDisplay->priceLabel); + newItem->SetHoverFunc(craftingItemsDisplay->inventoryButtonHoverAction); + newItem->SetMouseOutFunc(craftingItemsDisplay->inventoryButtonMouseOutAction); + newItem->SetCheckCraftingRequirements(true); + newItem->SetHideLabelWhileLocked(true); + } - std::string label=""; - if(item.lock()->EnhancementIsPossible()&&item.lock()->GetEnhancementInfo().size()>item.lock()->EnhancementLevel()+1){ - label=std::format("Level {} ->#00AA00 {}",item.lock()->EnhancementLevel(),item.lock()->EnhancementLevel()+1); - } - Component(CRAFT_ITEM,"Enhancement Level Header")->SetLabel(label); - Component(CRAFT_ITEM,"Item Name Header")->SetLabel(std::format("Crafting {}",item.lock()->DisplayName())); - Component(CRAFT_ITEM,"Enhancement Stats Label")->SetItem(item); - Component(CRAFT_ITEM,"Required Materials List")->SetItem(item); - Component(CRAFT_ITEM,"Craft Button")->SetGrayedOut(!item.lock()->CanEnhanceItem()); - return true; - }, - [](MenuFuncData data){ - RowItemDisplay*rowItem=DYNAMIC_CAST(data.component); - Component(CRAFT_CONSUMABLE,"Item Icon")->SetItem(rowItem->GetItem()); - return true; - }, - [](MenuFuncData data){ - Component(CRAFT_CONSUMABLE,"Item Icon")->SetItem(Item::BLANK); - return true; - }, - InventoryCreator::RowPlayerArmor_InventoryUpdate, - {.padding=1,.size={207,28}} - )END; - AddInventoryListener(armorDisplay,"Equipment"); - armorDisplay->Enable(false); - armorDisplay->SetCompactDescriptions(CRAFTING_INFO); #pragma endregion + #pragma region Inventory Description float inventoryDescriptionWidth=consumableCraftingWindow->pos.x+consumableCraftingWindow->size.x-26-224; consumableCraftingWindow->ADD("Item Description Outline",MenuLabel)({{224,28},{inventoryDescriptionWidth,consumableCraftingWindow->size.y-44}},"",1,ComponentAttr::LEFT_ALIGN|ComponentAttr::OUTLINE|ComponentAttr::BACKGROUND)END; - consumableCraftingWindow->ADD("Item Icon",MenuItemItemButton)({{226+inventoryDescriptionWidth/2-24,30},{48,48}},Item::BLANK,MenuType::ENUM_END,DO_NOTHING,"","",IconButtonAttr::NOT_SELECTABLE)END; + consumableCraftingWindow->ADD("Item Icon",MenuItemItemButton)({{226+inventoryDescriptionWidth/2-24,30},{48,48}},Item::BLANK,MenuType::ENUM_END,DO_NOTHING,"","",IconButtonAttr::NOT_SELECTABLE)END + ->SetShowQuantity(false); consumableCraftingWindow->ADD("Item Name Label",MenuLabel)({{226,84},{inventoryDescriptionWidth-6,12}},"",0.75f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END; consumableCraftingWindow->ADD("Item Description Label",MenuLabel)({{226,94},{inventoryDescriptionWidth-6,consumableCraftingWindow->size.y-44-66}},"",0.5f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END; #pragma endregion diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp index 529a14b4..f469dff7 100644 --- a/Crawler/Crawler.cpp +++ b/Crawler/Crawler.cpp @@ -2337,6 +2337,9 @@ int Crawler::GetCurrentChapter(){ void Crawler::SetChapter(int chapter){ this->chapter=chapter; + for(MenuComponent*component:Menu::chapterListeners){ + component->OnChapterUpdate(chapter); + } } const std::weak_ptrCrawler::GetLoadoutItem(int slot){ diff --git a/Crawler/Item.cpp b/Crawler/Item.cpp index fa24cec9..417ebc3b 100644 --- a/Crawler/Item.cpp +++ b/Crawler/Item.cpp @@ -60,7 +60,7 @@ std::mapItemInfo::nameToEquipSlot; int Item::IsBlankStaticCallCounter=0; safemapStats::maxDamageReductionTable; ItemEnhancementFunctionPrimingData Item::enhanceFunctionPrimed("CanEnhanceItem()"); -std::vectorItemInfo::craftableConsumables; +std::vector>ItemInfo::craftableConsumables; ItemInfo::ItemInfo() :customProps({nullptr,nullptr}),img(nullptr){} @@ -186,7 +186,8 @@ void ItemInfo::InitializeItems(){ if(data[key]["Crafting"].HasProperty("AvailableChapter")){ availableChapter=data[key]["Crafting"]["AvailableChapter"].GetInt(); } - craftableConsumables.push_back(&it); + craftableConsumables.push_back(std::make_shared(1,key)); + it.enhancement.SetAttribute(1,ItemAttribute::Get("Attack"),0.f); it.enhancement.SetCraftingRequirements(1,itemsRequired,goldCost,availableChapter); } @@ -543,23 +544,23 @@ const std::string Item::Description(CompactText compact)const{ first=false; } } - if(compact==CRAFTING_INFO){ - description+="\n\nCrafting Requirements:\n---------\n"; - if(IsEquippable()&&EnhancementLevel()<"Item.Item Max Enhancement Level"_I||IsCraftable()){ - const EnhancementLevelInfo&info=GetEnhancementInfo()[EnhancementLevel()+1]; - for(const auto&[name,amt]:info.craftingRequirement.GetItems()){ - description+=std::format("{}{} x{} ({})\n", - Inventory::GetItemCount(name)GetPlayer()->GetMoney()GetPlayer()->GetMoney()availableChapter=availableChapter; craftingRequirements[enhanceLevel]=CraftingRequirement(requiredItems,goldCost); } @@ -944,7 +946,7 @@ const EnhancementInfo&Item::GetEnhancementInfo()const{ } const bool EnhancementInfo::CanBeEnhanced()const{ - return enhancementStats.size()>0&&craftingRequirements.size()>0; + return craftingRequirements.size()>0; }; diff --git a/Crawler/Item.h b/Crawler/Item.h index 791a9c1c..f2d13a8d 100644 --- a/Crawler/Item.h +++ b/Crawler/Item.h @@ -265,6 +265,7 @@ public: class ItemInfo{ friend class Inventory; + friend class Menu; std::string name; std::string description; std::string category; @@ -287,7 +288,7 @@ private: static void InitializeScripts(); static void InitializeSets(); static std::mapnameToEquipSlot; - static std::vectorcraftableConsumables; + static std::vector>craftableConsumables; public: static void InitializeItems(); ItemInfo(); diff --git a/Crawler/Menu.cpp b/Crawler/Menu.cpp index aa71127f..f424c0b9 100644 --- a/Crawler/Menu.cpp +++ b/Crawler/Menu.cpp @@ -56,6 +56,7 @@ safeunorderedmapMenu::themes; safemap>Menu::inventoryListeners; safemap>Menu::merchantInventoryListeners; std::vectorMenu::equipStatListeners; +std::vectorMenu::chapterListeners; const vf2d Menu::CENTERED = {-456,-456}; std::vectorMenu::unhandledComponents; ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -700,4 +701,11 @@ MenuType Menu::GetType(){ void Menu::LockInListeners(){ inventoryListeners.SetInitialized(); merchantInventoryListeners.SetInitialized(); +} + +void Menu::AddChapterListener(MenuComponent*component){ + if(std::find(chapterListeners.begin(),chapterListeners.end(),component)!=chapterListeners.end()){ + ERR("WARNING! Component "<name<<" has already been added to the Chapter listener list! There should not be any duplicates!!") + } + chapterListeners.push_back(component); } \ No newline at end of file diff --git a/Crawler/Menu.h b/Crawler/Menu.h index 4f35f800..39559854 100644 --- a/Crawler/Menu.h +++ b/Crawler/Menu.h @@ -118,6 +118,7 @@ class Menu:public IAttributable{ static safemap>inventoryListeners; //All menu components that care about inventory updates subscribe to this list indirectly (See Menu::AddInventoryListener()). static safemap>merchantInventoryListeners; //All menu components that care about merchant inventory updates subscribe to this list indirectly (See Menu::AddMerchantInventoryListener()). static std::vectorequipStatListeners; //All menu components that care about stat/equip updates subscribe to this list indirectly (See Menu::AddStatListener()). + static std::vectorchapterListeners; //All menu components that care about story chapter updates subscribe to this list indirectly (See Menu::AddChapterListener()). public: //The constructor is private. Use CreateMenu() instead! Menu()=default; @@ -210,6 +211,7 @@ public: static void AddInventoryListener(MenuComponent*component,ITCategory category); //Adds a component to be in a given listener category. static void AddMerchantInventoryListener(MenuComponent*component,ITCategory category); //Adds a component to be in a given listener category. static void AddEquipStatListener(MenuComponent*component); //Adds a component to be in an equip stat listener. Will receive updates whenever stats are updated via equips. + static void AddChapterListener(MenuComponent*component); //Adds a component to be in a chapter listener. Will receive updates anytime the chapter in-game changes. vf2d center(); //Returns the last menu type created and last registered component, in case a component is detected as memory leaking, provides this information to each component for safety. static std::pairGetMemoryLeakReportInfo(); diff --git a/Crawler/MenuComponent.cpp b/Crawler/MenuComponent.cpp index e817fb43..f827628c 100644 --- a/Crawler/MenuComponent.cpp +++ b/Crawler/MenuComponent.cpp @@ -250,4 +250,6 @@ void MenuComponent::SetGrayedOut(bool grayedOut){ this->grayedOut=grayedOut; } -void MenuComponent::OnPlayerMoneyUpdate(uint32_t newMoney){} \ No newline at end of file +void MenuComponent::OnPlayerMoneyUpdate(uint32_t newMoney){} + +void MenuComponent::OnChapterUpdate(uint8_t newChapter){} \ No newline at end of file diff --git a/Crawler/MenuComponent.h b/Crawler/MenuComponent.h index b0fb658d..6b069adc 100644 --- a/Crawler/MenuComponent.h +++ b/Crawler/MenuComponent.h @@ -151,4 +151,5 @@ public: virtual void SetMouseOutFunc(std::functionfunc); void SetGrayedOut(bool grayedOut); virtual void OnPlayerMoneyUpdate(uint32_t newMoney); + virtual void OnChapterUpdate(uint8_t newChapter); }; \ No newline at end of file diff --git a/Crawler/MenuIconButton.h b/Crawler/MenuIconButton.h index 332eada8..c2b9dec3 100644 --- a/Crawler/MenuIconButton.h +++ b/Crawler/MenuIconButton.h @@ -53,6 +53,7 @@ enum class IconButtonAttr{ class MenuIconButton:public MenuComponent{ protected: Decal*icon; + Pixel tint=WHITE; public: inline MenuIconButton(geom2d::rectrect,Decal*icon,MenuFunc onClick,IconButtonAttr attributes=IconButtonAttr::SELECTABLE) :MenuIconButton(rect,icon,MenuType::ENUM_END,onClick,attributes){} @@ -69,7 +70,7 @@ protected: MenuComponent::DrawDecal(window,focused); if(icon!=nullptr){ vf2d iconScale=rect.size/24.f; - window.DrawDecal(rect.middle()-icon->sprite->Size()*iconScale/2,icon,iconScale); + window.DrawDecal(rect.middle()-icon->sprite->Size()*iconScale/2,icon,iconScale,tint); } } }; diff --git a/Crawler/MenuItemItemButton.h b/Crawler/MenuItemItemButton.h index 6e15e0fd..1d09655d 100644 --- a/Crawler/MenuItemItemButton.h +++ b/Crawler/MenuItemItemButton.h @@ -54,6 +54,7 @@ private: std::string itemDescriptionLabelName; bool hideQty=false; CompactText compact=COMPACT; + bool hideDetails=false; public: inline MenuItemItemButton(geom2d::rectrect,const std::weak_ptritemRef,MenuType menuDest,MenuFunc onClick,std::string itemNameLabelName,std::string itemDescriptionLabelName,IconButtonAttr attributes=IconButtonAttr::SELECTABLE) :MenuIconButton(rect,!ISBLANK(itemRef)?const_cast(itemRef.lock()->Decal()):nullptr,menuDest,onClick,attributes),itemRef(itemRef),itemNameLabelName(itemNameLabelName),itemDescriptionLabelName(itemDescriptionLabelName){ @@ -74,6 +75,7 @@ public: inline const std::weak_ptrSetItem(const std::weak_ptrnewItem){ itemRef=newItem; UpdateIcon(); + UpdateLabel(); return itemRef; } inline void SetShowQuantity(bool show){ @@ -90,6 +92,14 @@ public: } icon=const_cast(itemRef.lock()->Decal()); } + inline void SetHideDetails(bool hideDetails){ + this->hideDetails=hideDetails; + if(hideDetails){ + tint=BLACK; + }else{ + tint=WHITE; + } + } protected: virtual inline void OnMouseOut()override{ if(itemNameLabelName!=""){ @@ -116,6 +126,10 @@ protected: icon=const_cast(itemRef.lock()->Decal()); labelNameText=itemRef.lock()->DisplayName(); labelDescriptionText=itemRef.lock()->Description(compact); + if(hideDetails){ + std::for_each(labelNameText.begin(),labelNameText.end(),[](char&c){c='?';}); + std::for_each(labelDescriptionText.begin(),labelDescriptionText.end(),[](char&c){c='?';}); + } if(itemNameLabelName!=""){ Component(parentMenu,itemNameLabelName)->label=labelNameText; Component(parentMenu,itemNameLabelName)->Enable(true); diff --git a/Crawler/RowInventoryScrollableWindowComponent.h b/Crawler/RowInventoryScrollableWindowComponent.h index 42edfecb..a27b9d9b 100644 --- a/Crawler/RowInventoryScrollableWindowComponent.h +++ b/Crawler/RowInventoryScrollableWindowComponent.h @@ -42,6 +42,7 @@ All rights reserved. class RowInventoryScrollableWindowComponent:public InventoryScrollableWindowComponent{ friend class InventoryCreator; + friend class Menu; protected: PriceLabel::PriceLabel priceLabel=PriceLabel::NONE; public: diff --git a/Crawler/RowItemDisplay.h b/Crawler/RowItemDisplay.h index f1688a9d..8ee0d04e 100644 --- a/Crawler/RowItemDisplay.h +++ b/Crawler/RowItemDisplay.h @@ -52,20 +52,23 @@ namespace PriceLabel{ } class RowItemDisplay:public MenuComponent{ - std::weak_ptritemRef; std::string itemNameLabelName; std::string itemDescriptionLabelName; CompactText compact=NON_COMPACT; bool showQuantity=true; PriceLabel::PriceLabel priceLabel=PriceLabel::NONE; bool fadeOutIfMissingRequirements=false; + bool hideLabelWhileLocked=false; +protected: + std::weak_ptritemRef; public: inline RowItemDisplay(geom2d::rectrect,const std::weak_ptritemRef,MenuFunc onClick,std::string itemNameLabelName,std::string itemDescriptionLabelName,ButtonAttr attributes=ButtonAttr::NONE) :MenuComponent(rect,"",onClick,attributes),itemNameLabelName(itemNameLabelName),itemDescriptionLabelName(itemDescriptionLabelName),itemRef(itemRef){ if(itemRef.lock()->IsEquippable())SetShowQuantity(false); } - virtual inline void DrawDecal(ViewPort&window,bool focused)final{ + virtual inline void DrawDecal(ViewPort&window,bool focused)override{ bool canEnhance=itemRef.lock()->CanEnhanceItem(); + bool locked=itemRef.lock()->EnhancementIsPossible()&&itemRef.lock()->GetEnhancementInfo().AvailableChapter()>game->GetCurrentChapter(); MenuComponent::DrawDecal(window,focused); @@ -77,17 +80,24 @@ public: float scaleFactor=(rect.size.y-4)/24; vf2d iconSize=vf2d{scaleFactor,scaleFactor}*24.f; - window.DrawDecal(rect.pos+vf2d{2,2},const_cast(itemRef.lock()->Decal()),{scaleFactor,scaleFactor}); + Pixel tint=WHITE; + if(locked)tint=BLACK; + + window.DrawDecal(rect.pos+vf2d{2,2},const_cast(itemRef.lock()->Decal()),{scaleFactor,scaleFactor},tint); window.DrawRectDecal(rect.pos+vf2d{2,2},iconSize); - std::string itemName=itemRef.lock()->DisplayName(); - vf2d scaledSize={std::min(1.f,(rect.size.x-6-iconSize.x)/game->GetTextSizeProp(itemName).x),1}; + #pragma region Item Name Display + std::string itemName=itemRef.lock()->DisplayName(); + vf2d scaledSize={std::min(1.f,(rect.size.x-6-iconSize.x)/game->GetTextSizeProp(itemName).x),1}; - if(!canEnhance&&fadeOutIfMissingRequirements){ - itemName="#666666"+itemName; - } + if(!canEnhance&&fadeOutIfMissingRequirements){ + itemName="#666666"+itemName; + } + + if(locked&&hideLabelWhileLocked)std::for_each(itemName.begin(),itemName.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}}); - window.DrawShadowStringPropDecal(rect.pos+vf2d{4,4}+vf2d{iconSize.x,iconSize.y/2-4},itemName,WHITE,BLACK,scaledSize); + window.DrawShadowStringPropDecal(rect.pos+vf2d{4,4}+vf2d{iconSize.x,iconSize.y/2-4},itemName,WHITE,BLACK,scaledSize); + #pragma endregion if(showQuantity&&itemRef.lock()->Amt()!=INFINITE){ std::string quantityText=std::format("x{}",itemRef.lock()->Amt()); @@ -161,6 +171,10 @@ public: labelNameText=""; labelDescriptionText=""; } + if(hideLabelWhileLocked&&itemRef.lock()->EnhancementIsPossible()&&itemRef.lock()->GetEnhancementInfo().AvailableChapter()>game->GetCurrentChapter()){ + std::for_each(labelNameText.begin(),labelNameText.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}}); + std::for_each(labelDescriptionText.begin(),labelDescriptionText.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}}); + } if(itemNameLabelName!=""){ Component(parentMenu,itemNameLabelName)->label=labelNameText; Component(parentMenu,itemNameLabelName)->Enable(true); @@ -179,4 +193,7 @@ public: inline void SetCheckCraftingRequirements(bool check){ this->fadeOutIfMissingRequirements=check; } + inline void SetHideLabelWhileLocked(bool hideWhileLocked){ + hideLabelWhileLocked=hideWhileLocked; + } }; \ No newline at end of file diff --git a/Crawler/State_OverworldMap.cpp b/Crawler/State_OverworldMap.cpp index 03d5d86b..0df7257c 100644 --- a/Crawler/State_OverworldMap.cpp +++ b/Crawler/State_OverworldMap.cpp @@ -99,6 +99,9 @@ void State_OverworldMap::OnUserUpdate(Crawler*game){ if(game->GetKey(B).bPressed){ Menu::OpenMenu(BLACKSMITH); } + if(game->GetKey(C).bPressed){ + Menu::OpenMenu(CRAFT_CONSUMABLE); + } #pragma region Handle Connection Point Clicking and Movement for(ConnectionPoint&cp:connections){ diff --git a/Crawler/Version.h b/Crawler/Version.h index fc9ad8a6..edc7eab8 100644 --- a/Crawler/Version.h +++ b/Crawler/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 1 -#define VERSION_BUILD 5036 +#define VERSION_BUILD 5056 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Crawler/assets/config/items/ItemDatabase.txt b/Crawler/assets/config/items/ItemDatabase.txt index 4892d3a1..4047ace7 100644 --- a/Crawler/assets/config/items/ItemDatabase.txt +++ b/Crawler/assets/config/items/ItemDatabase.txt @@ -86,7 +86,7 @@ ItemDatabase Crafting { # When this crafting recipe is available. - AvailableChapter = 1 + AvailableChapter = 2 Item[0] = Bear Claw,1 Item[1] = Bear Blood,1