From 5d32070b4d51d6bdd7f2e0d564dc593dbf58b8e2 Mon Sep 17 00:00:00 2001 From: v0id Date: Mon, 1 Apr 2024 11:22:12 +0300 Subject: [PATCH] Fix mind swap --- .../Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs | 4 ++++ Resources/Prototypes/Nyanotrasen/GameRules/events.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs b/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs index 6394456326..a3bab08560 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs @@ -65,6 +65,10 @@ protected override void Started(EntityUid uid, MassMindSwapRuleComponent compone // Remove this actor from the pool of swap candidates before they go. psionicPool.Remove(actor); + //if actor or other has MindSwappedComponent component then skip, if not that leads to stuck in body + if (HasComp(actor) || HasComp(other)) + continue; + // Do the swap. _mindSwap.Swap(actor, other); if (!component.IsTemporary) diff --git a/Resources/Prototypes/Nyanotrasen/GameRules/events.yml b/Resources/Prototypes/Nyanotrasen/GameRules/events.yml index f5626a0406..ba2163b820 100644 --- a/Resources/Prototypes/Nyanotrasen/GameRules/events.yml +++ b/Resources/Prototypes/Nyanotrasen/GameRules/events.yml @@ -104,6 +104,7 @@ glimmerBurnLower: 50 glimmerBurnUpper: 110 - type: MassMindSwapRule + isTemporary: true #- type: entity # id: GlimmerWispSpawn