37 std::vector<const ScreenEntity*>& live,
LayoutPath layout,
int owner);
45 int Owner() const noexcept {
return _owner; }
56 void WriteText(
int slot, std::string_view variable, std::string_view value);
57 void WriteClass(
int slot, std::string_view elementId, std::string_view className,
bool on);
59 void WriteModifier(
int slot, std::string_view elementId, std::string_view block,
60 std::span<const std::string_view> names, std::string_view name);
65 bool Accepts(
int slot)
const noexcept {
return slot == _owner || slot ==
EveryoneSlot; }
68 void CheckWrite(
const Status& status, std::string_view what);
75 int PlayerStateCount()
const;
79 Status SendText(std::string_view variable, std::string_view value);
80 Status SendClass(std::string_view elementId, std::string_view className,
bool on);
81 Status SendCursor(
bool shown);
83 EntitySystem& _entities;
84 Visibility& _visibility;
85 const NetChannels& _clients;
86 std::vector<const ScreenEntity*>& _live;
92 bool _playersChangedSinceSpawn =
true;
98 Subscription _slotChanges;
99 Subscription _fullConnects;
runtime.Entities: finds and creates entities. Everything it returns is valid for this frame only; see...
A layout resource the client will accept, checked before anything is spawned.
Per-client network access: latency, userids, usercmd status and the client's replicated userinfo cvar...
ScreenEntity & operator=(const ScreenEntity &)=delete
ScreenEntity(const ScreenEntity &)=delete
void WriteText(int slot, std::string_view variable, std::string_view value)
void WriteClass(int slot, std::string_view elementId, std::string_view className, bool on)
bool EnsureSpawned(int slot)
int Owner() const noexcept
void WriteModifier(int slot, std::string_view elementId, std::string_view block, std::span< const std::string_view > names, std::string_view name)
ScreenEntity(EntitySystem &entities, SlotEvents &slots, Visibility &visibility, const NetChannels &clients, std::vector< const ScreenEntity * > &live, LayoutPath layout, int owner)
void WriteCursor(int slot, bool shown)
"The occupant of this slot changed" - raised by PlayerManager, consumed below it.
Which clients receive which entities, filtered after CheckTransmit.
std::expected< void, Error > Status
std::expected< T, Error > Result
constexpr int EveryoneSlot