3#include <engine/igameeventsystem.h>
4#include <networksystem/inetworkserializer.h>
5#include <networksystem/netmessage.h>
6#include <usermessages.pb.h>
26 if (!
text ||
text->param_size() == 0)
36 : _hook(
"TextMessages", [
this] {
return Install(); }), Before(_hook.ForEvent()), _interfaces(
interfaces)
43 return std::unexpected(
available.error());
57 return std::unexpected(
Error::NotReady(
"IGameEventSystem not available"));
A multicast signal with a fixed handler signature: the one way to subscribe in VoltMod.
A hook before-handler's verdict.
static HookResult Block(Ret value)
Event< TextMessage & > Before
TextMessages(Interfaces &interfaces)
static std::string ReadFile(const std::filesystem::path &path)
std::expected< void, Error > Status
void(IGameEventSystem::*)(CSplitScreenSlot, bool, int, const uint64 *, INetworkMessageInternal *, const CNetMessage *, unsigned long, NetChannelBufType_t) PostEvent
Subscription HookInterface(Ret(Iface::*method)(Args...), Iface *instance, Before &&before, After &&after=nullptr)
Hook one virtual method of an engine interface for a subscription's lifetime.
static HookResult< void > FilterTextMessage(Event< TextMessage & > &before, INetworkMessageInternal *kind, const CNetMessage *data)
static Error NotReady(std::string detail)
Centralized holder for all HL2SDK interface pointers.
IGameEventSystem * GameEventSystem