yapb-noob-edition/inc/product.h
jeefo 7b58d51973
bot: refactor and clean up old code
fix: crash when saving old format pwf on hlds
bot: moved sdk headers to separate submodule
nav: improved unstuck and avoidance (thanks @commandcobra7) code
bot: use correct path slashes depending on platform for all data
cfg: removed simplified chines' translation, as it's too outdated
2023-05-12 20:00:06 +03:00

70 lines
2.3 KiB
C++

//
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
//
// SPDX-License-Identifier: MIT
//
#pragma once
#ifdef VERSION_GENERATED
# define VERSION_HEADER <version.build.h>
#else
# define VERSION_HEADER <version.h>
#endif
#include VERSION_HEADER
// simple class for bot internal information
class Product final : public Singleton <Product> {
public:
explicit constexpr Product () = default;
~Product () = default;
public:
struct Build {
static constexpr StringRef hash { MODULE_COMMIT_COUNT };
static constexpr StringRef count { MODULE_COMMIT_HASH };
static constexpr StringRef author { MODULE_AUTHOR };
static constexpr StringRef machine { MODULE_MACHINE };
static constexpr StringRef compiler { MODULE_COMPILER };
static constexpr StringRef id { MODULE_BUILD_ID };
} build {};
public:
static constexpr StringRef name { "YaPB" };
static constexpr StringRef nameLower { "yapb" };
static constexpr StringRef year { &__DATE__[7] };
static constexpr StringRef author { "YaPB Project" };
static constexpr StringRef email { "yapb@jeefo.net" };
static constexpr StringRef url { "https://yapb.jeefo.net/" };
static constexpr StringRef download { "yapb.jeefo.net" };
static constexpr StringRef logtag { "YB" };
static constexpr StringRef dtime { __DATE__ " " __TIME__ };
static constexpr StringRef date { __DATE__ };
static constexpr StringRef version { MODULE_VERSION "." MODULE_COMMIT_COUNT };
static constexpr StringRef cmdPri { "yb" };
static constexpr StringRef cmdSec { "yapb" };
};
class Folders final : public Singleton <Folders> {
public:
explicit constexpr Folders () = default;
~Folders () = default;
public:
static constexpr StringRef bot { "yapb" };
static constexpr StringRef addons { "addons" };
static constexpr StringRef config { "conf" };
static constexpr StringRef data { "data" };
static constexpr StringRef lang { "lang" };
static constexpr StringRef logs { "logs" };
static constexpr StringRef train { "train" };
static constexpr StringRef graph { "graph" };
static constexpr StringRef podbot { "pwf" };
static constexpr StringRef ebot { "ewp" };
};
// expose product info
CR_EXPOSE_GLOBAL_SINGLETON (Product, product);
CR_EXPOSE_GLOBAL_SINGLETON (Folders, folders);