Kill Seperated Mindshield Icons (#25303)

* Unghettoify mindshield icons

Adds support for layers in status icons, through the StatusIconLayer enum and the new "layer" datafield. Defaults to the Base layer where functionally remains unchanged.

* TG icon for shield

probably better than the shitty one I made in paint

* forgor meta.json

I forgor

* Emo review

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
Golinth
2024-02-16 09:58:28 -06:00
committed by GitHub
parent 0a64e086c4
commit bced73f676
5 changed files with 26 additions and 7 deletions

View File

@@ -84,21 +84,27 @@ public sealed class StatusIconOverlay : Overlay
{
if (accOffsetL + texture.Height > sprite.Bounds.Height * EyeManager.PixelsPerMeter)
break;
accOffsetL += texture.Height;
if (proto.Layer == StatusIconLayer.Base)
{
accOffsetL += texture.Height;
countL++;
}
yOffset = (bounds.Height + sprite.Offset.Y) / 2f - (float) accOffsetL / EyeManager.PixelsPerMeter;
xOffset = -(bounds.Width + sprite.Offset.X) / 2f;
countL++;
}
else
{
if (accOffsetR + texture.Height > sprite.Bounds.Height * EyeManager.PixelsPerMeter)
break;
accOffsetR += texture.Height;
if (proto.Layer == StatusIconLayer.Base)
{
accOffsetR += texture.Height;
countR++;
}
yOffset = (bounds.Height + sprite.Offset.Y) / 2f - (float) accOffsetR / EyeManager.PixelsPerMeter;
xOffset = (bounds.Width + sprite.Offset.X) / 2f - (float) texture.Width / EyeManager.PixelsPerMeter;
countR++;
}
var position = new Vector2(xOffset, yOffset);