Mindshield outline flashes, (#25409)

* Add animation support to status icons

Animated like any other entity. Change the png to have all frames, add delays in meta.json, and you're good to go.

* Dirty "fix" for the crashing.

Still have no idea why files cannot be read without changing their path in the yaml.

* Sloth review ig

I still have no idea why it wont work with /Textures/ missing as a prefix.
This commit is contained in:
Golinth
2024-02-20 16:26:48 -06:00
committed by GitHub
parent f64a32990a
commit 79dc4e4d6f
8 changed files with 79 additions and 71 deletions

View File

@@ -5,6 +5,7 @@ using Robust.Client.Graphics;
using Robust.Shared.Enums;
using System.Numerics;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
namespace Content.Client.StatusIcon;
@@ -12,6 +13,7 @@ public sealed class StatusIconOverlay : Overlay
{
[Dependency] private readonly IEntityManager _entity = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IGameTiming _timing = default!;
private readonly SpriteSystem _sprite;
private readonly TransformSystem _transform;
@@ -72,7 +74,9 @@ public sealed class StatusIconOverlay : Overlay
foreach (var proto in icons)
{
var texture = _sprite.Frame0(proto.Icon);
var curTime = _timing.RealTime;
var texture = _sprite.GetFrame(proto.Icon, curTime);
float yOffset;
float xOffset;

View File

@@ -2,6 +2,6 @@
id: HealthIconFine
priority: 1
icon:
sprite: Interface/Misc/health_icons.rsi
sprite: /Textures/Interface/Misc/health_icons.rsi
state: Fine
locationPreference: Right

View File

@@ -3,7 +3,7 @@
id: HungerIconOverfed
priority: 5
icon:
sprite: Interface/Misc/food_icons.rsi
sprite: /Textures/Interface/Misc/food_icons.rsi
state: overfed
locationPreference: Right
@@ -11,7 +11,7 @@
id: HungerIconPeckish
priority: 5
icon:
sprite: Interface/Misc/food_icons.rsi
sprite: /Textures/Interface/Misc/food_icons.rsi
state: peckish
locationPreference: Right
@@ -19,7 +19,7 @@
id: HungerIconStarving
priority: 5
icon:
sprite: Interface/Misc/food_icons.rsi
sprite: /Textures/Interface/Misc/food_icons.rsi
state: starving
locationPreference: Right
@@ -28,7 +28,7 @@
id: ThirstIconOverhydrated
priority: 5
icon:
sprite: Interface/Misc/food_icons.rsi
sprite: /Textures/Interface/Misc/food_icons.rsi
state: overhydrated
locationPreference: Left
@@ -36,7 +36,7 @@
id: ThirstIconThirsty
priority: 5
icon:
sprite: Interface/Misc/food_icons.rsi
sprite: /Textures/Interface/Misc/food_icons.rsi
state: thirsty
locationPreference: Left
@@ -44,6 +44,6 @@
id: ThirstIconParched
priority: 5
icon:
sprite: Interface/Misc/food_icons.rsi
sprite: /Textures/Interface/Misc/food_icons.rsi
state: parched
locationPreference: Left

View File

@@ -8,369 +8,369 @@
parent: JobIcon
id: JobIconDetective
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Detective
- type: statusIcon
parent: JobIcon
id: JobIconQuarterMaster
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: QuarterMaster
- type: statusIcon
parent: JobIcon
id: JobIconBorg
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Borg
- type: statusIcon
parent: JobIcon
id: JobIconBotanist
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Botanist
- type: statusIcon
parent: JobIcon
id: JobIconBoxer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Boxer
- type: statusIcon
parent: JobIcon
id: JobIconAtmosphericTechnician
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: AtmosphericTechnician
- type: statusIcon
parent: JobIcon
id: JobIconNanotrasen
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Nanotrasen
- type: statusIcon
parent: JobIcon
id: JobIconPrisoner
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Prisoner
- type: statusIcon
parent: JobIcon
id: JobIconJanitor
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Janitor
- type: statusIcon
parent: JobIcon
id: JobIconChemist
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Chemist
- type: statusIcon
parent: JobIcon
id: JobIconStationEngineer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: StationEngineer
- type: statusIcon
parent: JobIcon
id: JobIconSecurityOfficer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SecurityOfficer
- type: statusIcon
parent: JobIcon
id: JobIconNoId
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: NoId
- type: statusIcon
parent: JobIcon
id: JobIconChiefMedicalOfficer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: ChiefMedicalOfficer
- type: statusIcon
parent: JobIcon
id: JobIconRoboticist
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Roboticist
- type: statusIcon
parent: JobIcon
id: JobIconChaplain
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Chaplain
- type: statusIcon
parent: JobIcon
id: JobIconLawyer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Lawyer
- type: statusIcon
parent: JobIcon
id: JobIconUnknown
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Unknown
- type: statusIcon
parent: JobIcon
id: JobIconLibrarian
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Librarian
- type: statusIcon
parent: JobIcon
id: JobIconCargoTechnician
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: CargoTechnician
- type: statusIcon
parent: JobIcon
id: JobIconScientist
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Scientist
- type: statusIcon
parent: JobIcon
id: JobIconResearchAssistant
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: ResearchAssistant
- type: statusIcon
parent: JobIcon
id: JobIconGeneticist
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Geneticist
- type: statusIcon
parent: JobIcon
id: JobIconClown
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Clown
- type: statusIcon
parent: JobIcon
id: JobIconCaptain
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Captain
- type: statusIcon
parent: JobIcon
id: JobIconHeadOfPersonnel
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: HeadOfPersonnel
- type: statusIcon
parent: JobIcon
id: JobIconVirologist
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Virologist
- type: statusIcon
parent: JobIcon
id: JobIconShaftMiner
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: ShaftMiner
- type: statusIcon
parent: JobIcon
id: JobIconPassenger
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Passenger
- type: statusIcon
parent: JobIcon
id: JobIconChiefEngineer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: ChiefEngineer
- type: statusIcon
parent: JobIcon
id: JobIconBartender
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Bartender
- type: statusIcon
parent: JobIcon
id: JobIconHeadOfSecurity
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: HeadOfSecurity
- type: statusIcon
parent: JobIcon
id: JobIconBrigmedic
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Brigmedic
- type: statusIcon
parent: JobIcon
id: JobIconMedicalDoctor
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: MedicalDoctor
- type: statusIcon
parent: JobIcon
id: JobIconParamedic
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Paramedic
- type: statusIcon
parent: JobIcon
id: JobIconChef
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Chef
- type: statusIcon
parent: JobIcon
id: JobIconWarden
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Warden
- type: statusIcon
parent: JobIcon
id: JobIconResearchDirector
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: ResearchDirector
- type: statusIcon
parent: JobIcon
id: JobIconMime
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Mime
- type: statusIcon
parent: JobIcon
id: JobIconMusician
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Musician
- type: statusIcon
parent: JobIcon
id: JobIconReporter
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Reporter
- type: statusIcon
parent: JobIcon
id: JobIconPsychologist
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Psychologist
- type: statusIcon
parent: JobIcon
id: JobIconMedicalIntern
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: MedicalIntern
- type: statusIcon
parent: JobIcon
id: JobIconTechnicalAssistant
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: TechnicalAssistant
- type: statusIcon
parent: JobIcon
id: JobIconServiceWorker
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: ServiceWorker
- type: statusIcon
parent: JobIcon
id: JobIconSecurityCadet
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SecurityCadet
- type: statusIcon
parent: JobIcon
id: JobIconZombie # This is a perfectly legitimate profession to pursue
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Zombie
- type: statusIcon
parent: JobIcon
id: JobIconZookeeper
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Zookeeper
- type: statusIcon
parent: JobIcon
id: JobIconSeniorPhysician
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorPhysician
- type: statusIcon
parent: JobIcon
id: JobIconSeniorOfficer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorOfficer
- type: statusIcon
parent: JobIcon
id: JobIconSeniorEngineer
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorEngineer
- type: statusIcon
parent: JobIcon
id: JobIconSeniorResearcher
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: SeniorResearcher
- type: statusIcon
parent: JobIcon
id: JobIconVisitor
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Visitor

View File

@@ -2,21 +2,21 @@
id: ZombieFaction
priority: 11
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Zombie
- type: statusIcon
id: RevolutionaryFaction
priority: 11
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Revolutionary
- type: statusIcon
id: HeadRevolutionaryFaction
priority: 11
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: HeadRevolutionary
- type: statusIcon
@@ -25,7 +25,7 @@
locationPreference: Right
layer: Mod
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: MindShield
- type: statusIcon
@@ -33,5 +33,5 @@
priority: 0
locationPreference: Left
icon:
sprite: Interface/Misc/job_icons.rsi
sprite: /Textures/Interface/Misc/job_icons.rsi
state: Syndicate

View File

@@ -1,19 +1,19 @@
- type: statusIcon
id: DebugStatus
icon:
sprite: Interface/Misc/research_disciplines.rsi
sprite: /Textures/Interface/Misc/research_disciplines.rsi
state: civilianservices
- type: statusIcon
id: DebugStatus2
priority: 1
icon:
sprite: Interface/Misc/research_disciplines.rsi
sprite: /Textures/Interface/Misc/research_disciplines.rsi
state: arsenal
- type: statusIcon
id: DebugStatus3
priority: 5
icon:
sprite: Interface/Misc/research_disciplines.rsi
sprite: /Textures/Interface/Misc/research_disciplines.rsi
state: experimental

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -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 taken from https://github.com/tgstation/tgstation/blob/master/icons/mob/huds/hud.dmi and edited by Golinth (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",
"size": {
"x": 8,
@@ -171,7 +171,11 @@
"name": "HeadRevolutionary"
},
{
"name": "MindShield"
"name": "MindShield",
"delays":
[
[0.5,0.5]
]
},
{
"name": "Syndicate"