Enable nullability in Content.Server (#3685)

This commit is contained in:
DrSmugleaf
2021-03-16 15:50:20 +01:00
committed by GitHub
parent 90fec0ed24
commit a5ade526b7
306 changed files with 1616 additions and 1441 deletions

View File

@@ -2,19 +2,14 @@
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces.GameObjects;
using Content.Server.Utility;
using Content.Shared.Alert;
using Content.Shared.Audio;
using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.GameObjects.Components.Mobs.State;
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
using Content.Shared.GameObjects.EntitySystems.EffectBlocker;
using Content.Shared.Interfaces;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Players;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@@ -73,12 +68,19 @@ namespace Content.Server.GameObjects.Components.Mobs
Paralyze(4f);
var source = eventArgs.Source;
var target = eventArgs.Target;
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/thudswoosh.ogg", source,
AudioHelpers.WithVariation(0.025f));
if (source != null)
{
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/thudswoosh.ogg", source,
AudioHelpers.WithVariation(0.025f));
source.PopupMessageOtherClients(Loc.GetString("{0} pushes {1}!", source.Name, eventArgs.Target.Name));
source.PopupMessageCursor(Loc.GetString("You push {0}!", eventArgs.Target.Name));
if (target != null)
{
source.PopupMessageOtherClients(Loc.GetString("{0} pushes {1}!", source.Name, target.Name));
source.PopupMessageCursor(Loc.GetString("You push {0}!", target.Name));
}
}
return true;
}