12 : _state(
state), _name(std::
move(name)), _logTag(std::
move(logTag)), _version(std::
move(version)), _order(
order)
99 const auto held = std::ranges::find(_addons,
addonId);
100 if (
held != _addons.end())
126 return static_cast<uint8_t>(_minLevel);
276 const auto held = std::ranges::find(_subscriptions,
token, &Subscribed::Token);
277 if (
held == _subscriptions.end())
283 _subscriptions.erase(
held);
290 for (
const Subscribed&
held : _subscriptions)
295 _subscriptions.clear();
void DispatchTo(uint64_t order, Visit &&visit)
void RemoveAll(OwnerId owner)
bool Register(OwnerId owner, std::string_view ownerName, std::string_view name)
std::string_view OwnerOf(std::string_view name) const
uint64_t OnButtonPress(ButtonPressFn callback, void *context) override
void * ServerInterface(const char *version) const override
IPluginGameData * GameData() const override
uint64_t OnClientSettingsChanged(ClientSettingsChangedFn callback, void *context) override
std::string_view BaseDir() const override
IPluginAddons & Addons() override
void * EngineInterface(const char *version) const override
uint64_t OnFrame(FrameFn callback, void *context) override
uint64_t OnClientDisconnected(ClientDisconnectedFn callback, void *context) override
void Unsubscribe(uint64_t token) override
uint64_t OnPlayerCommand(PlayerCommandFn callback, void *context) override
std::string_view Name() const override
uint64_t SchemaLayoutStamp() const override
bool SchemaVerified() const override
bool IsReady(int slot) override
PluginContext(SharedState &state, std::string name, std::string logTag, std::string version, uint64_t order)
IPluginLanguages & Languages() override
uint64_t OnClientFullyConnected(ClientFullyConnectedFn callback, void *context) override
KHook::IKHook * HookDispatcher() const override
uint64_t OnClientConnected(ClientConnectedFn callback, void *context) override
bool IsCommandRegistered(std::string_view name) const override
bool RegisterCommand(std::string_view name) override
void * Find(std::string_view name) override
uint64_t OnCheckTransmit(CheckTransmitFn callback, void *context) override
uint8_t MinLogLevel() const override
void Publish(std::string_view name, void *implementation) override
uint64_t OnPlayerCommandDone(PlayerCommandFn callback, void *context) override
void Remove(uint64_t addonId) override
uint64_t OnConsoleCommand(ConsoleCommandFn callback, void *context) override
uint64_t OnClientConnecting(ClientConnectingFn callback, void *context) override
void WriteLog(uint8_t level, std::string_view text) override
IPluginEvents & Events() override
std::string_view Version() const override
uint64_t OnServerStartup(ServerStartupFn callback, void *context) override
bool Add(uint64_t addonId) override
uint64_t OnBuildGameSessionManifest(BuildGameSessionManifestFn callback, void *context) override
void Unpublish(std::string_view name) override
void ReplayMissedEvents()
IPluginServices & Services() override
void Publish(OwnerId owner, std::string_view name, void *implementation)
void * Find(std::string_view name) const
std::vector< std::string > RemoveAll(OwnerId owner)
void Unpublish(OwnerId owner, std::string_view name)
void Error(std::format_string< Args... > fmt, Args &&... args)
void Emit(LogLevel level, std::string message)
static std::string ReadFile(const std::filesystem::path &path)
virtual bool IsReady(int slot)=0
virtual bool Add(uint64_t addonId)=0
virtual void Remove(uint64_t addonId)=0
void(*)(void *context, int slot) ClientFullyConnectedFn
void(*)(void *context, int slot) ClientSettingsChangedFn
void(*)(void *context, int slot, std::string_view buttonId) ButtonPressFn
void(*)(void *context, std::string_view mapName) ServerStartupFn
void(*)(void *context, int slot, int64_t steamId, std::string_view name, std::string_view address) ClientConnectedFn
bool(*)(void *context, std::string_view name, std::string_view arguments, int slot) ConsoleCommandFn
void(*)(void *context, CCheckTransmitInfo **infoList, int infoCount) CheckTransmitFn
void(*)(void *context, IEntityResourceManifest *manifest) BuildGameSessionManifestFn
void(*)(void *context) FrameFn
void(*)(void *context, int slot, const PlayerInput &input) PlayerCommandFn
bool(*)(void *context, int slot, int64_t steamId, std::string_view name, char *reason, size_t reasonSize) ClientConnectingFn
void(*)(void *context, int slot) ClientDisconnectedFn
std::vector< std::string_view > Subscriptions
the event each was taken on
InterfaceFactory EngineFactory
const char * GameDir
the absolute csgo directory
InterfaceFactory ServerFactory
the game's own server library, never a loader in front of it
KHook::IKHook * HookDispatcher
the loader's KHook, which every module's hooks go through
CallbackList< IPluginEvents::BuildGameSessionManifestFn > BuildGameSessionManifest
IPluginGameData * GameData
CallbackList< IPluginEvents::PlayerCommandFn > PlayerCommand
CallbackList< IPluginEvents::ClientFullyConnectedFn > ClientFullyConnected
CallbackList< IPluginEvents::ClientSettingsChangedFn > ClientSettingsChanged
CallbackList< IPluginEvents::FrameFn > Frame
PublishedInterfaces Services
PerSlot< std::optional< ConnectedClient > > Clients
CallbackList< IPluginEvents::ClientConnectingFn > ClientConnecting
IPluginAddons * Addons
null downloads nothing
uint64_t NextToken
unique across every event and the service table, never zero, never reused
CallbackList< IPluginEvents::CheckTransmitFn > CheckTransmit
CallbackList< IPluginEvents::ButtonPressFn > ButtonPress
CallbackList< IPluginEvents::ConsoleCommandFn > ConsoleCommand
CallbackList< IPluginEvents::PlayerCommandFn > PlayerCommandDone
CallbackList< IPluginEvents::ClientDisconnectedFn > ClientDisconnected
CallbackList< IPluginEvents::ClientConnectedFn > ClientConnected
uint64_t SchemaLayoutStamp
zero until the host has checked its own layout
CallbackList< IPluginEvents::ServerStartupFn > ServerStartup