1#ifndef NANOMMO_PROTOCOL_MESSAGES_H_
2#define NANOMMO_PROTOCOL_MESSAGES_H_
12#include "absl/status/status.h"
14#include "protocol/nanommo.pb.h"
21std::string
Fill(std::string_view text, std::span<const std::string> args);
47Part Of(
const items::Item& item, uint32_t count = 0);
55Part Of(
const monsters::Kind& kind, uint32_t count = 0);
59Part Of(
const npcs::Kind& kind);
60Part Of(
const quests::Quest& quest);
61Part Of(
const skills::Skill& skill);
62Part Of(
const factions::Faction& faction);
71std::pair<std::string, std::string>
Counted(
const items::Item& item);
72std::pair<std::string, std::string>
Counted(
const monsters::Kind& kind);
79 return Number(
static_cast<uint64_t
>(number));
82Sentence Make(std::string_view one, std::string_view many, uint64_t count,
83 std::vector<Part> parts);
91template <
typename...
Parts>
99template <
typename...
Parts>
100Sentence MsgN(std::string_view one, std::string_view many, uint64_t count,
109absl::Status
Refusal(absl::StatusCode code,
const Sentence& why);
113Sentence
SentenceOf(
const absl::Status& status);
117std::string
English(
const protocol::Message& message,
const Content& content);
Sentence Make(std::string_view one, std::string_view many, uint64_t count, std::vector< Part > parts)
Part Number(uint64_t number)
A number, as it is.
std::pair< std::string, std::string > Counted(const items::Item &item)
Sentence MsgN(std::string_view one, std::string_view many, uint64_t count, Parts... parts)
absl::Status Refusal(absl::StatusCode code, const Sentence &why)
Sentence SentenceOf(const absl::Status &status)
std::string Fill(std::string_view text, std::span< const std::string > args)
std::string English(const protocol::Message &message, const Content &content)
Mesh Parts(const Model &model, const std::vector< figures::Part > &parts, float metre)
Sentence Msg(std::string_view text, Parts... parts)
Part Name(std::string_view name)
Part Of(const items::Item &item, uint32_t count)
The items in the items file, by id.
protocol::Message message