From fa1d89141228666e33de62e9b8ab64de30aa0cd4 Mon Sep 17 00:00:00 2001 From: pheenty Date: Sat, 2 Nov 2024 09:18:15 +0700 Subject: [PATCH] remove hide ghost action --- .../Aghost/Actions/HideGhostComponent.cs | 11 ----- .../Admin/Aghost/Actions/HideGhostSystem.cs | 40 ------------------- .../Entities/Mobs/Player/admin_ghost.yml | 13 ------ 3 files changed, 64 deletions(-) delete mode 100644 Content.Shared/Stories/Admin/Aghost/Actions/HideGhostComponent.cs delete mode 100644 Content.Shared/Stories/Admin/Aghost/Actions/HideGhostSystem.cs diff --git a/Content.Shared/Stories/Admin/Aghost/Actions/HideGhostComponent.cs b/Content.Shared/Stories/Admin/Aghost/Actions/HideGhostComponent.cs deleted file mode 100644 index 8d95e582f8..0000000000 --- a/Content.Shared/Stories/Admin/Aghost/Actions/HideGhostComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Content.Shared.Actions; - -namespace Content.Shared.Stories.Admin; - -[RegisterComponent] -public sealed partial class HideGhostComponent : Component -{ -} -public sealed partial class HideGhostEvent : InstantActionEvent -{ -} diff --git a/Content.Shared/Stories/Admin/Aghost/Actions/HideGhostSystem.cs b/Content.Shared/Stories/Admin/Aghost/Actions/HideGhostSystem.cs deleted file mode 100644 index 7bb26df20d..0000000000 --- a/Content.Shared/Stories/Admin/Aghost/Actions/HideGhostSystem.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Content.Shared.Actions; -using Content.Shared.Ghost; -using Content.Shared.Tag; - -namespace Content.Shared.Stories.Admin; -public sealed class HideGhostSystem : EntitySystem -{ - [Dependency] private readonly SharedActionsSystem _actions = default!; - [Dependency] private readonly SharedGhostSystem _ghost = default!; - [Dependency] private readonly TagSystem _tag = default!; - [Dependency] private readonly MetaDataSystem _meta = default!; - - private static readonly string HideGhostAction = "ActionHideGhost"; - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnStartUp); - SubscribeLocalEvent(OnRemoveGhostColor); - } - private void OnStartUp(EntityUid uid, HideGhostComponent component, ComponentStartup args) - { - if (!TryComp(uid, out var _)) - return; - - _actions.AddAction(uid, HideGhostAction); - } - - private void OnRemoveGhostColor(EntityUid uid, HideGhostComponent component, HideGhostEvent args) - { - if (!TryComp(uid, out var ghost)) - return; - - _ghost.SetColor(ghost, new Color(255, 255, 255, 0)); - _tag.TryAddTag(uid, "HideContextMenu"); - _meta.SetEntityName(uid, ""); - _meta.SetEntityDescription(uid, ""); - } -} - diff --git a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml index fbc13f6921..995144f5ba 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml @@ -17,7 +17,6 @@ context: "aghost" - type: Ghost canInteract: true - - type: HideGhost - type: GhostHearing - type: Hands - type: ComplexInteraction @@ -171,15 +170,3 @@ keywords: [ "AI", "console", "interface" ] priority: -8 event: !type:ToggleIntrinsicUIEvent { key: enum.GeneralStationRecordConsoleKey.Key } - -- type: entity - id: ActionHideGhost - name: Hide ghost - description: Remove all ways to see your presence - categories: [ HideSpawnMenu ] - components: - - type: InstantAction - icon: Stories/Interface/AdminActions/hide_ghost.png - iconOn: Stories/Interface/AdminActions/hide_ghost.png - event: !type:HideGhostEvent - priority: -10