Inline UID

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 15:53:09 +01:00
parent 2654775bf0
commit 5cd42c9ad6
803 changed files with 3613 additions and 3577 deletions

View File

@@ -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);