From 72ee101907a191b44b776a79f807ea3ca913a72f Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Mon, 15 Mar 2021 21:16:34 +0100 Subject: [PATCH] Fixes not being able to ghost on move when you're a head or brain --- Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs | 2 +- Resources/Changelog/Parts/ghost.yml | 4 ++++ Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml | 3 +++ Resources/Prototypes/Body/Parts/human_parts.yml | 3 +++ Resources/Prototypes/Body/Parts/slime_parts.yml | 3 +++ 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Resources/Changelog/Parts/ghost.yml diff --git a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs index 8b82552545..7fa3f85cb8 100644 --- a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs @@ -48,7 +48,7 @@ namespace Content.Shared.GameObjects.EntitySystems private static void HandleDirChange(ICommonSession? session, Direction dir, ushort subTick, bool state) { - if (!TryGetAttachedComponent(session, out var moverComp)) + if (!TryGetAttachedComponent(session, out var moverComp)) return; var owner = session?.AttachedEntity; diff --git a/Resources/Changelog/Parts/ghost.yml b/Resources/Changelog/Parts/ghost.yml new file mode 100644 index 0000000000..f97d6d48d2 --- /dev/null +++ b/Resources/Changelog/Parts/ghost.yml @@ -0,0 +1,4 @@ +author: Zumorica +changes: + - type: Fix + message: Fixes not being able to ghost when you are a brain or head. diff --git a/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml b/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml index ddb67727f3..c5146be6c6 100644 --- a/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml +++ b/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml @@ -32,6 +32,9 @@ behaviors: - !type:BrainBehavior {} - type: Input + context: "ghost" + - type: DummyInputMover + - type: GhostOnMove - type: entity id: EyesHuman diff --git a/Resources/Prototypes/Body/Parts/human_parts.yml b/Resources/Prototypes/Body/Parts/human_parts.yml index 8cb8d78ec4..6d14fe543c 100644 --- a/Resources/Prototypes/Body/Parts/human_parts.yml +++ b/Resources/Prototypes/Body/Parts/human_parts.yml @@ -63,6 +63,9 @@ # criticalThreshold: 50 # deadThreshold: 120 - type: Input + context: "ghost" + - type: DummyInputMover + - type: GhostOnMove - type: entity id: LeftArmHuman diff --git a/Resources/Prototypes/Body/Parts/slime_parts.yml b/Resources/Prototypes/Body/Parts/slime_parts.yml index 328bc45cdf..bf348a9eb4 100644 --- a/Resources/Prototypes/Body/Parts/slime_parts.yml +++ b/Resources/Prototypes/Body/Parts/slime_parts.yml @@ -62,6 +62,9 @@ # criticalThreshold: 50 # deadThreshold: 120 - type: Input + context: "ghost" + - type: DummyInputMover + - type: GhostOnMove - type: entity id: LeftArmSlime