Removes all dependencies on engine component events. (#4199)

This commit is contained in:
Acruid
2021-06-18 01:49:18 -07:00
committed by GitHub
parent 9fea68707c
commit e1e54e9cb1
27 changed files with 235 additions and 184 deletions

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Content.Client.Alerts.UI;
using Content.Shared.Alert;
@@ -41,20 +41,6 @@ namespace Content.Client.Alerts
PlayerDetached();
}
public override void HandleMessage(ComponentMessage message, IComponent? component)
{
base.HandleMessage(message, component);
switch (message)
{
case PlayerAttachedMsg _:
PlayerAttached();
break;
case PlayerDetachedMsg _:
PlayerDetached();
break;
}
}
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
{
base.HandleComponentState(curState, nextState);
@@ -67,7 +53,7 @@ namespace Content.Client.Alerts
UpdateAlertsControls();
}
private void PlayerAttached()
public void PlayerAttached()
{
if (!CurrentlyControlled || _ui != null)
{
@@ -86,7 +72,7 @@ namespace Content.Client.Alerts
UpdateAlertsControls();
}
private void PlayerDetached()
public void PlayerDetached()
{
foreach (var alertControl in _alertControls.Values)
{