Inline TryGetComponent completely, for real

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 14:17:01 +01:00
parent 2ff4ec65d5
commit 69b270017b
425 changed files with 1143 additions and 995 deletions

View File

@@ -54,8 +54,9 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Movement
// Test for climb components existing
// Players and tables should have these in their prototypes.
Assert.That(human.TryGetComponent(out climbing!), "Human has no climbing");
Assert.That(table.TryGetComponent(out ClimbableComponent? _), "Table has no climbable");
ref ClimbingComponent? comp = ref climbing!;
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(human.Uid, out comp), "Human has no climbing");
Assert.That(IoCManager.Resolve<IEntityManager>().TryGetComponent(table.Uid, out ClimbableComponent? _), "Table has no climbable");
// Now let's make the player enter a climbing transitioning state.
climbing.IsClimbing = true;