VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
ClientLanguage.hpp
Go to the documentation of this file.
1#pragma once
2
7
9{
10
11/** Gives a player with no language yet the one their Steam client runs in (`cl_language`). The
12 * language lives in the host, so the first plugin to hear back sets it for all; a pick made in a
13 * plugin's menu still wins. */
15{
16public:
18
19private:
20 ClientConVars& _clientConVars;
21 Translations& _translations;
22 /** Declared last so the handler stops before the state it captures. */
23 Subscription _connected;
24};
25
26} // namespace VoltMod::Internal
Asks a connected client what one of its own convars is set to.
The roster: every connected player, and the signals for the connection lifecycle.
Owns one registration and releases it on destruction.
Localization system. Loads one JSON file per language; nested objects flatten into dotted keys (categ...
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56