mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-07 02:08:17 +02:00
* Change EntityQuery to not get paused by default * GetAllComponents * Fix shell commands Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
28 lines
724 B
C#
28 lines
724 B
C#
using Robust.Server.Interfaces.Timing;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameObjects.Components;
|
|
using Robust.Shared.IoC;
|
|
|
|
namespace Robust.Server.GameObjects.Components
|
|
{
|
|
[RegisterComponent]
|
|
[ComponentReference(typeof(SharedIgnorePauseComponent))]
|
|
public sealed class IgnorePauseComponent : SharedIgnorePauseComponent
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|