1#ifndef NANOMMO_CONTENT_ITEMS_H_
2#define NANOMMO_CONTENT_ITEMS_H_
9#include "absl/status/statusor.h"
10#include "content/items.pb.h"
19 std::map<uint32_t, items::Item>
by_id;
28absl::StatusOr<ItemTable>
ParseItems(std::string_view text);
31uint32_t
StackSize(
const items::Item& item);
34uint32_t
CountOf(
const items::Stack& stack);
37std::string_view
SlotName(items::Slot slot);
uint32_t CountOf(const items::Stack &stack)
How many are in the stack, which is one when it doesn't say.
absl::StatusOr< ItemTable > ParseItems(std::string_view text)
constexpr uint32_t kBagSlots
How many slots each player's bag has.
uint32_t StackSize(const items::Item &item)
How many of the item go in one slot of a bag.
std::string_view SlotName(items::Slot slot)
The slot's name, as a player would say it, such as "main hand".
The items in the items file, by id.
std::vector< items::Stack > starting
What each new player starts with.
std::map< uint32_t, items::Item > by_id