|
VoltMod
C++23 framework for CS2 server plugins
|
#include <Map.hpp>
Public Member Functions | |
| Map (Interfaces &interfaces, ConVars &conVars) | |
| bool | IsValid (std::string_view name) const |
| bool | ChangeLevel (std::string_view name) |
| bool | ChangeToWorkshop (uint64_t workshopId) |
| std::string | Current () const |
| void | SetCurrent (std::string name) |
Public Attributes | |
| Event< std::string_view > | Started |
| VoltMod::Map::Map | ( | Interfaces & | interfaces, |
| ConVars & | conVars | ||
| ) |
| bool VoltMod::Map::ChangeLevel | ( | std::string_view | name | ) |
Validate and queue a non-workshop map change.
Definition at line 32 of file Map.cpp.
References VoltMod::Interfaces::Engine, IsValid(), VoltMod::ReadFile(), and VoltMod::Log::Warn().
Queue host_workshop_map. Returns false for zero or when queuing fails.
Definition at line 45 of file Map.cpp.
References VoltMod::ConVars::ExecuteServerCommand(), VoltMod::ReadFile(), and VoltMod::Log::Warn().
| std::string VoltMod::Map::Current | ( | ) | const |
The map being played: the StartupServer name, or the engine globals' mapname after a late load. Empty when neither is available.
Definition at line 57 of file Map.cpp.
References VoltMod::Interfaces::Engine.
| bool VoltMod::Map::IsValid | ( | std::string_view | name | ) | const |
Whether the engine can load a mounted, non-workshop map.
Definition at line 15 of file Map.cpp.
References VoltMod::Interfaces::Engine, VoltMod::ReadFile(), and VoltMod::Log::Warn().
Referenced by ChangeLevel().
|
inline |
| Event<std::string_view> VoltMod::Map::Started |