Ghost hearing action (#19722)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user