Actor refactor compatibility changes. (#4085)

This commit is contained in:
Vera Aguilera Puerto
2021-05-30 11:39:42 +02:00
committed by GitHub
parent 0b208ef051
commit 888095cbbd

View File

@@ -32,14 +32,14 @@ namespace Content.Server.GameObjects.EntitySystems
{ {
base.Initialize(); base.Initialize();
SubscribeLocalEvent<PlayerAttachSystemMessage>(OnPlayerAttached); SubscribeLocalEvent<PlayerAttachedEvent>(OnPlayerAttached);
} }
public override void Shutdown() public override void Shutdown()
{ {
base.Shutdown(); base.Shutdown();
UnsubscribeLocalEvent<PlayerAttachSystemMessage>(); UnsubscribeLocalEvent<PlayerAttachedEvent>();
} }
private uint GetNextRoleIdentifier() private uint GetNextRoleIdentifier()
@@ -135,12 +135,12 @@ namespace Content.Server.GameObjects.EntitySystems
return roles; return roles;
} }
private void OnPlayerAttached(PlayerAttachSystemMessage message) private void OnPlayerAttached(PlayerAttachedEvent message)
{ {
// Close the session of any player that has a ghost roles window open and isn't a ghost anymore. // Close the session of any player that has a ghost roles window open and isn't a ghost anymore.
if (!_openUis.ContainsKey(message.NewPlayer)) return; if (!_openUis.ContainsKey(message.Player)) return;
if (message.Entity.HasComponent<GhostComponent>()) return; if (message.Entity.HasComponent<GhostComponent>()) return;
CloseEui(message.NewPlayer); CloseEui(message.Player);
} }
public void Reset() public void Reset()