Un-revert IPlayerManager refactor (#21244)

This commit is contained in:
Leon Friedrich
2023-10-28 09:59:53 +11:00
committed by GitHub
parent c55e1dcafd
commit e685cb626b
245 changed files with 781 additions and 943 deletions

View File

@@ -23,7 +23,7 @@ using Content.Shared.Zombies;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
using Robust.Shared.Player;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@@ -264,9 +264,9 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
return;
component.InfectedChosen = true;
var allPlayers = _playerManager.ServerSessions.ToList();
var playerList = new List<IPlayerSession>();
var prefList = new List<IPlayerSession>();
var allPlayers = _playerManager.Sessions.ToList();
var playerList = new List<ICommonSession>();
var prefList = new List<ICommonSession>();
foreach (var player in allPlayers)
{
if (player.AttachedEntity == null || !HasComp<HumanoidAppearanceComponent>(player.AttachedEntity) || HasComp<ZombieImmuneComponent>(player.AttachedEntity))
@@ -288,7 +288,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
var totalInfected = 0;
while (totalInfected < numInfected)
{
IPlayerSession zombie;
ICommonSession zombie;
if (prefList.Count == 0)
{
if (playerList.Count == 0)