- fix: Job icon fixes (#38)

This commit is contained in:
Aviu00
2024-02-09 16:51:54 +09:00
committed by GitHub
parent 1f2e9cb5a7
commit a6b7a800e0
5 changed files with 27 additions and 15 deletions

View File

@@ -127,7 +127,7 @@ namespace Content.Client.Access.UI
_jobIconButtons.Add(jobIcon, newButton);
newButton.OnPressed += _ =>
{
_lastJobIcon = jobIcon;
_lastJobIcon = "JobIcon" + jobIcon;
SubmitData();
};
@@ -279,7 +279,7 @@ namespace Content.Client.Access.UI
foreach (var (jobIcon, button) in _jobIconButtons)
{
button.Disabled = !interfaceEnabled;
button.Pressed = state.TargetIdJobIcon == jobIcon;
button.Pressed = state.TargetIdJobIcon?.Contains(jobIcon) ?? false;
}
//WD-EDIT

View File

@@ -76,7 +76,12 @@ public sealed class ShowSecurityIconsSystem : EquipmentHudSystem<ShowSecurityIco
if (_prototypeMan.TryIndex<StatusIconPrototype>(jobIconToGet, out var jobIcon))
result.Add(jobIcon);
else
Log.Error($"Invalid job icon prototype: {jobIcon}");
// WD EDIT START
{
Log.Error($"Invalid job icon prototype: {jobIconToGet}");
result.Add(_prototypeMan.Index<StatusIconPrototype>(JobIconForNoId));
}
// WD EDIT END
if (TryComp<MindShieldComponent>(uid, out var comp))
{