Nullability fixes.

This commit is contained in:
Pieter-Jan Briers
2020-08-20 16:48:00 +02:00
parent 3372ab050c
commit ed1a96e536
47 changed files with 159 additions and 158 deletions

View File

@@ -711,7 +711,7 @@ namespace Content.Server.GameObjects.Components.GUI
Dirty();
if (!message.Entity.TryGetComponent(out ICollidableComponent collidable))
if (!message.Entity.TryGetComponent(out ICollidableComponent? collidable))
{
return;
}
@@ -724,13 +724,13 @@ namespace Content.Server.GameObjects.Components.GUI
private void AddPullingStatuses(IEntity pulled)
{
if (pulled.TryGetComponent(out ServerStatusEffectsComponent pulledStatus))
if (pulled.TryGetComponent(out ServerStatusEffectsComponent? pulledStatus))
{
pulledStatus.ChangeStatusEffectIcon(StatusEffect.Pulled,
"/Textures/Interface/StatusEffects/Pull/pulled.png");
}
if (Owner.TryGetComponent(out ServerStatusEffectsComponent ownerStatus))
if (Owner.TryGetComponent(out ServerStatusEffectsComponent? ownerStatus))
{
ownerStatus.ChangeStatusEffectIcon(StatusEffect.Pulling,
"/Textures/Interface/StatusEffects/Pull/pulling.png");
@@ -739,12 +739,12 @@ namespace Content.Server.GameObjects.Components.GUI
private void RemovePullingStatuses(IEntity pulled)
{
if (pulled.TryGetComponent(out ServerStatusEffectsComponent pulledStatus))
if (pulled.TryGetComponent(out ServerStatusEffectsComponent? pulledStatus))
{
pulledStatus.RemoveStatusEffect(StatusEffect.Pulled);
}
if (Owner.TryGetComponent(out ServerStatusEffectsComponent ownerStatus))
if (Owner.TryGetComponent(out ServerStatusEffectsComponent? ownerStatus))
{
ownerStatus.RemoveStatusEffect(StatusEffect.Pulling);
}