29 std::same_as<T, bool> || std::same_as<T, int> || std::same_as<T, float> || std::same_as<T, std::string>;
53 : _cvar(std::exchange(
other._cvar,
nullptr)), _previous(std::move(
other._previous))
95 std::string_view
Name()
const {
return _name; }
103 void SetRaw(
const T& value)
126 template <ConVarValue T>
142 void SetByConsole(std::string_view name, std::string_view value);
151 bool SendToClient(
int slot, std::string_view name, std::string_view value);
156 void StopRoutingChanges();
159 bool _routingChanges =
false;
ConVarRawScope(const ConVarRawScope &)=delete
ConVarRawScope & operator=(ConVarRawScope &&)=delete
ConVarRawScope(ConVarRawScope &&other) noexcept
ConVarRawScope & operator=(const ConVarRawScope &)=delete
ConVarRawScope< T > RawScope(const T &value)
std::string_view Name() const
friend class ConVarRawScope< T >
Status Set(const T &value)
void SetFor(int slot, const T &value) const
void SetByConsole(std::string_view name, std::string_view value)
Assign a convar over the console, quoting the value.
Result< ConVar< T > > Find(std::string_view name)
Status ExecuteFile(std::string_view path)
ConVars(const ConVars &)=delete
Event< const ConVarChange & > Changed
ConVars & operator=(const ConVars &)=delete
void ExecuteServerCommand(std::string_view command)
A multicast signal with a fixed handler signature: the one way to subscribe in VoltMod.
std::string ConVarText< std::string >(const std::string &value)
std::string ConVarText(const T &value)
std::string ConVarText< int >(const int &value)
static std::string ReadFile(const std::filesystem::path &path)
std::expected< void, Error > Status
std::string ConVarText< float >(const float &value)
std::expected< T, Error > Result
std::string ConVarText< bool >(const bool &value)
std::string_view OldValue
std::string_view NewValue
Centralized holder for all HL2SDK interface pointers.