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:
@@ -84,21 +84,27 @@ public sealed class StatusIconOverlay : Overlay
|
||||
{
|
||||
if (accOffsetL + texture.Height > sprite.Bounds.Height * EyeManager.PixelsPerMeter)
|
||||
break;
|
||||
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;
|
||||
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);
|
||||
|
||||
@@ -34,6 +34,12 @@ public partial class StatusIconData : IComparable<StatusIconData>
|
||||
{
|
||||
return Priority.CompareTo(other?.Priority ?? int.MaxValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The layer the icon is displayed on. Mod is drawn above Base. Base | Mod
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public StatusIconLayer Layer = StatusIconLayer.Base;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -63,3 +69,9 @@ public enum StatusIconLocationPreference : byte
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
|
||||
public enum StatusIconLayer : byte
|
||||
{
|
||||
Base,
|
||||
Mod,
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
id: MindShieldIcon
|
||||
priority: 2
|
||||
locationPreference: Right
|
||||
layer: Mod
|
||||
icon:
|
||||
sprite: Interface/Misc/job_icons.rsi
|
||||
state: MindShield
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 4.3 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Taken from https://github.com/vgstation-coders/vgstation13/blob/e71d6c4fba5a51f99b81c295dcaec4fc2f58fb19/icons/mob/screen1.dmi | Brigmedic icon made by PuroSlavKing (Github) | Zombie icon made by RamZ | Zookeper by netwy (discort) | Rev and Head Rev icon taken from https://tgstation13.org/wiki/HUD and edited by coolmankid12345 (Discord) | Mindshield icon made by Psychpsyo (Github)",
|
||||
"copyright": "Taken from https://github.com/vgstation-coders/vgstation13/blob/e71d6c4fba5a51f99b81c295dcaec4fc2f58fb19/icons/mob/screen1.dmi | Brigmedic icon made by PuroSlavKing (Github) | Zombie icon made by RamZ | Zookeper by netwy (discort) | Rev and Head Rev icon taken from https://tgstation13.org/wiki/HUD and edited by coolmankid12345 (Discord) | Mindshield icon taken from https://github.com/tgstation/tgstation/blob/master/icons/mob/huds/hud.dmi and edited by Golinth (Github)",
|
||||
|
||||
"size": {
|
||||
"x": 8,
|
||||
|
||||
Reference in New Issue
Block a user