IPlayerManager refactor (#21215)

This commit is contained in:
Leon Friedrich
2023-10-24 20:19:08 +11:00
committed by GitHub
parent c500a63ada
commit 7ba0ea2926
248 changed files with 966 additions and 1048 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)