Welders now use EntityQuery to update instead of subscriptions.

This commit is contained in:
Víctor Aguilera Puerto
2020-08-15 00:02:17 +02:00
parent 2dc4bbd604
commit a815b50f6d
2 changed files with 5 additions and 17 deletions

View File

@@ -162,7 +162,6 @@ namespace Content.Server.GameObjects.Components.Interactable
if (_pointLightComponent != null) _pointLightComponent.Enabled = false;
PlaySoundCollection("WelderOff", -5);
_welderSystem.Unsubscribe(this);
return true;
}
@@ -179,7 +178,6 @@ namespace Content.Server.GameObjects.Components.Interactable
if (_pointLightComponent != null) _pointLightComponent.Enabled = true;
PlaySoundCollection("WelderOn", -5);
_welderSystem.Subscribe(this);
Owner.Transform.GridPosition
.GetTileAtmosphere()?.HotspotExpose(700f, 50f, true);
@@ -212,7 +210,7 @@ namespace Content.Server.GameObjects.Components.Interactable
public void OnUpdate(float frameTime)
{
if (!HasQuality(ToolQuality.Welding) || !WelderLit || Owner.Deleted)
if (!HasQuality(ToolQuality.Welding) || !WelderLit)
return;
_solutionComponent?.TryRemoveReagent("chem.WeldingFuel", ReagentUnit.New(FuelLossRate * frameTime));