|
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 | SendTo (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 64 of file ConVar.cpp.
References VoltMod::Int16, VoltMod::T, and VoltMod::UInt16.
Referenced by VoltMod::ConVarOverrides::Set().
|
inline |
Definition at line 95 of file ConVar.hpp.
Referenced by VoltMod::ConVarOverrides::Restore(), and VoltMod::ConVarOverrides::Set().
|
inlineexplicitnoexcept |
Definition at line 97 of file ConVar.hpp.
|
inlinenodiscard |
Set without callbacks or networking until the returned scope is destroyed.
Definition at line 89 of file ConVar.hpp.
References ConVarRawScope< T >.
| void VoltMod::ConVar< T >::SendTo | ( | int | slot, |
| const T & | value ) const |
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 151 of file ConVar.cpp.
References VoltMod::ConVarText().
| Status VoltMod::ConVar< T >::Set | ( | const T & | value | ) |
Set through the server console. Success means queued; Error::NotReady means unavailable.
Definition at line 102 of file ConVar.cpp.
References VoltMod::ConVarText(), and VoltMod::Error::NotReady().
Referenced by VoltMod::ConVarOverrides::Set().
|
friend |
Definition at line 97 of file ConVar.hpp.
Referenced by RawScope().
|
friend |