Typo on Accessories. Initialize listener categories

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2023-10-18 17:51:08 +00:00
parent 46462a24e7
commit 1f40e846ac
5 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -1,4 +1,3 @@
#pragma once
#include "Item.h"
#include "safemap.h"
#include "DEFINES.h"
@@ -26,6 +25,7 @@ void ItemInfo::InitializeItems(){
for(auto&key:DATA["ItemCategory"].GetKeys()){
ITEM_CATEGORIES[key.first];
Inventory::sortedInv[key.first];
Menu::inventoryListeners[key.first];
}
for(auto&key:DATA["ItemDatabase"].GetKeys()){
@@ -75,6 +75,7 @@ void ItemInfo::InitializeItems(){
ITEM_DATA.SetInitialized();
ITEM_CATEGORIES.SetInitialized();
Menu::inventoryListeners.SetInitialized();
std::cout<<ITEM_DATA.size()<<" items have been loaded."<<std::endl;
std::cout<<ITEM_CATEGORIES.size()<<" item categories have been loaded."<<std::endl;
+1
View File
@@ -11,6 +11,7 @@ std::vector<Menu*>Menu::stack;
std::map<MenuType,Menu*>Menu::menus;
std::string Menu::themeSelection="BlueDefault";
safeunorderedmap<std::string,Theme>Menu::themes;
safemap<ITCategory,std::vector<MenuComponent*>>Menu::inventoryListeners;
const vf2d Menu::CENTERED = {-456,-456};
INCLUDE_GFX
+1
View File
@@ -22,6 +22,7 @@ enum MenuType{
class Menu:IAttributable{
friend class Crawler;
friend class Player;
friend class ItemInfo;
float buttonHoldTime=0;
std::vector<MenuComponent*>displayComponents; //Comp.onents that are only for displaying purposes.
+1
View File
@@ -1,6 +1,7 @@
#pragma once
#include "Menu.h"
#include "MenuComponent.h"
#include "MenuItemButton.h"
#include "Crawler.h"
typedef Attribute A;
+1 -1
View File
@@ -3,6 +3,6 @@ ItemCategory
# Random side note, these descriptions aren't used anywhere in-game atm.
Consumables = Items that will be consumed after a single use.
Equipment = Gear that can be placed onto a player.
Accesories = Items worn as extra items on the player.
Accessories = Items worn as extra items on the player.
Materials = Items used as crafting materials for the forge.
}