Skip to content

Commit

Permalink
tweak: add icons for non-humanoid roles like ai and borgs
Browse files Browse the repository at this point in the history
  • Loading branch information
ThereDrD0 committed Jan 21, 2025
1 parent 0e7ac80 commit c1245d0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Content.Server/Radio/EntitySystems/RadioSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
using Content.Shared.PDA;
using Content.Shared.Radio;
using Content.Shared.Radio.Components;
using Content.Shared.Silicons.Borgs.Components;
using Content.Shared.Silicons.StationAi;
using Content.Shared.Speech;
using Robust.Shared.Map;
using Robust.Shared.Network;
Expand Down Expand Up @@ -40,6 +42,12 @@ public sealed class RadioSystem : EntitySystem

private EntityQuery<TelecomExemptComponent> _exemptQuery;

// Sunrise start
private const string NoIdIconPath = "/Textures/Interface/Misc/job_icons.rsi/NoId.png";
private const string StationAiIconPath = "/Textures/Interface/Misc/job_icons.rsi/StationAi.png";
private const string BorgIconPath = "/Textures/Interface/Misc/job_icons.rsi/Borg.png";
// Sunrise end

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -210,8 +218,14 @@ private string GetIdCardName(EntityUid senderUid)

private string GetIdSprite(EntityUid senderUid)
{
if (HasComp<BorgChassisComponent>(senderUid))
return BorgIconPath;

if (HasComp<StationAiHeldComponent>(senderUid))
return StationAiIconPath;

var protoId = GetIdCard(senderUid)?.JobIcon;
var sprite = "/Textures/Interface/Misc/job_icons.rsi/NoId.png";
var sprite = NoIdIconPath;

if (_prototype.TryIndex(protoId, out var prototype))
{
Expand Down

0 comments on commit c1245d0

Please sign in to comment.