mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* Initial commit * Include uncertain crew and make it work for AI * Add new definition to Silicon Rules 8 * Update based on review * Remove Cluwne from job list * ProtoIdify * Update and also make monkey/corgi show IDs * Remove unnecessary property * Remove redundant code * Carrrrd * cleanup * Nicer code * Update to fix the spawn bug + agent ID * Fix new icons --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
35 lines
978 B
C#
35 lines
978 B
C#
using Content.Shared.Inventory.Events;
|
|
using Content.Shared.Overlays;
|
|
|
|
namespace Content.Client.Overlays;
|
|
|
|
// The GetStatusIconsEvent subscription is handled in JobStatusSystem
|
|
public sealed class ShowCrewIconsSystem : EquipmentHudSystem<ShowCrewIconsComponent>
|
|
{
|
|
public bool UncertainCrewBorder = false;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<ShowCrewIconsComponent, AfterAutoHandleStateEvent>(OnHandleState);
|
|
}
|
|
|
|
protected override void UpdateInternal(RefreshEquipmentHudEvent<ShowCrewIconsComponent> component)
|
|
{
|
|
base.UpdateInternal(component);
|
|
|
|
UncertainCrewBorder = false;
|
|
foreach (var comp in component.Components)
|
|
{
|
|
if (comp.UncertainCrewBorder)
|
|
UncertainCrewBorder = true;
|
|
}
|
|
}
|
|
|
|
private void OnHandleState(Entity<ShowCrewIconsComponent> ent, ref AfterAutoHandleStateEvent args)
|
|
{
|
|
RefreshOverlay();
|
|
}
|
|
}
|