26 return Subscription([before = std::move(before), after = std::move(after)]()
mutable {
46 [&events = host.Events()](
ScreenManager& screens) { return WatchPresses(events, screens); }),
47 AddonManager(host.Addons()),
48 Exchange(host.Services()),
51 Policy.
HasPermission = [
this, warned =
false](int64_t steamId, std::string_view permission)
mutable {
54 return permissions->HasPermission(steamId, permission);
93 return Subscription([menu = std::move(menu), preferred = std::move(preferred)]()
mutable {
99void Runtime::CheckServices()
115void Runtime::AddStatusSections()
120 Status.RegisterSection(
"load", [
this] {
121 std::map<std::string, std::string> failed;
122 for (
const FailedCheck& check :
LoadReport.Failures())
124 failed.emplace(check.Name, check.Reason);
129 Status.RegisterSection(
"uptime", [start = std::chrono::steady_clock::now()] {
130 const auto uptime = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now() - start);
131 return Json::Write(glz::obj{
"seconds", uptime.count()});
Asks a connected client what one of its own convars is set to.
Every entity's damage, from CBaseEntity::TakeDamageOld, and a way to deal it.
Creates, fires and listens to game events.
static std::string Write(const T &value)
Serialize value as compact JSON.
bool Optional(std::string_view name, Status result)
bool Required(std::string_view name, Status result)
Send chat, center print, center HTML, and alert messages.
Each player's command from CCSPlayer_MovementServices::RunCommand.
Per-client network access: latency, userids, usercmd status and the client's replicated userinfo cvar...
The one permission and targeting gate, plus the plugin's reply callback.
std::function< bool(int64_t steamId, std::string_view permission)> HasPermission
VoltMod::Movement Movement
MultiAddonManager AddonManager
const std::string PluginName
VoltMod::Translations Translations
VoltMod::LoadReport LoadReport
VoltMod::MenuFreeze Freeze
VoltMod::Scheduler Scheduler
std::string PluginFile(std::string_view relative) const
const std::string Version
VoltMod::ScreenManager Screens
Runtime(IPluginContext &host, UnsafeServices &unsafe, PlayerLanguages &languages)
Subscription UsePanorama(PanoramaMenuLayout &layout)
VoltMod::ChatInput ChatInput
Create Screen objects and report their button presses.
void RegisterSection(std::string name, Provider provider)
Add a section, replacing any existing one with the same name.
Owns one registration and releases it on destruction.
Report player pawn moves through CBaseEntity::Teleport.
Outgoing TextMsg user messages, the game's own lines included.
runtime.Trace: line and box traces against the physics world. Game-thread only.
Localization system. Loads one JSON file per language; nested objects flatten into dotted keys (categ...
Which clients receive which entities, filtered after CheckTransmit.
Subscription HostSubscription(IPluginEvents &events, uint64_t token)
void Warn(std::format_string< Args... > fmt, Args &&... args)
static Subscription WatchPresses(IPluginEvents &events, ScreenManager &screens)
constexpr std::string_view Name(E value) noexcept
std::string PluginFile(std::string_view plugin, std::string_view relative)
"addons/voltmod/plugins/<plugin>/<relative>".
static Subscription WatchCommands(IPluginEvents &events, Movement &movement)
The server's permission source, published by one plugin (admin-system) through runtime....
static constexpr std::string_view InterfaceName
virtual uint64_t OnPlayerCommandDone(PlayerCommandFn callback, void *context)=0
virtual uint64_t OnButtonPress(ButtonPressFn callback, void *context)=0
virtual uint64_t OnPlayerCommand(PlayerCommandFn callback, void *context)=0
Opt-in access to raw engine interfaces and typed gamedata bindings.