#ifndef PKMNLIB_ITEMLIBRARY_HPP #define PKMNLIB_ITEMLIBRARY_HPP #include #include "Item.hpp" namespace PkmnLib::Library { class ItemLibrary final : public CreatureLib::Library::ItemLibrary { public: inline bool TryGet(const ArbUt::BasicStringView& name, ArbUt::BorrowedPtr& item) const { auto v = item.As(); auto res = CreatureLib::Library::ItemLibrary::TryGet(name.GetHash(), v); item = v.ForceAs(); return res; } inline ArbUt::BorrowedPtr Get(const ArbUt::BasicStringView& name) const { return CreatureLib::Library::ItemLibrary::Get(name).ForceAs(); } inline ArbUt::BorrowedPtr operator[](const ArbUt::BasicStringView& name) const { return Get(name); } }; } #endif // PKMNLIB_ITEMLIBRARY_HPP