RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Remove sharing sessions clientside, add DisplayName

Open SlamBamActionman opened this issue 8 months ago • 3 comments

This PR removes sharing ICommonSessions clientside for other players; the session data includes information that may be desired to keep hidden from clients, such as account name and unique ID. The client's own session is still provided (necessary for state generation).

DisplayName is a new property for ICommonSessions that is meant to be used in instances where a player may wish to be anonymous. GetDisplayName gets the session's DisplayName if set, otherwise defaults to the Name. GetTruthfulNameString gets the session's Name and, if set, DisplayName in the format "Name (DisplayName)". Useful for admin tools such as ahelp.

Since replays are used for administration purposes, they are provided the full session list. Because the sessions aren't shared, only the client's own entity is given the ActorComponent component clientside. They still exist on the serverside for all relevant entities though.

This implementation has been made for primarily admins in mind, however if a true player-controlled anonymous mode is desired, this should lay the groundwork for it.

SlamBamActionman avatar Apr 06 '25 11:04 SlamBamActionman

Peak

ScarKy0 avatar Apr 06 '25 11:04 ScarKy0

pjb likely has an interest in reviewing this so I would also vet it with her.

metalgearsloth avatar Apr 06 '25 12:04 metalgearsloth

I feel like not having the Actor component on clients might break some predicted things in content, but I'm not sure. It's worth doing anyway, but we should find any instances of that and be prepared to fix them.

Tayrtahn avatar Apr 06 '25 17:04 Tayrtahn