Removed Old PlayerSession Functions (#5404)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Acruid
2021-11-22 23:11:48 -08:00
committed by GitHub
parent 7910928679
commit 6e54e740c7
26 changed files with 97 additions and 94 deletions

View File

@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Content.Server.Chat.Managers;
using Content.Shared.CCVar;
@@ -58,7 +60,7 @@ namespace Content.Server.GameTicking.Rules
return;
IPlayerSession? winner = null;
foreach (var playerSession in _playerManager.GetAllPlayers())
foreach (var playerSession in _playerManager.ServerSessions)
{
var playerEntity = playerSession.AttachedEntity;
if (playerEntity == null

View File

@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Content.Server.Chat.Managers;
using Content.Server.Doors;
@@ -25,7 +27,7 @@ namespace Content.Server.GameTicking.Rules
/// <summary>
/// Simple GameRule that will do a TTT-like gamemode with traitors.
/// </summary>
public sealed class RuleSuspicion : GameRule, IEntityEventSubscriber
public sealed class RuleSuspicion : GameRule
{
private static readonly TimeSpan DeadCheckDelay = TimeSpan.FromSeconds(1);
@@ -86,7 +88,7 @@ namespace Content.Server.GameTicking.Rules
var traitorsAlive = 0;
var innocentsAlive = 0;
foreach (var playerSession in _playerManager.GetAllPlayers())
foreach (var playerSession in _playerManager.ServerSessions)
{
if (playerSession.AttachedEntity == null
|| !playerSession.AttachedEntity.TryGetComponent(out MobStateComponent? mobState)