diff --git a/Content.IntegrationTests/Tests/Fluids/FluidSpillTest.cs b/Content.IntegrationTests/Tests/Fluids/FluidSpillTest.cs index 4955f8e13b..cbe33e21a2 100644 --- a/Content.IntegrationTests/Tests/Fluids/FluidSpillTest.cs +++ b/Content.IntegrationTests/Tests/Fluids/FluidSpillTest.cs @@ -21,7 +21,7 @@ public sealed class FluidSpill : ContentIntegrationTest { foreach (var uid in mapGrid.GetAnchoredEntities(pos)) { - if (entityManager.TryGetComponent(uid, out PuddleComponent puddleComponent)) + if (entityManager.TryGetComponent(uid, out PuddleComponent? puddleComponent)) return puddleComponent; } diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs b/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs index ee60615c71..7c1ca0336a 100644 --- a/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs +++ b/Content.IntegrationTests/Tests/GameObjects/Components/ActionBlocking/HandCuffTest.cs @@ -66,8 +66,8 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.ActionBlocking entityManager.GetComponent(human).WorldPosition = entityManager.GetComponent(otherHuman).WorldPosition; // Test for components existing - 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 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)}"); diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/Movement/ClimbUnitTest.cs b/Content.IntegrationTests/Tests/GameObjects/Components/Movement/ClimbUnitTest.cs index a5bb07fd6e..25aae07b74 100644 --- a/Content.IntegrationTests/Tests/GameObjects/Components/Movement/ClimbUnitTest.cs +++ b/Content.IntegrationTests/Tests/GameObjects/Components/Movement/ClimbUnitTest.cs @@ -55,7 +55,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Movement // Test for climb components existing // Players and tables should have these in their prototypes. - Assert.That(entityManager.TryGetComponent(human, out climbing), "Human has no climbing"); + Assert.That(entityManager.TryGetComponent(human, out climbing!), "Human has no climbing"); Assert.That(entityManager.TryGetComponent(table, out ClimbableComponent? _), "Table has no climbable"); // TODO ShadowCommander: Implement climbing test diff --git a/Content.MapRenderer/Painters/GridPainter.cs b/Content.MapRenderer/Painters/GridPainter.cs index 9895afcef3..df1d88a3a7 100644 --- a/Content.MapRenderer/Painters/GridPainter.cs +++ b/Content.MapRenderer/Painters/GridPainter.cs @@ -83,7 +83,7 @@ namespace Content.MapRenderer.Painters continue; } - if (!_cEntityManager.TryGetComponent(entity, out SpriteComponent sprite)) + if (!_cEntityManager.TryGetComponent(entity, out SpriteComponent? sprite)) { throw new InvalidOperationException( $"No sprite component found on an entity for which a server sprite component exists. Prototype id: {prototype.ID}");