From 1d827754c9776080f9fa9060cd9724e10226bd8c Mon Sep 17 00:00:00 2001 From: Kyle Tyo <36606155+VerinSenpai@users.noreply.github.com> Date: Tue, 7 Oct 2025 09:10:21 -0400 Subject: [PATCH] Move BrainSystem and necessary components to Shared (#40499) * yowza * Update Content.Shared/Body/Systems/BrainSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Shared/Ghost/GhostOnMoveComponent.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update BrainSystem.cs * Update Content.Shared/Body/Systems/BrainSystem.cs * Update Content.Shared/Body/Systems/BrainSystem.cs * Update Content.Shared/Body/Systems/BrainSystem.cs --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --- Content.Server/Body/Components/BrainComponent.cs | 9 --------- .../Ghost/Components/GhostOnMoveComponent.cs | 11 ----------- Content.Shared/Body/Components/BrainComponent.cs | 6 ++++++ .../Body/Systems/BrainSystem.cs | 7 +++---- Content.Shared/Ghost/GhostOnMoveComponent.cs | 13 +++++++++++++ 5 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 Content.Server/Body/Components/BrainComponent.cs delete mode 100644 Content.Server/Ghost/Components/GhostOnMoveComponent.cs create mode 100644 Content.Shared/Body/Components/BrainComponent.cs rename {Content.Server => Content.Shared}/Body/Systems/BrainSystem.cs (92%) create mode 100644 Content.Shared/Ghost/GhostOnMoveComponent.cs diff --git a/Content.Server/Body/Components/BrainComponent.cs b/Content.Server/Body/Components/BrainComponent.cs deleted file mode 100644 index 004ff24eaf..0000000000 --- a/Content.Server/Body/Components/BrainComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Content.Server.Body.Systems; - -namespace Content.Server.Body.Components -{ - [RegisterComponent, Access(typeof(BrainSystem))] - public sealed partial class BrainComponent : Component - { - } -} diff --git a/Content.Server/Ghost/Components/GhostOnMoveComponent.cs b/Content.Server/Ghost/Components/GhostOnMoveComponent.cs deleted file mode 100644 index e3abc97688..0000000000 --- a/Content.Server/Ghost/Components/GhostOnMoveComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Server.Ghost.Components -{ - [RegisterComponent] - public sealed partial class GhostOnMoveComponent : Component - { - [DataField("canReturn")] public bool CanReturn { get; set; } = true; - - [DataField("mustBeDead")] - public bool MustBeDead = false; - } -} diff --git a/Content.Shared/Body/Components/BrainComponent.cs b/Content.Shared/Body/Components/BrainComponent.cs new file mode 100644 index 0000000000..be3c3ecbe5 --- /dev/null +++ b/Content.Shared/Body/Components/BrainComponent.cs @@ -0,0 +1,6 @@ +using Content.Shared.Body.Systems; + +namespace Content.Shared.Body.Components; + +[RegisterComponent, Access(typeof(BrainSystem))] +public sealed partial class BrainComponent : Component; diff --git a/Content.Server/Body/Systems/BrainSystem.cs b/Content.Shared/Body/Systems/BrainSystem.cs similarity index 92% rename from Content.Server/Body/Systems/BrainSystem.cs rename to Content.Shared/Body/Systems/BrainSystem.cs index e916849a81..55abcbb868 100644 --- a/Content.Server/Body/Systems/BrainSystem.cs +++ b/Content.Shared/Body/Systems/BrainSystem.cs @@ -1,12 +1,12 @@ -using Content.Server.Body.Components; -using Content.Server.Ghost.Components; +using Content.Shared.Body.Components; using Content.Shared.Body.Events; +using Content.Shared.Ghost; using Content.Shared.Mind; using Content.Shared.Mind.Components; using Content.Shared.Mobs.Components; using Content.Shared.Pointing; -namespace Content.Server.Body.Systems; +namespace Content.Shared.Body.Systems; public sealed class BrainSystem : EntitySystem { @@ -43,4 +43,3 @@ public sealed class BrainSystem : EntitySystem args.Cancel(); } } - diff --git a/Content.Shared/Ghost/GhostOnMoveComponent.cs b/Content.Shared/Ghost/GhostOnMoveComponent.cs new file mode 100644 index 0000000000..44cb3d0168 --- /dev/null +++ b/Content.Shared/Ghost/GhostOnMoveComponent.cs @@ -0,0 +1,13 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Ghost; + +[RegisterComponent, NetworkedComponent] +public sealed partial class GhostOnMoveComponent : Component +{ + [DataField] + public bool CanReturn = true; + + [DataField] + public bool MustBeDead; +}