Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -6,11 +6,8 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Projectiles
|
||||
{
|
||||
@@ -47,13 +44,13 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
[DataField("spriteName")]
|
||||
private string _spriteName = "Objects/Weapons/Guns/Projectiles/laser.png";
|
||||
[DataField("muzzleFlash")]
|
||||
private string _muzzleFlash;
|
||||
private string? _muzzleFlash;
|
||||
[DataField("impactFlash")]
|
||||
private string _impactFlash;
|
||||
private string? _impactFlash;
|
||||
[DataField("soundHitWall")]
|
||||
private string _soundHitWall = "/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg";
|
||||
|
||||
public void FireEffects(IEntity user, float distance, Angle angle, IEntity hitEntity = null)
|
||||
public void FireEffects(IEntity user, float distance, Angle angle, IEntity? hitEntity = null)
|
||||
{
|
||||
var effectSystem = EntitySystem.Get<EffectSystem>();
|
||||
_startTime = _gameTiming.CurTime;
|
||||
@@ -97,7 +94,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
});
|
||||
}
|
||||
|
||||
private EffectSystemMessage MuzzleFlash(EntityCoordinates grid, Angle angle)
|
||||
private EffectSystemMessage? MuzzleFlash(EntityCoordinates grid, Angle angle)
|
||||
{
|
||||
if (_muzzleFlash == null)
|
||||
{
|
||||
@@ -143,7 +140,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
return message;
|
||||
}
|
||||
|
||||
private EffectSystemMessage ImpactFlash(float distance, Angle angle)
|
||||
private EffectSystemMessage? ImpactFlash(float distance, Angle angle)
|
||||
{
|
||||
if (_impactFlash == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user