diff --git a/SCPSwap/Commands/Scpswap/Scpswap.cs b/SCPSwap/Commands/Scpswap/Scpswap.cs index ecfe733..9fb8cde 100644 --- a/SCPSwap/Commands/Scpswap/Scpswap.cs +++ b/SCPSwap/Commands/Scpswap/Scpswap.cs @@ -5,6 +5,7 @@ using System; using System.Linq; + namespace ScpSwap.Commands.ScpSwapCommand { [CommandHandler(typeof(ClientCommandHandler))] @@ -69,6 +70,11 @@ protected override bool ExecuteParent(ArraySegment arguments, ICommandSe response = "That SCP is blacklisted."; return false; } + if(!EventHandlers.plugin.Config.CanZombiesSwap && ply.Role == RoleType.Scp0492) + { + response = "Zombies cannot swap with scp's."; + return false; + } if (ply.Role == role) { @@ -85,7 +91,7 @@ protected override bool ExecuteParent(ArraySegment arguments, ICommandSe } if (EventHandlers.plugin.Config.SwapAllowNewScps) { - ply.ReferenceHub.characterClassManager.SetPlayersClass(role, ply.ReferenceHub.gameObject); + ply.ReferenceHub.characterClassManager.SetPlayersClass(role, ply.ReferenceHub.gameObject, CharacterClassManager.SpawnReason.ForceClass); response = "Could not find a player to swap with, you have been made the specified SCP."; return false; } diff --git a/SCPSwap/Config.cs b/SCPSwap/Config.cs index 2ac6f35..df355fe 100644 --- a/SCPSwap/Config.cs +++ b/SCPSwap/Config.cs @@ -14,5 +14,6 @@ public sealed class Config : IConfig public ushort StartMessageTime { get; set; } = 15; public string DisplayMessageText { get; set; } = "Did you know you can swap classes with other SCP's? Simply type .scpswap (role number) in your in-game console (not RA) to swap!"; public List SwapBlacklist { get; private set; } = new List() { 10 }; + public bool CanZombiesSwap { get; set; } = false; } } diff --git a/SCPSwap/EventHandlers.cs b/SCPSwap/EventHandlers.cs index 4e553c2..01e2ca6 100644 --- a/SCPSwap/EventHandlers.cs +++ b/SCPSwap/EventHandlers.cs @@ -130,10 +130,7 @@ public void OnWaitingForPlayers() allowSwaps = false; } - public void OnConsoleCommand(SendingConsoleCommandEventArgs ev) - { - - } + public void BroadcastMessage() { diff --git a/SCPSwap/SCPSwap.cs b/SCPSwap/SCPSwap.cs index 464c874..915f7c1 100644 --- a/SCPSwap/SCPSwap.cs +++ b/SCPSwap/SCPSwap.cs @@ -8,9 +8,9 @@ public class ScpSwap : Plugin { public EventHandlers Handler { get; private set; } public override string Name => nameof(ScpSwap); - public override string Author => "Originally written by Cyanox, modifications by KoukoCocoa & Thomasjosif"; - public override Version Version { get; } = new Version(1, 3, 2); - public override Version RequiredExiledVersion { get; } = new Version(2, 1, 29, 0); + public override string Author => "Originally written by Cyanox, modifications by KoukoCocoa & Thomasjosif, updated to Exiled 3.0.0 by Redforce04"; + public override Version Version { get; } = new Version(1, 4, 0); + public override Version RequiredExiledVersion { get; } = new Version(3, 0, 0); public ScpSwap() { } @@ -21,7 +21,6 @@ public override void OnEnabled() Handlers.Server.RoundStarted += Handler.OnRoundStart; Handlers.Server.RoundEnded += Handler.OnRoundEnd; Handlers.Server.RestartingRound += Handler.OnRoundRestart; - Handlers.Server.SendingConsoleCommand += Handler.OnConsoleCommand; } public override void OnDisabled() @@ -30,7 +29,6 @@ public override void OnDisabled() Handlers.Server.RoundStarted -= Handler.OnRoundStart; Handlers.Server.RoundEnded -= Handler.OnRoundEnd; Handlers.Server.RestartingRound -= Handler.OnRoundRestart; - Handlers.Server.SendingConsoleCommand -= Handler.OnConsoleCommand; Handler = null; } diff --git a/SCPSwap/SCPSwap.csproj b/SCPSwap/SCPSwap.csproj index 8e286f7..9eca32a 100644 --- a/SCPSwap/SCPSwap.csproj +++ b/SCPSwap/SCPSwap.csproj @@ -32,43 +32,46 @@ - ..\..\EXILED_REFERENCES\0Harmony.dll + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Plugins\dependencies\0Harmony.dll - - False - ..\..\EXILED_REFERENCES\Assembly-CSharp.dll + + ..\..\..\..\..\Desktop\SCP Plugin\Assembly-CSharp.dll - ..\..\EXILED_REFERENCES\Assembly-CSharp-firstpass.dll + ..\..\..\..\..\Desktop\SCP\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll - - False - ..\..\EXILED_REFERENCES\CommandSystem.Core.dll + + ..\..\..\..\..\Desktop\SCP Plugin\Assembly-CSharp-Publicized (6).dll - - ..\packages\EXILED.2.1.29\lib\net472\Exiled.API.dll + + ..\..\..\..\..\Desktop\SCP\SCPSL_Data\Managed\CommandSystem.Core.dll - - ..\packages\EXILED.2.1.29\lib\net472\Exiled.Bootstrap.dll + + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Plugins\dependencies\Exiled.API.dll - - ..\packages\EXILED.2.1.29\lib\net472\Exiled.Events.dll + + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Plugins\Exiled.CreditTags.dll - - ..\packages\EXILED.2.1.29\lib\net472\Exiled.Loader.dll + + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Plugins\Exiled.CustomItems.dll - - ..\packages\EXILED.2.1.29\lib\net472\Exiled.Permissions.dll + + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Plugins\Exiled.Events.dll - - ..\packages\EXILED.2.1.29\lib\net472\Exiled.Updater.dll + + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Exiled.Loader.dll + + + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Plugins\Exiled.Permissions.dll + + + ..\..\..\..\..\Desktop\SCP Plugin\EXILED\Plugins\Exiled.Updater.dll - ..\..\EXILED_REFERENCES\Mirror.dll + ..\..\..\..\..\Desktop\SCP\SCPSL_Data\Managed\Mirror.dll - - False - ..\..\EXILED_REFERENCES\NorthwoodLib.dll + + ..\..\..\..\..\Desktop\SCP\SCPSL_Data\Managed\NorthwoodLib.dll @@ -79,10 +82,10 @@ - ..\..\EXILED_REFERENCES\UnityEngine.dll + ..\..\..\..\..\Desktop\SCP\SCPSL_Data\Managed\UnityEngine.dll - ..\..\EXILED_REFERENCES\UnityEngine.CoreModule.dll + ..\..\..\..\..\Desktop\SCP\SCPSL_Data\Managed\UnityEngine.CoreModule.dll