Fix AME node updating to fix exceptions.

And also make it run less poorly, I guess.
This commit is contained in:
Pieter-Jan Briers
2021-07-06 20:56:55 +02:00
parent 4b6fb9f13e
commit cfe4a26d1f
5 changed files with 19 additions and 60 deletions

View File

@@ -212,9 +212,6 @@ namespace Content.Server.AME.Components
case UiButton.DecreaseFuel:
InjectionAmount = InjectionAmount > 0 ? InjectionAmount -= 2 : 0;
break;
case UiButton.RefreshParts:
RefreshParts();
break;
}
GetAMENodeGroup()?.UpdateCoreVisuals(InjectionAmount, _injecting);
@@ -277,12 +274,6 @@ namespace Content.Server.AME.Components
}
private void RefreshParts()
{
GetAMENodeGroup()?.RefreshAMENodes(this);
UpdateUserInterface();
}
private AMENodeGroup? GetAMENodeGroup()
{
Owner.TryGetComponent(out NodeContainerComponent? nodeContainer);