From acc9361a3494deec7d99bcb2c172b4087e338756 Mon Sep 17 00:00:00 2001 From: pathetic meowmeow Date: Sun, 5 Jul 2026 14:29:38 -0400 Subject: [PATCH] Add the ability to spawn in as a vent critter at will (#6187) * Add the ability to spawn in as a vent critter at will * cooldown --- .../Systems/Ghost/GhostUIController.cs | 24 +++ .../Systems/Ghost/Widgets/GhostGui.xaml | 1 + .../Systems/Ghost/Widgets/GhostGui.xaml.cs | 15 ++ .../_DV/Ghost/DVSpawnableGhostRoleWindow.cs | 145 ++++++++++++++ .../Ghost/Roles/DVSpawnableGhostRoleSystem.cs | 184 ++++++++++++++++++ Content.Shared/_DV/CCVars/DCCVars.cs | 6 + .../Ghost/Roles/DVSpawnableGhostRoleEvent.cs | 19 ++ .../Roles/DVSpawnableGhostRolePrototype.cs | 23 +++ .../Locale/en-US/_DV/ghost/ghost-gui.ftl | 32 +++ .../Prototypes/Entities/Mobs/NPCs/animals.yml | 44 +++-- .../Prototypes/Entities/Mobs/NPCs/space.yml | 42 ++-- .../_DV/Roles/GhostRoles/vent_critter.yml | 39 ++++ 12 files changed, 536 insertions(+), 38 deletions(-) create mode 100644 Content.Client/_DV/Ghost/DVSpawnableGhostRoleWindow.cs create mode 100644 Content.Server/_DV/Ghost/Roles/DVSpawnableGhostRoleSystem.cs create mode 100644 Content.Shared/_DV/Ghost/Roles/DVSpawnableGhostRoleEvent.cs create mode 100644 Content.Shared/_DV/Ghost/Roles/DVSpawnableGhostRolePrototype.cs create mode 100644 Resources/Locale/en-US/_DV/ghost/ghost-gui.ftl create mode 100644 Resources/Prototypes/_DV/Roles/GhostRoles/vent_critter.yml diff --git a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs index 9a2533ff0d1..6412f4b2502 100644 --- a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs +++ b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs @@ -2,10 +2,12 @@ using Content.Client.Ghost; using Content.Client.UserInterface.Systems.Gameplay; using Content.Client.UserInterface.Systems.Ghost.Widgets; +using Content.Shared._DV.Ghost.Roles; // DeltaV - freeform ghosties using Content.Shared.Ghost; using Robust.Shared.Console; // Frontier using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controllers; +using Robust.Shared.Prototypes; // DeltaV - freeform ghosties using Content.Shared._Corvax.Respawn; // Frontier namespace Content.Client.UserInterface.Systems.Ghost; @@ -33,6 +35,7 @@ public sealed class GhostUIController : UIController, IOnSystemChanged(OnRespawnReseted); + SubscribeNetworkEvent(OnVentCritterCooldownUpdate); // DeltaV - freeform ghosties } private void OnScreenLoad() @@ -151,6 +154,8 @@ public sealed class GhostUIController : UIController, IOnSystemChanged role) + { + _net.SendSystemNetworkMessage(new DVSpawnableGhostRoleRequestEvent(role)); + } + + private void OnVentCritterCooldownUpdate(DVSpawnableGhostRoleCooldownUpdateEvent msg, EntitySessionEventArgs args) + { + Gui?.VentCritterWindow.SetCooldownEnd(msg.CooldownEnd); + } + // End DeltaV - freeform ghosties } diff --git a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml index 3f111264eed..6630383fac3 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml +++ b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml @@ -5,6 +5,7 @@