Fixed detection of craftable items that aren't enhanceable (failed out of bounds checks). Hide information about craftable items that have yet to be unlocked.

This commit is contained in:
2023-12-29 01:00:42 -06:00
parent 4e3c9877e7
commit c876f8a6ea
15 changed files with 119 additions and 110 deletions
+8
View File
@@ -56,6 +56,7 @@ safeunorderedmap<std::string,Theme>Menu::themes;
safemap<ITCategory,std::vector<MenuComponent*>>Menu::inventoryListeners;
safemap<ITCategory,std::vector<MenuComponent*>>Menu::merchantInventoryListeners;
std::vector<MenuComponent*>Menu::equipStatListeners;
std::vector<MenuComponent*>Menu::chapterListeners;
const vf2d Menu::CENTERED = {-456,-456};
std::vector<MenuComponent*>Menu::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 "<<component->name<<" has already been added to the Chapter listener list! There should not be any duplicates!!")
}
chapterListeners.push_back(component);
}