Indicator fixes (#357)

* - fix: Fix hud showing stealth entities.

* - fix: Fix aghost SSD indicator.

* - tweak: Make ninja more stealthy.
This commit is contained in:
Aviu00
2024-06-15 13:11:59 +00:00
committed by GitHub
parent 7072dd31d2
commit 73954e87b1
8 changed files with 78 additions and 3 deletions

View File

@@ -1,4 +1,6 @@
using Content.Shared.CCVar;
using Content.Shared.Ghost;
using Content.Shared.Mind;
using Content.Shared.Mind.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.NPC;
@@ -34,9 +36,18 @@ public sealed class SSDIndicatorSystem : EntitySystem
!_mobState.IsDead(uid) &&
!HasComp<ActiveNPCComponent>(uid) &&
TryComp<MindContainerComponent>(uid, out var mindContainer) &&
mindContainer.ShowExamineInfo)
mindContainer.ShowExamineInfo &&
!IsAghosted(mindContainer)) // WD EDIT
{
args.StatusIcons.Add(_prototype.Index<StatusIconPrototype>(component.Icon));
}
}
private bool IsAghosted(MindContainerComponent mindContainer) // WD
{
if (!TryComp(mindContainer.Mind, out MindComponent? mindComp))
return false;
return TryComp(mindComp.VisitingEntity, out GhostComponent? ghost) && ghost.CanGhostInteract;
}
}