Update components to use EnsureWarn (#2676)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -6,7 +6,6 @@ using Content.Shared.Chemistry;
|
||||
using Content.Shared.GameObjects.Components.Body.Networks;
|
||||
using Content.Shared.GameObjects.Components.Chemistry;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
@@ -116,10 +115,7 @@ namespace Content.Server.GameObjects.Components.Body.Behavior
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
if (!Owner.EnsureComponent(out SolutionContainerComponent solution))
|
||||
{
|
||||
Logger.Warning($"Entity {Owner} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionContainerComponent)}");
|
||||
}
|
||||
Owner.EnsureComponentWarn(out SolutionContainerComponent solution);
|
||||
|
||||
solution.MaxVolume = InitialMaxVolume;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user