Job icons are stored on ID cards (#18233)

This commit is contained in:
PrPleGoo
2023-07-29 10:25:27 +02:00
committed by GitHub
parent 7c9d7423d2
commit 7c088ac1de
65 changed files with 685 additions and 96 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Shared.Access.Systems;
using Content.Shared.Roles;
using Content.Shared.StatusIcon;
using Robust.Shared.Prototypes;
namespace Content.Server.Access.Systems
@@ -67,8 +68,12 @@ namespace Content.Server.Access.Systems
_accessSystem.SetAccessToJob(uid, job, extended);
// and also change job title on a card id
_cardSystem.TryChangeJobTitle(uid, job.LocalizedName);
if (_prototypeManager.TryIndex<StatusIconPrototype>(job.Icon, out var jobIcon))
{
_cardSystem.TryChangeJobIcon(uid, jobIcon);
}
}
}
}