nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
names.h
Go to the documentation of this file.
1#ifndef NANOMMO_CLIENT_NAMES_H_
2#define NANOMMO_CLIENT_NAMES_H_
3
4#include <cstdint>
5#include <string>
6#include <string_view>
7
8#include "content/content.h"
9
10namespace nanommo {
11
12/// The content's names, and its quests' words, in the language in use. The
13/// content keeps them in English, as ClientHash hashes them and the servers
14/// say them, so each is translated as it's shown, in a context that says what
15/// it names: by its kind and its id, such as "item 8", or, for those that
16/// have no id, its kind alone, such as "hair".
17const char* NameOf(const items::Item& item);
18const char* NameOf(const skills::Skill& skill);
19const char* NameOf(const monsters::Kind& kind);
20const char* NameOf(const npcs::Kind& kind);
21const char* NameOf(const quests::Quest& quest);
22const char* NameOf(const recipes::Recipe& recipe);
23const char* NameOf(const factions::Faction& faction);
24const char* NameOf(const figures::Hair& hair);
25const char* NameOf(const rig::Build& build);
26
27/// A monster's skill, which is numbered among its kind's: "monster 4 skill 1".
28const char* NameOf(uint32_t kind, const monsters::Skill& skill);
29
30/// A slot of the bag, which the content's SlotName says in English, as the
31/// servers do.
32const char* NameOf(items::Slot slot);
33
34/// What a quest's giver says, giving it.
35const char* TextOf(const quests::Quest& quest);
36
37/// So many of a kind of monster, "3 Skeletons", which the template has as its
38/// name after the count, with an s for more than one, as the English does.
39std::string NameOf(const monsters::Kind& kind, uint32_t count);
40
41/// So many of an item, "a Bone" or "3 Bones", which the template has as a
42/// plural of its own, as the English does.
43std::string NameOf(const items::Item& item, uint32_t count);
44
45/// A land's name, by its English one, which the servers and kLands use: one
46/// this client doesn't know stays as it is.
47std::string LandName(std::string_view land);
48
49} // namespace nanommo
50
51#endif // NANOMMO_CLIENT_NAMES_H_
Definition chat.cc:9
std::string LandName(std::string_view land)
Definition names.cc:92
const char * TextOf(const quests::Quest &quest)
What a quest's giver says, giving it.
Definition names.cc:55
const char * NameOf(const items::Item &item)
Definition names.cc:14