Typo on Accessories. Initialize listener categories

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
pull/28/head
parent 46462a24e7
commit 1f40e846ac
  1. 3
      Crawler/Item.cpp
  2. 1
      Crawler/Menu.cpp
  3. 1
      Crawler/Menu.h
  4. 1
      Crawler/ScrollableWindowComponent.h
  5. 2
      Crawler/assets/config/items/ItemCategory.txt

@ -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;

@ -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

@ -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,6 +1,7 @@
#pragma once
#include "Menu.h"
#include "MenuComponent.h"
#include "MenuItemButton.h"
#include "Crawler.h"
typedef Attribute A;

@ -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.
}
Loading…
Cancel
Save