Change components to use timer component (#2426)
* Change components to use timer component * Fix old usages of tokens
This commit is contained in:
@@ -9,6 +9,7 @@ using Content.Shared.GameObjects.Components.Damage;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Robust.Server.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.Timers;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -135,7 +136,7 @@ namespace Content.Server.GameObjects.Components.Mobs
|
||||
else
|
||||
{
|
||||
var spawnPosition = Owner.Transform.Coordinates;
|
||||
Timer.Spawn(0, () =>
|
||||
Owner.SpawnTimer(0, () =>
|
||||
{
|
||||
// Async this so that we don't throw if the grid we're on is being deleted.
|
||||
var mapMan = IoCManager.Resolve<IMapManager>();
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Shared.GameObjects.Components.Movement;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using NFluidsynth;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.Timers;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.Timing;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -101,7 +102,7 @@ namespace Content.Server.GameObjects.Components.Mobs
|
||||
|
||||
if (progress >= length)
|
||||
{
|
||||
Timer.Spawn(250, () => status.RemoveStatusEffect(StatusEffect.Stun), StatusRemoveCancellation.Token);
|
||||
Owner.SpawnTimer(250, () => status.RemoveStatusEffect(StatusEffect.Stun), StatusRemoveCancellation.Token);
|
||||
LastStun = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user