Merge ActorSystem and IPlayerManager (#21314)

This commit is contained in:
Leon Friedrich
2023-11-11 13:08:10 +11:00
committed by GitHub
parent a367097c33
commit 654cc7f071
25 changed files with 42 additions and 42 deletions

View File

@@ -4,7 +4,6 @@ using Content.Shared.GameWindow;
using Content.Shared.Players;
using Content.Shared.Preferences;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Enums;
using Robust.Shared.Player;
@@ -18,7 +17,6 @@ namespace Content.Server.GameTicking
{
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IServerDbManager _dbManager = default!;
[Dependency] private readonly ActorSystem _actor = default!;
private void InitializePlayer()
{
@@ -102,7 +100,7 @@ namespace Content.Server.GameTicking
}
else
{
if (_actor.Attach(mind.CurrentEntity, session))
if (_playerManager.SetAttachedEntity(session, mind.CurrentEntity))
{
PlayerJoinGame(session);
}