mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
* Added unit tests for the new anchor system design. * Amend ME! * SnapGridComponent now anchors the entity when added or removed. TransformComponent.Anchored properly replicates it's state to clients. * Converted all SnapGridPositionChangedEvent subscriptions to AnchorStateChangedEvent. Removed SnapGridPositionChangedEvent. Obsoleted SnapGridComponent. * Allows setting Transform.Anchored in prototypes. * Changing tile to empty under anchored ents unanchors them. * More unit testing. * Migrated transform gamestate tests to RobustServerSimulation. * Fixed nasty off-by-one error when sending a full server state. * Adds lifetime stages to Component. * More test fixing. * Review changes.
27 lines
601 B
C#
27 lines
601 B
C#
using Robust.Shared.IoC;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Robust.Shared.GameObjects
|
|
{
|
|
[RegisterComponent]
|
|
public class IgnorePauseComponent : Component
|
|
{
|
|
public override string Name => "IgnorePause";
|
|
|
|
protected override void OnAdd()
|
|
{
|
|
base.OnAdd();
|
|
Owner.Paused = false;
|
|
}
|
|
|
|
protected override void OnRemove()
|
|
{
|
|
base.OnRemove();
|
|
if (IoCManager.Resolve<IPauseManager>().IsMapPaused(Owner.Transform.MapID))
|
|
{
|
|
Owner.Paused = true;
|
|
}
|
|
}
|
|
}
|
|
}
|