summaryrefslogtreecommitdiffstats
path: root/game/shared/world/item_registry.hh
blob: b4c9fdac6ccae0d0618990e3996b95bdc45c1ac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "shared/world/item.hh"

namespace world::item_registry
{
extern std::unordered_map<std::string, item_id> names;
extern std::vector<std::unique_ptr<Item>> items;
} // namespace world::item_registry

namespace world::item_registry
{
Item* register_item(const ItemBuilder& builder);
Item* find(std::string_view name);
Item* find(const item_id item);
} // namespace world::item_registry

namespace world::item_registry
{
void purge(void);
} // namespace world::item_registry

namespace world::item_registry
{
std::uint64_t get_checksum(void);
} // namespace world::item_registry