Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Content.Client/Ghost/GhostSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public override void Initialize()
SubscribeLocalEvent<EyeComponent, ToggleLightingActionEvent>(OnToggleLighting);
SubscribeLocalEvent<EyeComponent, ToggleFoVActionEvent>(OnToggleFoV);
SubscribeLocalEvent<GhostComponent, ToggleGhostsActionEvent>(OnToggleGhosts);
SubscribeLocalEvent<GhostComponent, ToggleGhostHudActionEvent>(OnToggleGhostHud); // WD
}

private void OnStartup(EntityUid uid, GhostComponent component, ComponentStartup args)
Expand All @@ -85,6 +86,14 @@ private void OnToggleLighting(EntityUid uid, EyeComponent component, ToggleLight
args.Handled = true;
}

private void OnToggleGhostHud(EntityUid uid, ToggleGhostHudActionEvent args) // WD start
{
if (args.Handled)
return;

args.Handled = true;
}

private void OnToggleFoV(EntityUid uid, EyeComponent component, ToggleFoVActionEvent args)
{
if (args.Handled)
Expand Down
8 changes: 8 additions & 0 deletions Content.Shared/Ghost/GhostComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ public sealed partial class GhostComponent : Component
[DataField, AutoNetworkedField]
public EntityUid? BooActionEntity;

[DataField] // WD start
public EntProtoId ToggleGhostHudAction = "ActionToggleGhostHud";

[DataField, AutoNetworkedField]
public EntityUid? ToggleGhostHudActionEntity; // WD end

// End actions

[ViewVariables(VVAccess.ReadWrite), DataField]
Expand Down Expand Up @@ -102,3 +108,5 @@ public sealed partial class ToggleLightingActionEvent : InstantActionEvent { }
public sealed partial class ToggleGhostHearingActionEvent : InstantActionEvent { }

public sealed partial class BooActionEvent : InstantActionEvent { }

public sealed partial class ToggleGhostHudActionEvent : InstantActionEvent { }
17 changes: 17 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Player/observer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
bodyType: KinematicController
bodyStatus: InAir
- type: CanMoveInAir
- type: ShowSecurityIcons # WD start
- type: ShowHealthBars
damageContainers:
- Biological
- Inorganic # WD end
- type: Tag
tags:
- BypassInteractionRangeChecks
Expand Down Expand Up @@ -110,3 +115,15 @@
state: icon
iconOn: Interface/Actions/ghostHearingToggled.png
event: !type:ToggleGhostHearingActionEvent

- type: entity # WD
id: ActionToggleGhostHud
name: ghost-gui-toggle-hud-name
description: ghost-gui-toggle-hud-desc
noSpawn: true
components:
- type: InstantAction
icon: Interface/VerbIcons/vv.svg.192dpi.png
clientExclusive: true
checkCanInteract: false
event: !type:ToggleGhostHudActionEvent # WD