Content layered placement (#2543)

* Content layered placement

* Cache this hijack

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2021-01-11 22:43:24 +11:00
committed by GitHub
parent acb3c72d99
commit 97aa40e813

View File

@@ -1,7 +1,9 @@
#nullable enable #nullable enable
using System.Collections.Generic;
using Content.Client.GameObjects.Components.Construction; using Content.Client.GameObjects.Components.Construction;
using Content.Client.GameObjects.EntitySystems; using Content.Client.GameObjects.EntitySystems;
using Content.Shared.Construction; using Content.Shared.Construction;
using Robust.Client.Graphics;
using Robust.Client.Placement; using Robust.Client.Placement;
using Robust.Client.Utility; using Robust.Client.Utility;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
@@ -49,7 +51,15 @@ namespace Content.Client.Construction
{ {
base.StartHijack(manager); 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};
}
} }
} }
} }