Fix round end window (#17512)
This commit is contained in:
@@ -307,12 +307,11 @@ namespace Content.Server.GameTicking
|
||||
var allMinds = Get<MindTrackerSystem>().AllMinds;
|
||||
foreach (var mind in allMinds)
|
||||
{
|
||||
if (mind == null)
|
||||
continue;
|
||||
// TODO don't list redundant observer roles?
|
||||
// I.e., if a player was an observer ghost, then a hamster ghost role, maybe just list hamster and not
|
||||
// the observer role?
|
||||
var userId = mind.UserId ?? mind.OriginalOwnerUserId;
|
||||
|
||||
// Some basics assuming things fail
|
||||
var userId = mind.OriginalOwnerUserId;
|
||||
var playerOOCName = userId.ToString();
|
||||
var connected = false;
|
||||
var observer = mind.AllRoles.Any(role => role is ObserverRole);
|
||||
// Continuing
|
||||
|
||||
@@ -39,19 +39,19 @@ namespace Content.Server.Mind
|
||||
/// The session ID of the player owning this mind.
|
||||
/// </summary>
|
||||
[ViewVariables, Access(typeof(MindSystem))]
|
||||
public NetUserId? UserId { get; internal set; }
|
||||
public NetUserId? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The session ID of the original owner, if any.
|
||||
/// May end up used for round-end information (as the owner may have abandoned Mind since)
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public NetUserId? OriginalOwnerUserId { get; }
|
||||
[ViewVariables, Access(typeof(MindSystem))]
|
||||
public NetUserId? OriginalOwnerUserId { get; set; }
|
||||
|
||||
[ViewVariables]
|
||||
public bool IsVisitingEntity => VisitingEntity != null;
|
||||
|
||||
[ViewVariables]
|
||||
[ViewVariables, Access(typeof(MindSystem))]
|
||||
public EntityUid? VisitingEntity { get; set; }
|
||||
|
||||
[ViewVariables]
|
||||
@@ -78,8 +78,8 @@ namespace Content.Server.Mind
|
||||
/// The entity currently owned by this mind.
|
||||
/// Can be null.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? OwnedEntity { get; internal set; }
|
||||
[ViewVariables, Access(typeof(MindSystem))]
|
||||
public EntityUid? OwnedEntity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An enumerable over all the roles this mind has.
|
||||
|
||||
@@ -629,6 +629,7 @@ public sealed class MindSystem : EntitySystem
|
||||
|
||||
_userMinds[userId.Value] = mind;
|
||||
mind.UserId = userId;
|
||||
mind.OriginalOwnerUserId ??= userId;
|
||||
|
||||
_playerManager.TryGetSessionById(userId.Value, out var ret);
|
||||
mind.Session = ret;
|
||||
|
||||
Reference in New Issue
Block a user