Content layered placement (#2543)
* Content layered placement * Cache this hijack Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.GameObjects.Components.Construction;
|
||||
using Content.Client.GameObjects.EntitySystems;
|
||||
using Content.Shared.Construction;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Placement;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
@@ -49,7 +51,15 @@ namespace Content.Client.Construction
|
||||
{
|
||||
base.StartHijack(manager);
|
||||
|
||||
manager.CurrentBaseSprite = _prototype?.Icon.DirFrame0();
|
||||
var frame = _prototype?.Icon.DirFrame0();
|
||||
if (frame == null)
|
||||
{
|
||||
manager.CurrentTextures = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.CurrentTextures = new List<IDirectionalTextureProvider> {frame};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user