nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
bag.h
Go to the documentation of this file.
1#ifndef NANOMMO_BOT_BAG_H_
2#define NANOMMO_BOT_BAG_H_
3
4#include <optional>
5
6#include "content/items.h"
7#include "protocol/nanommo.pb.h"
8
9namespace nanommo {
10
11/// What a bot does with its bag, if anything: drinks something that heals,
12/// once it's down to half its health and can drink again, or else wears
13/// something that's worn in a slot it has free.
14std::optional<protocol::ItemAction> Tend(const ItemTable& items,
15 const protocol::Inventory& bag,
16 int health, int max_health,
17 bool can_drink);
18
19} // namespace nanommo
20
21#endif // NANOMMO_BOT_BAG_H_
Definition chat.cc:9
std::optional< protocol::ItemAction > Tend(const ItemTable &items, const protocol::Inventory &bag, int health, int max_health, bool can_drink)
Definition bag.cc:10
The items in the items file, by id.
Definition items.h:18