Defer MoveEvent out of TransformComponent.HandleComponentState (#1453)

* Defer MoveEvent out of TransformComponent.HandleComponentState

* Imports

* Make the update loop more readable and call ToArray

* Fix tests

* Fix tests HALLELUJAH
This commit is contained in:
DrSmugleaf
2020-12-19 13:09:16 +01:00
committed by GitHub
parent 6e931ac175
commit 58560f589f
4 changed files with 53 additions and 5 deletions
@@ -1,10 +1,10 @@
using System.IO;
using Moq;
using NUnit.Framework;
using Robust.Client.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Map;
@@ -35,6 +35,17 @@ namespace Robust.UnitTesting.Client.GameObjects.Components
private MapId MapB;
private IMapGrid GridB = default!;
protected override void OverrideIoC()
{
base.OverrideIoC();
var mock = new Mock<IEntitySystemManager>();
var system = new SharedTransformSystem();
mock.Setup(m => m.GetEntitySystem<SharedTransformSystem>()).Returns(system);
IoCManager.RegisterInstance<IEntitySystemManager>(mock.Object, true);
}
[OneTimeSetUp]
public void Setup()
{