|
VoltMod
C++23 framework for CS2 server plugins
|
Framework services for one load and unload cycle. More...
#include <Runtime.hpp>
Public Member Functions | |
| Runtime (IPluginContext &host, UnsafeServices &unsafe, PlayerLanguages &languages) | |
| ~Runtime () | |
| Runtime (const Runtime &)=delete | |
| Runtime & | operator= (const Runtime &)=delete |
| void | OnGameFrame () |
| std::string | PluginFile (std::string_view relative) const |
| Subscription | UsePanorama (PanoramaMenuLayout &layout) |
Framework services for one load and unload cycle.
Members are declared in dependency order, and each engine service does its setup when built; a feature that did not bind says why in its Available() and in LoadReport. Screens follow the hook tiers so their hooks are removed first.
Definition at line 57 of file Runtime.hpp.
| VoltMod::Runtime::Runtime | ( | IPluginContext & | host, |
| UnsafeServices & | unsafe, | ||
| PlayerLanguages & | languages ) |
host, unsafe and languages outlive the runtime; the plugin module opened unsafe first.
Definition at line 38 of file Runtime.cpp.
References Movement, VoltMod::Name(), PluginName, Translations, Unsafe, Version, and VoltMod::WatchCommands().
Referenced by operator=(), and Runtime().
| VoltMod::Runtime::~Runtime | ( | ) |
Definition at line 68 of file Runtime.cpp.
References VoltMod::Log::DeliverPending(), and Http.
|
delete |
References Runtime().
| void VoltMod::Runtime::OnGameFrame | ( | ) |
Drive the scheduler. Called once per frame from the GameFrame hook.
Definition at line 135 of file Runtime.cpp.
References VoltMod::Log::DeliverPending(), and Scheduler.
| std::string VoltMod::Runtime::PluginFile | ( | std::string_view | relative | ) | const |
"addons/voltmod/plugins/<PluginName>/<relative>".
Definition at line 75 of file Runtime.cpp.
References VoltMod::PluginFile(), and PluginName.
|
nodiscard |
Draw menus on layout for players who have it, center HTML for the rest, while the returned Subscription lives. Hold it below layout, which the menu refers to. A player still downloading a required addon gets center HTML.
Definition at line 80 of file Runtime.cpp.
References AddonManager, ChatInput, Freeze, Menus, Policy, Scheduler, Screens, Slots, and Translations.
| MultiAddonManager VoltMod::Runtime::AddonManager |
Definition at line 164 of file Runtime.hpp.
Referenced by UsePanorama().
| CenterHtmlMenu VoltMod::Runtime::CenterHtml |
Definition at line 171 of file Runtime.hpp.
| VoltMod::ChatInput VoltMod::Runtime::ChatInput {Scheduler, Slots} |
The next chat line from a player, for menu prompts.
Definition at line 142 of file Runtime.hpp.
Referenced by UsePanorama().
| VoltMod::ClientConVars VoltMod::Runtime::ClientConVars {Unsafe.Interfaces, Unsafe.Bindings, Slots} |
Ask a client for one of its own convars.
Definition at line 153 of file Runtime.hpp.
| VoltMod::Clock VoltMod::Runtime::Clock {Unsafe.Interfaces} |
Definition at line 121 of file Runtime.hpp.
| VoltMod::CommandManager VoltMod::Runtime::Commands |
Definition at line 183 of file Runtime.hpp.
| VoltMod::ConVars VoltMod::Runtime::ConVars {Unsafe.Interfaces} |
Definition at line 111 of file Runtime.hpp.
| VoltMod::Damage VoltMod::Runtime::Damage {Entities, Unsafe.Bindings, Unsafe.Interfaces, GameEvents} |
Definition at line 158 of file Runtime.hpp.
| EntitySystem VoltMod::Runtime::Entities {Unsafe.Interfaces, Unsafe.Bindings} |
Schema field offsets resolve themselves, per process rather than per load - see Field.
Definition at line 102 of file Runtime.hpp.
| ServiceExchange VoltMod::Runtime::Exchange |
Definition at line 166 of file Runtime.hpp.
| VoltMod::MenuFreeze VoltMod::Runtime::Freeze {Entities, Scheduler, Slots} |
Holds players still while a menu is open. Disabled by default.
Definition at line 169 of file Runtime.hpp.
Referenced by UsePanorama().
| VoltMod::GameEvents VoltMod::Runtime::GameEvents {Unsafe.Interfaces, Unsafe.Bindings} |
Definition at line 117 of file Runtime.hpp.
| HttpClient VoltMod::Runtime::Http {Scheduler} |
HTTP client. Completions are replayed on the game thread.
Definition at line 186 of file Runtime.hpp.
Referenced by ~Runtime().
| VoltMod::LoadReport VoltMod::Runtime::LoadReport |
Definition at line 84 of file Runtime.hpp.
| VoltMod::Map VoltMod::Runtime::Map {Unsafe.Interfaces, ConVars} |
Map validation and level changes. The current map is captured from StartupServer, so it is empty after a late load until the next map change.
Definition at line 115 of file Runtime.hpp.
| MenuRouter VoltMod::Runtime::Menus {CenterHtml} |
Routes menus to center HTML or a plugin-preferred surface.
Definition at line 181 of file Runtime.hpp.
Referenced by UsePanorama().
| VoltMod::Messages VoltMod::Runtime::Messages {Unsafe.Interfaces, GameEvents, Translations} |
Definition at line 119 of file Runtime.hpp.
| VoltMod::Movement VoltMod::Runtime::Movement |
Per-player usercmds from the host's RunCommand hook, listened to while subscribed.
Definition at line 136 of file Runtime.hpp.
Referenced by Runtime().
| VoltMod::NetChannels VoltMod::Runtime::NetChannels {Unsafe.Interfaces} |
Per-client latency and replicated userinfo cvars.
Definition at line 127 of file Runtime.hpp.
| PlayerManager VoltMod::Runtime::Players {Slots, &Entities} |
Definition at line 104 of file Runtime.hpp.
| const std::string VoltMod::Runtime::PluginName |
The plugin's plugin.json name and directory under addons/voltmod/plugins/.
Definition at line 70 of file Runtime.hpp.
Referenced by PluginFile(), and Runtime().
| VoltMod::Policy VoltMod::Runtime::Policy {Players} |
Plugin-supplied permission, targeting and reply rules, and the one gate that applies them (Policy::Authorize). HasPermission asks whichever plugin publishes IPermissions until a plugin sets its own.
Definition at line 109 of file Runtime.hpp.
Referenced by UsePanorama().
| VoltMod::Precache VoltMod::Runtime::Precache |
Resources for the next map's session manifest.
Definition at line 124 of file Runtime.hpp.
| VoltMod::Rounds VoltMod::Runtime::Rounds {Entities, Unsafe.Bindings, Clock} |
The round timer, and ending the current round with a winner.
Definition at line 133 of file Runtime.hpp.
| VoltMod::Scheduler VoltMod::Runtime::Scheduler |
Per-frame delivery, timers, and delayed work. Pending timers are discarded on destruction; their callbacks may capture only members declared above Scheduler.
Definition at line 94 of file Runtime.hpp.
Referenced by OnGameFrame(), and UsePanorama().
| VoltMod::ScreenManager VoltMod::Runtime::Screens |
Definition at line 162 of file Runtime.hpp.
Referenced by UsePanorama().
| SlotEvents VoltMod::Runtime::Slots |
Definition at line 88 of file Runtime.hpp.
Referenced by UsePanorama().
| StatusService VoltMod::Runtime::Status |
Definition at line 86 of file Runtime.hpp.
| VoltMod::Teleport VoltMod::Runtime::Teleport {Entities, Unsafe.Bindings} |
Definition at line 144 of file Runtime.hpp.
| VoltMod::TextMessages VoltMod::Runtime::TextMessages {Unsafe.Interfaces} |
Chat, center and alert lines on their way to the clients.
Definition at line 147 of file Runtime.hpp.
| VoltMod::Trace VoltMod::Runtime::Trace {Unsafe.Bindings} |
Line and box traces for sight and reachability questions.
Definition at line 130 of file Runtime.hpp.
| VoltMod::Translations VoltMod::Runtime::Translations |
Definition at line 96 of file Runtime.hpp.
Referenced by Runtime(), and UsePanorama().
| UnsafeServices& VoltMod::Runtime::Unsafe |
The opt-in engine-access tier (Interfaces, Bindings), resolved before any service.
Definition at line 99 of file Runtime.hpp.
Referenced by Runtime().
| const std::string VoltMod::Runtime::Version |
The plugin's plugin.json version.
Definition at line 72 of file Runtime.hpp.
Referenced by Runtime().
| VoltMod::Visibility VoltMod::Runtime::Visibility {Entities, Slots} |
Which clients receive which entities.
Definition at line 139 of file Runtime.hpp.
| VoltMod::Voice VoltMod::Runtime::Voice {Unsafe.Interfaces, Players} |
Who hears whose voice.
Definition at line 150 of file Runtime.hpp.
| VoltMod::Vote VoltMod::Runtime::Vote {Unsafe.Interfaces, Entities, Players, GameEvents, Scheduler} |
The game's yes/no vote panel.
Definition at line 156 of file Runtime.hpp.
| VoltMod::WeaponDrop VoltMod::Runtime::WeaponDrop {Entities, Unsafe.Bindings} |
Definition at line 160 of file Runtime.hpp.