Make IconSmoothComponent more failure-tolerant of the grid not being available (Fixes power stuff disappearing) (#4063)
This (hopefully) fixes power stuff disappearing by making IconSmoothComponent more failure-tolerant of grids not being available. It might still leave issues in, though.
This commit is contained in:
@@ -2,6 +2,7 @@ using Content.Client.GameObjects.Components.IconSmoothing;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Robust.Shared.Map;
|
||||
using static Robust.Client.GameObjects.SpriteComponent;
|
||||
|
||||
namespace Content.Client.GameObjects.Components
|
||||
@@ -35,11 +36,11 @@ namespace Content.Client.GameObjects.Components
|
||||
}
|
||||
}
|
||||
|
||||
internal override void CalculateNewSprite()
|
||||
internal override void CalculateNewSprite(IMapGrid grid)
|
||||
{
|
||||
base.CalculateNewSprite();
|
||||
base.CalculateNewSprite(grid);
|
||||
|
||||
var (cornerNE, cornerNW, cornerSW, cornerSE) = CalculateCornerFill();
|
||||
var (cornerNE, cornerNW, cornerSW, cornerSE) = CalculateCornerFill(grid);
|
||||
|
||||
if (Sprite != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user