diff --git a/Content.Client/StatusIcon/StatusIconOverlay.cs b/Content.Client/StatusIcon/StatusIconOverlay.cs index 3e7161b1fb..0d13baef93 100644 --- a/Content.Client/StatusIcon/StatusIconOverlay.cs +++ b/Content.Client/StatusIcon/StatusIconOverlay.cs @@ -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); diff --git a/Content.Shared/StatusIcon/StatusIconPrototype.cs b/Content.Shared/StatusIcon/StatusIconPrototype.cs index 1523ff4e0a..a313f55c05 100644 --- a/Content.Shared/StatusIcon/StatusIconPrototype.cs +++ b/Content.Shared/StatusIcon/StatusIconPrototype.cs @@ -34,6 +34,12 @@ public partial class StatusIconData : IComparable { return Priority.CompareTo(other?.Priority ?? int.MaxValue); } + + /// + /// The layer the icon is displayed on. Mod is drawn above Base. Base | Mod + /// + [DataField] + public StatusIconLayer Layer = StatusIconLayer.Base; } /// @@ -63,3 +69,9 @@ public enum StatusIconLocationPreference : byte Left, Right, } + +public enum StatusIconLayer : byte +{ + Base, + Mod, +} diff --git a/Resources/Prototypes/StatusIcon/antag.yml b/Resources/Prototypes/StatusIcon/antag.yml index a3fb072722..0a052ce16d 100644 --- a/Resources/Prototypes/StatusIcon/antag.yml +++ b/Resources/Prototypes/StatusIcon/antag.yml @@ -23,14 +23,15 @@ id: MindShieldIcon priority: 2 locationPreference: Right + layer: Mod icon: sprite: Interface/Misc/job_icons.rsi state: MindShield - + - type: statusIcon id: SyndicateFaction priority: 0 - locationPreference: Left + locationPreference: Left icon: sprite: Interface/Misc/job_icons.rsi state: Syndicate diff --git a/Resources/Textures/Interface/Misc/job_icons.rsi/MindShield.png b/Resources/Textures/Interface/Misc/job_icons.rsi/MindShield.png index 3049f3e50f..d3df5fe627 100644 Binary files a/Resources/Textures/Interface/Misc/job_icons.rsi/MindShield.png and b/Resources/Textures/Interface/Misc/job_icons.rsi/MindShield.png differ diff --git a/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json b/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json index bf919198f5..df37d244cf 100644 --- a/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json +++ b/Resources/Textures/Interface/Misc/job_icons.rsi/meta.json @@ -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,