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:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user