Ghost hearing action (#19722)

This commit is contained in:
Kara
2023-09-24 13:34:08 -07:00
committed by GitHub
parent 5e405380ef
commit fb175a520d
11 changed files with 97 additions and 28 deletions

View File

@@ -15,7 +15,6 @@ namespace Content.Client.Ghost
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly SharedActionsSystem _actions = default!;
[Dependency] private readonly ILightManager _lightManager = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly ContentEyeSystem _contentEye = default!;
public int AvailableGhostRoleCount { get; private set; }
@@ -83,7 +82,7 @@ namespace Content.Client.Ghost
if (args.Handled)
return;
_popup.PopupEntity(Loc.GetString("ghost-gui-toggle-lighting-manager-popup"), args.Performer);
Popup.PopupEntity(Loc.GetString("ghost-gui-toggle-lighting-manager-popup"), args.Performer);
_lightManager.Enabled = !_lightManager.Enabled;
args.Handled = true;
}
@@ -93,7 +92,7 @@ namespace Content.Client.Ghost
if (args.Handled)
return;
_popup.PopupEntity(Loc.GetString("ghost-gui-toggle-fov-popup"), args.Performer);
Popup.PopupEntity(Loc.GetString("ghost-gui-toggle-fov-popup"), args.Performer);
_contentEye.RequestToggleFov(uid);
args.Handled = true;
}
@@ -103,7 +102,7 @@ namespace Content.Client.Ghost
if (args.Handled)
return;
_popup.PopupEntity(Loc.GetString("ghost-gui-toggle-ghost-visibility-popup"), args.Performer);
Popup.PopupEntity(Loc.GetString("ghost-gui-toggle-ghost-visibility-popup"), args.Performer);
ToggleGhostVisibility();
args.Handled = true;
}
@@ -113,6 +112,7 @@ namespace Content.Client.Ghost
_actions.RemoveAction(uid, component.ToggleLightingActionEntity);
_actions.RemoveAction(uid, component.ToggleFoVActionEntity);
_actions.RemoveAction(uid, component.ToggleGhostsActionEntity);
_actions.RemoveAction(uid, component.ToggleGhostHearingActionEntity);
if (uid != _playerManager.LocalPlayer?.ControlledEntity)
return;