Nuke PowerChangedMessage (#7231)

This commit is contained in:
metalgearsloth
2022-03-29 03:58:51 +11:00
committed by GitHub
parent 2d610ebb52
commit 49163f1dec
18 changed files with 134 additions and 140 deletions

View File

@@ -62,20 +62,6 @@ namespace Content.Server.AME.Components
_jarSlot = ContainerHelpers.EnsureContainer<ContainerSlot>(Owner, $"{Name}-fuelJarContainer");
}
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
public override void HandleMessage(ComponentMessage message, IComponent? component)
{
#pragma warning disable 618
base.HandleMessage(message, component);
#pragma warning restore 618
switch (message)
{
case PowerChangedMessage powerChanged:
OnPowerChanged(powerChanged);
break;
}
}
internal void OnUpdate(float frameTime)
{
if (!_injecting)
@@ -111,11 +97,6 @@ namespace Content.Server.AME.Components
}
private void OnPowerChanged(PowerChangedMessage e)
{
UpdateUserInterface();
}
// Used to update core count
public void OnAMENodeGroupUpdate()
{
@@ -151,7 +132,7 @@ namespace Content.Server.AME.Components
return true;
}
private void UpdateUserInterface()
public void UpdateUserInterface()
{
var state = GetUserInterfaceState();
UserInterface?.SetState(state);