diff --git a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs index 3c911de3954..c7b76b20d7e 100644 --- a/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs @@ -169,7 +169,7 @@ namespace Content.Server.Abilities.Psionics psionic.PsionicAbility = component.MindSwapReturnActionEntity; } - public void Swap(EntityUid performer, EntityUid target, bool end = false) + public void Swap(EntityUid performer, EntityUid target, bool end = false, int ReturnSwapCooldown = 0) { if (end && (!HasComp(performer) || !HasComp(target))) return; @@ -211,6 +211,15 @@ namespace Content.Server.Abilities.Psionics var perfComp = EnsureComp(performer); var targetComp = EnsureComp(target); + // Delta V - Cooldown for Returning back + if (ReturnSwapCooldown > 0) + { + var cooldown = TimeSpan.FromSeconds(ReturnSwapCooldown); + _actions.SetCooldown(perfComp.MindSwapReturnActionEntity, cooldown); + _actions.SetCooldown(targetComp.MindSwapReturnActionEntity, cooldown); + } + // Delta V + perfComp.OriginalEntity = target; targetComp.OriginalEntity = performer; } diff --git a/Content.Server/_DV/StationEvents/Components/MinorMassMindSwapRuleComponent.cs b/Content.Server/_DV/StationEvents/Components/MinorMassMindSwapRuleComponent.cs index 339c05f49c7..14da667a18b 100644 --- a/Content.Server/_DV/StationEvents/Components/MinorMassMindSwapRuleComponent.cs +++ b/Content.Server/_DV/StationEvents/Components/MinorMassMindSwapRuleComponent.cs @@ -16,6 +16,9 @@ public sealed partial class MinorMassMindSwapRuleComponent : Component [DataField] public TimeSpan Delay = TimeSpan.FromSeconds(60); + [DataField] + public int ReturnSwapCooldown = 120; + [DataField] public SoundSpecifier AnnouncementSound = new SoundPathSpecifier("/Audio/Misc/notice1.ogg"); diff --git a/Content.Server/_DV/StationEvents/Events/MinorMassMindSwapRule.cs b/Content.Server/_DV/StationEvents/Events/MinorMassMindSwapRule.cs index fe0761bc910..8f3d5785759 100644 --- a/Content.Server/_DV/StationEvents/Events/MinorMassMindSwapRule.cs +++ b/Content.Server/_DV/StationEvents/Events/MinorMassMindSwapRule.cs @@ -95,7 +95,7 @@ internal sealed class MinorMassMindSwapRule : StationEventSystem 120 + useDelay: 20 checkCanInteract: false - type: InstantAction event: !type:MindSwapPowerReturnActionEvent