Change components to use timer component (#2426)

* Change components to use timer component

* Fix old usages of tokens
This commit is contained in:
DrSmugleaf
2020-10-30 05:02:49 +01:00
committed by GitHub
parent c86c378198
commit 37e97ca89f
24 changed files with 59 additions and 35 deletions

View File

@@ -16,6 +16,7 @@ using Robust.Server.GameObjects.Components.UserInterface;
using Robust.Server.Interfaces.GameObjects;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.Timers;
using Robust.Shared.Timers;
using Robust.Shared.ViewVariables;
@@ -124,7 +125,7 @@ namespace Content.Server.GameObjects.Components.Research
State = LatheState.Producing;
SetAppearance(LatheVisualState.Producing);
Timer.Spawn(recipe.CompleteTime, () =>
Owner.SpawnTimer(recipe.CompleteTime, () =>
{
Producing = false;
_producingRecipe = null;
@@ -195,7 +196,7 @@ namespace Content.Server.GameObjects.Components.Research
break;
}
Timer.Spawn(InsertionTime, () =>
Owner.SpawnTimer(InsertionTime, () =>
{
State = LatheState.Base;
SetAppearance(LatheVisualState.Idle);