Inline UID
This commit is contained in:
@@ -48,8 +48,8 @@ namespace Content.IntegrationTests.Tests.Commands
|
||||
var human = entityManager.SpawnEntity("DamageableDummy", MapCoordinates.Nullspace);
|
||||
|
||||
// Sanity check
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human.Uid, out DamageableComponent damageable));
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human.Uid, out MobStateComponent mobState));
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human, out DamageableComponent damageable));
|
||||
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human, out MobStateComponent mobState));
|
||||
mobState.UpdateState(0);
|
||||
Assert.That(mobState.IsAlive, Is.True);
|
||||
Assert.That(mobState.IsCritical, Is.False);
|
||||
@@ -59,7 +59,7 @@ namespace Content.IntegrationTests.Tests.Commands
|
||||
// Kill the entity
|
||||
DamageSpecifier damage = new(prototypeManager.Index<DamageGroupPrototype>("Toxin"),
|
||||
FixedPoint2.New(10000000));
|
||||
EntitySystem.Get<DamageableSystem>().TryChangeDamage(human.Uid, damage, true);
|
||||
EntitySystem.Get<DamageableSystem>().TryChangeDamage(human, damage, true);
|
||||
|
||||
// Check that it is dead
|
||||
Assert.That(mobState.IsAlive, Is.False);
|
||||
|
||||
Reference in New Issue
Block a user