diff --git a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs index 221cd19604..09c6ffbba2 100644 --- a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs @@ -9,6 +9,7 @@ using Content.Shared.Chemistry; using Content.Shared.Physics; using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems; +using Robust.Server.Interfaces.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Components.Transform; @@ -30,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Fluids /// Puddle on a floor /// [RegisterComponent] - public class PuddleComponent : Component, IExamine + public class PuddleComponent : Component, IExamine, IMapInit { // Current design: Something calls the SpillHelper.Spill, that will either // A) Add to an existing puddle at the location (normalised to tile-center) or @@ -137,12 +138,17 @@ namespace Content.Server.GameObjects.Components.Fluids var baseName = new ResourcePath(_spriteComponent.BaseRSIPath).FilenameWithoutExtension; _spriteComponent.LayerSetState(0, $"{baseName}-{randomVariant}"); // TODO: Remove hardcode - _spriteComponent.Rotation = Angle.FromDegrees(robustRandom.Next(0, 359)); // UpdateAppearance should get called soon after this so shouldn't need to call Dirty() here UpdateStatus(); } + void IMapInit.MapInit() + { + var robustRandom = IoCManager.Resolve(); + _spriteComponent.Rotation = Angle.FromDegrees(robustRandom.Next(0, 359)); + } + void IExamine.Examine(FormattedMessage message, bool inDetailsRange) { if(_slippery)