nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
factions.h
Go to the documentation of this file.
1#ifndef NANOMMO_BOT_FACTIONS_H_
2#define NANOMMO_BOT_FACTIONS_H_
3
4#include <cstdint>
5#include <optional>
6
7#include "bot/quests.h"
8#include "content/content.h"
9#include "protocol/nanommo.pb.h"
10
11namespace nanommo {
12
13/// The faction a bot swears to, by its id in the factions file: each in turn,
14/// by the bot's seed, so that a crowd of bots wears all their colours. 0 for
15/// content without any.
16uint32_t FactionFor(const Content& content, uint32_t seed);
17
18/// A trip to the faction's herald, to swear to it, where the bot sees them,
19/// or, in the land the bot's in, by its place in kLands, to where the NPCs
20/// file stands them, with no herald to swear at until it sees them there.
21/// Nothing in a land without them.
22std::optional<Errand> Oath(const Content& content, uint32_t faction,
23 const protocol::World& seen, int land);
24
25/// Whether the world shows the bot sworn to a faction, which comes with its
26/// name, once a second.
27bool Sworn(const protocol::World& seen);
28
29} // namespace nanommo
30
31#endif // NANOMMO_BOT_FACTIONS_H_
Definition chat.cc:9
bool Sworn(const protocol::World &seen)
Definition factions.cc:46
std::optional< Errand > Oath(const Content &content, uint32_t faction, const protocol::World &seen, int land)
Definition factions.cc:21
uint32_t FactionFor(const Content &content, uint32_t seed)
Definition factions.cc:12