7 #ifndef CAFU_GAMESYS_COMPONENT_INVENTORY_HPP_INCLUDED
8 #define CAFU_GAMESYS_COMPONENT_INVENTORY_HPP_INCLUDED
10 #include "../CompBase.hpp"
35 const char*
GetName()
const {
return "Inventory"; }
47 static int Get(lua_State* LuaState);
48 static int Set(lua_State* LuaState);
49 static int Add(lua_State* LuaState);
50 static int CheckMax(lua_State* LuaState);
51 static int toString(lua_State* LuaState);
54 static const char* DocClass;
64 std::map<std::string, uint16_t> m_Items;
This component keeps an inventory count for an arbitrary set of items.
Definition: CompInventory.hpp:22
static const luaL_Reg MethodsList[]
The list of Lua methods for this class.
Definition: CompInventory.hpp:53
ComponentInventoryT()
The constructor.
Definition: CompInventory.cpp:37
This class is used for reading data from a StateT instance (deserialization).
Definition: State.hpp:207
const char * GetName() const
Returns the name of this component.
Definition: CompInventory.hpp:35
This class is used for writing data into a StateT instance (serialization).
Definition: State.hpp:81
ComponentInventoryT * Clone() const
The virtual copy constructor.
Definition: CompInventory.cpp:91
Definition: TypeSys.hpp:52
Definition: TypeSys.hpp:57
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
Definition: TypeSys.hpp:68
This is the base class for the components that an entity is composed/aggregated of.
Definition: CompBase.hpp:54