From 4009f2d8338c2340be178fe288b4e8a7e33174b5 Mon Sep 17 00:00:00 2001 From: Andrei Hava Date: Mon, 27 Jul 2026 23:07:07 +0300 Subject: [PATCH] Move SuicideSystem into its own directory (#44965) --- Content.Client/Suicide/SuicideSystem.cs | 5 ++++ .../Chat/Commands/SuicideCommand.cs | 3 +-- .../Kitchen/EntitySystems/MicrowaveSystem.cs | 27 +++++++++---------- .../{Chat => Suicide}/SuicideSystem.cs | 12 ++++----- .../Execution/SharedExecutionSystem.cs | 4 +-- .../{Chat => Suicide}/SharedSuicideSystem.cs | 4 +-- 6 files changed, 28 insertions(+), 27 deletions(-) create mode 100644 Content.Client/Suicide/SuicideSystem.cs rename Content.Server/{Chat => Suicide}/SuicideSystem.cs (95%) rename Content.Shared/{Chat => Suicide}/SharedSuicideSystem.cs (97%) diff --git a/Content.Client/Suicide/SuicideSystem.cs b/Content.Client/Suicide/SuicideSystem.cs new file mode 100644 index 0000000000..517180b651 --- /dev/null +++ b/Content.Client/Suicide/SuicideSystem.cs @@ -0,0 +1,5 @@ +using Content.Shared.Suicide; + +namespace Content.Client.Suicide; + +public sealed class SuicideSystem : SharedSuicideSystem; diff --git a/Content.Server/Chat/Commands/SuicideCommand.cs b/Content.Server/Chat/Commands/SuicideCommand.cs index 87557cb754..813fbf5b2e 100644 --- a/Content.Server/Chat/Commands/SuicideCommand.cs +++ b/Content.Server/Chat/Commands/SuicideCommand.cs @@ -1,7 +1,6 @@ -using Content.Server.GameTicking; using Content.Server.Popups; +using Content.Server.Suicide; using Content.Shared.Administration; -using Content.Shared.Chat; using Content.Shared.Mind; using Robust.Shared.Console; using Robust.Shared.Enums; diff --git a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs index e2a16b2ebf..dd39f63716 100644 --- a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs @@ -1,45 +1,42 @@ +using System.Linq; using Content.Server.Administration.Logs; using Content.Server.Construction; -using Content.Server.Explosion.EntitySystems; +using Content.Server.Construction.Components; using Content.Server.DeviceLinking.Systems; +using Content.Server.Explosion.EntitySystems; using Content.Server.Hands.Systems; using Content.Server.Kitchen.Components; +using Content.Server.Lightning; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Server.Temperature.Systems; -using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reaction; using Content.Shared.Construction.EntitySystems; +using Content.Shared.Damage.Components; using Content.Shared.Database; -using Content.Shared.DeviceLinking.Events; using Content.Shared.Destructible; +using Content.Shared.DeviceLinking.Events; using Content.Shared.FixedPoint; +using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; -using Robust.Shared.Random; -using Robust.Shared.Audio; -using Content.Server.Lightning; using Content.Shared.Item; using Content.Shared.Kitchen; using Content.Shared.Kitchen.Components; using Content.Shared.Popups; using Content.Shared.Power; +using Content.Shared.Power.EntitySystems; +using Content.Shared.Stacks; +using Content.Shared.Suicide; using Content.Shared.Tag; using Robust.Server.GameObjects; +using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; -using Robust.Shared.Player; -using System.Linq; using Robust.Shared.Prototypes; +using Robust.Shared.Random; using Robust.Shared.Timing; -using Content.Shared.Stacks; -using Content.Server.Construction.Components; -using Content.Shared.Chat; -using Content.Shared.Damage.Components; -using Content.Shared.Power.EntitySystems; -using Content.Shared.Temperature.Components; -using Content.Shared.IdentityManagement; namespace Content.Server.Kitchen.EntitySystems { diff --git a/Content.Server/Chat/SuicideSystem.cs b/Content.Server/Suicide/SuicideSystem.cs similarity index 95% rename from Content.Server/Chat/SuicideSystem.cs rename to Content.Server/Suicide/SuicideSystem.cs index b4f27b945f..936fa6ae89 100644 --- a/Content.Server/Chat/SuicideSystem.cs +++ b/Content.Server/Suicide/SuicideSystem.cs @@ -1,7 +1,6 @@ using Content.Server.Ghost; using Content.Server.Hands.Systems; using Content.Shared.Administration.Logs; -using Content.Shared.Chat; using Content.Shared.Damage.Components; using Content.Shared.Database; using Content.Shared.IdentityManagement; @@ -12,13 +11,14 @@ using Content.Shared.Mind.Components; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; +using Content.Shared.Suicide; using Content.Shared.Tag; using Robust.Shared.Player; using Robust.Shared.Prototypes; -namespace Content.Server.Chat; +namespace Content.Server.Suicide; -public sealed partial class SuicideSystem : EntitySystem +public sealed partial class SuicideSystem : SharedSuicideSystem { [Dependency] private EntityLookupSystem _entityLookupSystem = default!; [Dependency] private ISharedAdminLogManager _adminLogger = default!; @@ -27,7 +27,6 @@ public sealed partial class SuicideSystem : EntitySystem [Dependency] private MobStateSystem _mobState = default!; [Dependency] private SharedPopupSystem _popup = default!; [Dependency] private GhostSystem _ghostSystem = default!; - [Dependency] private SharedSuicideSystem _suicide = default!; [Dependency] private EntityQuery _itemQuery = default!; private static readonly ProtoId CannotSuicideTag = "CannotSuicide"; @@ -83,6 +82,7 @@ public sealed partial class SuicideSystem : EntitySystem { _adminLogger.Add(LogType.Mind, $"{ToPrettyString(victim):player} suicided."); } + return true; } @@ -162,13 +162,13 @@ public sealed partial class SuicideSystem : EntitySystem if (args.DamageSpecifier != null) { - _suicide.ApplyLethalDamage(victim, args.DamageSpecifier); + ApplyLethalDamage(victim, args.DamageSpecifier); args.Handled = true; return; } args.DamageType ??= "Bloodloss"; - _suicide.ApplyLethalDamage(victim, args.DamageType); + ApplyLethalDamage(victim, args.DamageType); args.Handled = true; } } diff --git a/Content.Shared/Execution/SharedExecutionSystem.cs b/Content.Shared/Execution/SharedExecutionSystem.cs index 17c44cf430..e1ca1a0268 100644 --- a/Content.Shared/Execution/SharedExecutionSystem.cs +++ b/Content.Shared/Execution/SharedExecutionSystem.cs @@ -1,17 +1,17 @@ using Content.Shared.ActionBlocker; -using Content.Shared.Chat; using Content.Shared.CombatMode; using Content.Shared.Damage.Components; using Content.Shared.Database; using Content.Shared.DoAfter; using Content.Shared.IdentityManagement; +using Content.Shared.Interaction.Events; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; +using Content.Shared.Suicide; using Content.Shared.Verbs; using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee.Events; -using Content.Shared.Interaction.Events; using Robust.Shared.Audio.Systems; namespace Content.Shared.Execution; diff --git a/Content.Shared/Chat/SharedSuicideSystem.cs b/Content.Shared/Suicide/SharedSuicideSystem.cs similarity index 97% rename from Content.Shared/Chat/SharedSuicideSystem.cs rename to Content.Shared/Suicide/SharedSuicideSystem.cs index 01f88d9276..c7e7206f0d 100644 --- a/Content.Shared/Chat/SharedSuicideSystem.cs +++ b/Content.Shared/Suicide/SharedSuicideSystem.cs @@ -6,9 +6,9 @@ using Content.Shared.Damage.Systems; using Content.Shared.Mobs.Components; using Robust.Shared.Prototypes; -namespace Content.Shared.Chat; +namespace Content.Shared.Suicide; -public sealed partial class SharedSuicideSystem : EntitySystem +public abstract partial class SharedSuicideSystem : EntitySystem { private static readonly ProtoId FallbackDamageType = "Blunt";