Update components to use EnsureWarn (#2676)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
Owner.EnsureComponent<SolutionContainerComponent>();
|
||||
Owner.EnsureComponentWarn<SolutionContainerComponent>();
|
||||
}
|
||||
|
||||
private bool TryGiveToMop(MopComponent mopComponent)
|
||||
|
||||
@@ -8,7 +8,6 @@ using Robust.Server.GameObjects.EntitySystems;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Fluids
|
||||
@@ -59,10 +58,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
if (!Owner.EnsureComponent(out SolutionContainerComponent _))
|
||||
{
|
||||
Logger.Warning($"Entity {Owner.Name} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionContainerComponent)}");
|
||||
}
|
||||
Owner.EnsureComponentWarn(out SolutionContainerComponent _);
|
||||
}
|
||||
|
||||
void IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
|
||||
@@ -17,7 +17,6 @@ using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects.Components.Timers;
|
||||
using Robust.Shared.GameObjects.Components.Transform;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -26,7 +25,6 @@ using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Timer = Robust.Shared.Timers.Timer;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Fluids
|
||||
{
|
||||
|
||||
@@ -75,11 +75,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
if (!Owner.EnsureComponent(out SolutionContainerComponent _))
|
||||
{
|
||||
Logger.Warning(
|
||||
$"Entity {Owner.Name} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionContainerComponent)}");
|
||||
}
|
||||
Owner.EnsureComponentWarn(out SolutionContainerComponent _);
|
||||
|
||||
if (_hasSafety)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user