Fix 3000 errors
This commit is contained in:
@@ -42,10 +42,10 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking
|
||||
var options = new ServerIntegrationOptions{ExtraPrototypes = Prototypes};
|
||||
var server = StartServer(options);
|
||||
|
||||
IEntity human;
|
||||
IEntity otherHuman;
|
||||
IEntity cuffs;
|
||||
IEntity secondCuffs;
|
||||
EntityUid human;
|
||||
EntityUid otherHuman;
|
||||
EntityUid cuffs;
|
||||
EntityUid secondCuffs;
|
||||
CuffableComponent cuffed;
|
||||
HandsComponent hands;
|
||||
|
||||
@@ -63,16 +63,14 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking
|
||||
cuffs = entityManager.SpawnEntity("HandcuffsDummy", coordinates);
|
||||
secondCuffs = entityManager.SpawnEntity("HandcuffsDummy", coordinates);
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(human).WorldPosition = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(otherHuman).WorldPosition;
|
||||
entityManager.GetComponent<TransformComponent>(human).WorldPosition = entityManager.GetComponent<TransformComponent>(otherHuman).WorldPosition;
|
||||
|
||||
// Test for components existing
|
||||
ref CuffableComponent? comp = ref cuffed!;
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human, out comp), $"Human has no {nameof(CuffableComponent)}");
|
||||
ref HandsComponent? comp1 = ref hands!;
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human, out comp1), $"Human has no {nameof(HandsComponent)}");
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human, out SharedBodyComponent? _), $"Human has no {nameof(SharedBodyComponent)}");
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(cuffs, out HandcuffComponent? _), $"Handcuff has no {nameof(HandcuffComponent)}");
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(secondCuffs, out HandcuffComponent? _), $"Second handcuffs has no {nameof(HandcuffComponent)}");
|
||||
Assert.True(entityManager.TryGetComponent(human, out cuffed), $"Human has no {nameof(CuffableComponent)}");
|
||||
Assert.True(entityManager.TryGetComponent(human, out hands), $"Human has no {nameof(HandsComponent)}");
|
||||
Assert.True(entityManager.TryGetComponent(human, out SharedBodyComponent? _), $"Human has no {nameof(SharedBodyComponent)}");
|
||||
Assert.True(entityManager.TryGetComponent(cuffs, out HandcuffComponent? _), $"Handcuff has no {nameof(HandcuffComponent)}");
|
||||
Assert.True(entityManager.TryGetComponent(secondCuffs, out HandcuffComponent? _), $"Second handcuffs has no {nameof(HandcuffComponent)}");
|
||||
|
||||
// Test to ensure cuffed players register the handcuffs
|
||||
cuffed.TryAddNewCuffs(human, cuffs);
|
||||
@@ -94,7 +92,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking
|
||||
await server.WaitIdleAsync();
|
||||
}
|
||||
|
||||
private void AddHand(IEntity to)
|
||||
private void AddHand(EntityUid to)
|
||||
{
|
||||
var host = IoCManager.Resolve<IServerConsoleHost>();
|
||||
host.ExecuteCommand(null, $"addhand {to}");
|
||||
|
||||
Reference in New Issue
Block a user