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

@@ -70,8 +70,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
await server.WaitAssertion(() =>
{
var player = serverPlayerManager.GetAllPlayers().Single();
var playerEnt = player.AttachedEntity;
var playerEnt = serverPlayerManager.Sessions.Single().AttachedEntity;
var actionsComponent = playerEnt!.GetComponent<ServerActionsComponent>();
// player should begin with their innate actions granted
@@ -153,8 +152,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
// now revoke the action and check that the client sees it as revoked
await server.WaitAssertion(() =>
{
var player = serverPlayerManager.GetAllPlayers().Single();
var playerEnt = player.AttachedEntity;
var playerEnt = serverPlayerManager.Sessions.Single().AttachedEntity;
var actionsComponent = playerEnt!.GetComponent<ServerActionsComponent>();
actionsComponent.Revoke(ActionType.DebugInstant);
});
@@ -246,7 +244,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
await server.WaitAssertion(() =>
{
serverPlayerEnt = serverPlayerManager.GetAllPlayers().Single().AttachedEntity;
serverPlayerEnt = serverPlayerManager.Sessions.Single().AttachedEntity;
serverActionsComponent = serverPlayerEnt!.GetComponent<ServerActionsComponent>();
// spawn and give them an item that has actions