Inline UID
This commit is contained in:
@@ -82,19 +82,19 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
|
||||
|
||||
device1 = entityManager.SpawnEntity("DummyNetworkDevice", MapCoordinates.Nullspace);
|
||||
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1.Uid, out networkComponent1), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out networkComponent1), Is.True);
|
||||
Assert.That(networkComponent1.Open, Is.True);
|
||||
Assert.That(networkComponent1.Address, Is.Not.EqualTo(string.Empty));
|
||||
|
||||
device2 = entityManager.SpawnEntity("DummyNetworkDevice", MapCoordinates.Nullspace);
|
||||
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2.Uid, out networkComponent2), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2, out networkComponent2), Is.True);
|
||||
Assert.That(networkComponent2.Open, Is.True);
|
||||
Assert.That(networkComponent2.Address, Is.Not.EqualTo(string.Empty));
|
||||
|
||||
Assert.That(networkComponent1.Address, Is.Not.EqualTo(networkComponent2.Address));
|
||||
|
||||
deviceNetSystem.QueuePacket(device1.Uid, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
deviceNetSystem.QueuePacket(device1, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
});
|
||||
|
||||
await server.WaitRunTicks(1);
|
||||
@@ -145,20 +145,20 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
|
||||
|
||||
device1 = entityManager.SpawnEntity("DummyWirelessNetworkDevice", MapCoordinates.Nullspace);
|
||||
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1.Uid, out networkComponent1), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1.Uid, out wirelessNetworkComponent), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out networkComponent1), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out wirelessNetworkComponent), Is.True);
|
||||
Assert.That(networkComponent1.Open, Is.True);
|
||||
Assert.That(networkComponent1.Address, Is.Not.EqualTo(string.Empty));
|
||||
|
||||
device2 = entityManager.SpawnEntity("DummyWirelessNetworkDevice", new MapCoordinates(new Robust.Shared.Maths.Vector2(0,50), MapId.Nullspace));
|
||||
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2.Uid, out networkComponent2), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2, out networkComponent2), Is.True);
|
||||
Assert.That(networkComponent2.Open, Is.True);
|
||||
Assert.That(networkComponent2.Address, Is.Not.EqualTo(string.Empty));
|
||||
|
||||
Assert.That(networkComponent1.Address, Is.Not.EqualTo(networkComponent2.Address));
|
||||
|
||||
deviceNetSystem.QueuePacket(device1.Uid, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
deviceNetSystem.QueuePacket(device1, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
});
|
||||
|
||||
await server.WaitRunTicks(1);
|
||||
@@ -174,7 +174,7 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
|
||||
|
||||
wirelessNetworkComponent.Range = 0;
|
||||
|
||||
deviceNetSystem.QueuePacket(device1.Uid, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
deviceNetSystem.QueuePacket(device1, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
});
|
||||
|
||||
await server.WaitRunTicks(1);
|
||||
@@ -232,20 +232,20 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
|
||||
|
||||
device1 = entityManager.SpawnEntity("DummyWiredNetworkDevice", MapCoordinates.Nullspace);
|
||||
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1.Uid, out networkComponent1), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1.Uid, out wiredNetworkComponent), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out networkComponent1), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device1, out wiredNetworkComponent), Is.True);
|
||||
Assert.That(networkComponent1.Open, Is.True);
|
||||
Assert.That(networkComponent1.Address, Is.Not.EqualTo(string.Empty));
|
||||
|
||||
device2 = entityManager.SpawnEntity("DummyWiredNetworkDevice", new MapCoordinates(new Robust.Shared.Maths.Vector2(0, 2), MapId.Nullspace));
|
||||
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2.Uid, out networkComponent2), Is.True);
|
||||
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(device2, out networkComponent2), Is.True);
|
||||
Assert.That(networkComponent2.Open, Is.True);
|
||||
Assert.That(networkComponent2.Address, Is.Not.EqualTo(string.Empty));
|
||||
|
||||
Assert.That(networkComponent1.Address, Is.Not.EqualTo(networkComponent2.Address));
|
||||
|
||||
deviceNetSystem.QueuePacket(device1.Uid, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
deviceNetSystem.QueuePacket(device1, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
});
|
||||
|
||||
await server.WaitRunTicks(1);
|
||||
@@ -256,7 +256,7 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
|
||||
|
||||
entityManager.SpawnEntity("CableApcExtension", grid.MapToGrid(new MapCoordinates(new Robust.Shared.Maths.Vector2(0, 1), MapId.Nullspace)));
|
||||
|
||||
deviceNetSystem.QueuePacket(device1.Uid, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
deviceNetSystem.QueuePacket(device1, networkComponent2.Address, networkComponent2.Frequency, payload);
|
||||
});
|
||||
|
||||
await server.WaitRunTicks(1);
|
||||
|
||||
Reference in New Issue
Block a user