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

@@ -32,7 +32,7 @@ namespace Content.Server.Body
return;
}
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent body))
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent? body))
{
var random = IoCManager.Resolve<IRobustRandom>();
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
@@ -72,7 +72,7 @@ namespace Content.Server.Body
return;
}
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent body))
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent? body))
{
var random = IoCManager.Resolve<IRobustRandom>();
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
@@ -119,7 +119,7 @@ namespace Content.Server.Body
return;
}
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent body))
if (!player.AttachedEntity.TryGetComponent(out BodyManagerComponent? body))
{
var random = IoCManager.Resolve<IRobustRandom>();
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";