|
VoltMod
C++23 framework for CS2 server plugins
|
#include <ConVar.hpp>
Public Member Functions | |
| ConVar ()=default | |
| T | Get () const |
| Status | Set (const T &value) |
| void | SetFor (int slot, const T &value) const |
| ConVarRawScope< T > | RawScope (const T &value) |
| std::string_view | Name () const |
| operator bool () const noexcept | |
Friends | |
| class | ConVarRawScope< T > |
| class | ConVars |
Typed convar handle resolved once by name. Supported types are bool, int, float, and std::string. Handles remain valid across map changes. Unresolved handles read as T{} and reject writes.
Definition at line 71 of file ConVar.hpp.
|
default |
| T VoltMod::ConVar< T >::Get | ( | ) | const |
Current server value, or T{} when unresolved.
Definition at line 69 of file ConVar.cpp.
References VoltMod::Int16, VoltMod::ReadFile(), VoltMod::T, and VoltMod::UInt16.
|
inline |
Definition at line 95 of file ConVar.hpp.
|
inlineexplicitnoexcept |
Definition at line 97 of file ConVar.hpp.
|
inline |
Set without callbacks or networking until the returned scope is destroyed.
Definition at line 89 of file ConVar.hpp.
References VoltMod::ConVar< T >::ConVarRawScope< T >.
Set through the server console. Success means queued; Error::NotReady means unavailable.
Definition at line 107 of file ConVar.cpp.
References VoltMod::ConVarText(), and VoltMod::Error::NotReady().
Override one client's replicated view without changing the server value. Connect and map snapshots replace the override, so resend it after spawn when persistence is required.
Definition at line 156 of file ConVar.cpp.
References VoltMod::ConVarText(), and VoltMod::ReadFile().
Definition at line 97 of file ConVar.hpp.
Referenced by VoltMod::ConVar< T >::RawScope().