mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
* Moved IPauseManager from server to shared. * Moved ITimerManager from Timers to Timing. * Added missing IConsoleHost to server/client RegisterIoC. Tests work again.
27 lines
595 B
C#
27 lines
595 B
C#
using Robust.Shared.IoC;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Robust.Shared.GameObjects
|
|
{
|
|
[RegisterComponent]
|
|
public class IgnorePauseComponent : Component
|
|
{
|
|
public override string Name => "IgnorePause";
|
|
|
|
public override void OnAdd()
|
|
{
|
|
base.OnAdd();
|
|
Owner.Paused = false;
|
|
}
|
|
|
|
public override void OnRemove()
|
|
{
|
|
base.OnRemove();
|
|
if (IoCManager.Resolve<IPauseManager>().IsMapPaused(Owner.Transform.MapID))
|
|
{
|
|
Owner.Paused = true;
|
|
}
|
|
}
|
|
}
|
|
}
|