Initial commit

This commit is contained in:
2019-10-06 13:50:52 +02:00
commit 265923231f
44 changed files with 16258 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#ifndef CREATURELIB_ITEMLIBRARY_HPP
#define CREATURELIB_ITEMLIBRARY_HPP
#include <string>
#include <unordered_map>
#include "Items/Item.hpp"
namespace CreatureLib::Library {
class ItemLibrary {
private:
std::unordered_map<std::string, const Item *> _items;
public:
ItemLibrary() = default;
~ItemLibrary(){
_items.clear();
}
[[nodiscard]] const Item* GetItem(const std::string& name) const;
[[nodiscard]] const Item* operator[] (const std::string& name) const;
void LoadItem(const std::string& name, const Item* item);
void DeleteItem(const std::string& name);
};
}
#endif //CREATURELIB_ITEMLIBRARY_HPP