From ab2a1553d0848eb5e0e0a574dc4deadb79afae28 Mon Sep 17 00:00:00 2001 From: ced777ric Date: Fri, 21 Jun 2024 15:34:18 +0200 Subject: [PATCH] Fix PocketDimension api for 13.1 and increment version --- NwPluginAPI/Commands/ListCommand.cs | 1 + NwPluginAPI/Commands/ReloadCommand.cs | 1 + NwPluginAPI/Core/Zones/Pocket/PocketDimension.cs | 4 +--- NwPluginAPI/PluginApiVersion.cs | 4 ++-- NwPluginAPI/Roles/Scps/Scp049.cs | 7 ++----- TemplatePlugin/Commands/TestCommand.cs | 2 ++ 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/NwPluginAPI/Commands/ListCommand.cs b/NwPluginAPI/Commands/ListCommand.cs index 17b37d3..5b77133 100644 --- a/NwPluginAPI/Commands/ListCommand.cs +++ b/NwPluginAPI/Commands/ListCommand.cs @@ -13,6 +13,7 @@ public class ListCommand : ICommand public string Command { get; } = "list"; public string[] Aliases { get; } = null; public string Description { get; } = "List of installed plugins."; + public bool SanitizeResponse { get; } = false; public static ListCommand Instance = new(); public bool Execute(ArraySegment arguments, ICommandSender sender, out string response) diff --git a/NwPluginAPI/Commands/ReloadCommand.cs b/NwPluginAPI/Commands/ReloadCommand.cs index 3f100e5..ece5981 100644 --- a/NwPluginAPI/Commands/ReloadCommand.cs +++ b/NwPluginAPI/Commands/ReloadCommand.cs @@ -13,6 +13,7 @@ public class ReloadConfigCommand : ICommand, IUsageProvider public string Command { get; } = "reload"; public string[] Aliases { get; } = null; public string Description { get; } = "Reload plugins configuration or config_gameplay"; + public bool SanitizeResponse { get; } = false; public string[] Usage { get; } = { "plugins/gameplay" }; public static ReloadConfigCommand Instance = new(); diff --git a/NwPluginAPI/Core/Zones/Pocket/PocketDimension.cs b/NwPluginAPI/Core/Zones/Pocket/PocketDimension.cs index f008101..a4f3436 100644 --- a/NwPluginAPI/Core/Zones/Pocket/PocketDimension.cs +++ b/NwPluginAPI/Core/Zones/Pocket/PocketDimension.cs @@ -15,7 +15,6 @@ public class PocketDimension : FacilityRoom /// public new readonly UnknownZone Zone; - internal PocketDimensionGenerator _pocketDim; internal List _teleports = new List(); /// @@ -38,7 +37,7 @@ public class PocketDimension : FacilityRoom /// public void ShuffleTeleports() { - _pocketDim.GenerateRandom(); + PocketDimensionGenerator.RandomizeTeleports(); } /// @@ -48,7 +47,6 @@ public void ShuffleTeleports() /// The room identifier. public PocketDimension(UnknownZone zone, RoomIdentifier room) : base(zone, room) { - _pocketDim = Server.Instance.GetComponent(true); _teleports = UnityEngine.Object.FindObjectsOfType().ToList(); } } diff --git a/NwPluginAPI/PluginApiVersion.cs b/NwPluginAPI/PluginApiVersion.cs index 9a34b49..eae6e7d 100644 --- a/NwPluginAPI/PluginApiVersion.cs +++ b/NwPluginAPI/PluginApiVersion.cs @@ -2,8 +2,8 @@ { public static class PluginApiVersion { - public const string Version = "13.1.2"; //major.minor.patch ONLY - public const string VersionString = "13.1.2"; + public const string Version = "13.1.3"; //major.minor.patch ONLY + public const string VersionString = "13.1.3"; //PackageVersion needs to be set to the same value as VersionString MANUALLY IN .csproj diff --git a/NwPluginAPI/Roles/Scps/Scp049.cs b/NwPluginAPI/Roles/Scps/Scp049.cs index 6a26e0c..8a8a6c5 100644 --- a/NwPluginAPI/Roles/Scps/Scp049.cs +++ b/NwPluginAPI/Roles/Scps/Scp049.cs @@ -1,6 +1,5 @@ using PlayerRoles.PlayableScps.Scp049; using PluginAPI.Core; -using static PlayerRoles.PlayableScps.Scp049.Scp049AudioPlayer; namespace PluginAPI.Roles { @@ -21,16 +20,14 @@ public TPlayer Target return _currentTarget; } - } + } - public Scp049(Scp049Role role) : base(role) + public Scp049(Scp049Role role) : base(role) { RoleBase = role; RoleBase.SubroutineModule.TryGetSubroutine(out SenseAbility); } - public virtual bool ReceiveSound(ref SoundType type) => true; - public virtual bool CallZombies(ref float duration) => true; public virtual bool AttackPlayer(TPlayer target) => true; diff --git a/TemplatePlugin/Commands/TestCommand.cs b/TemplatePlugin/Commands/TestCommand.cs index f902ae0..53266db 100644 --- a/TemplatePlugin/Commands/TestCommand.cs +++ b/TemplatePlugin/Commands/TestCommand.cs @@ -12,6 +12,8 @@ public class TestCommand : ICommand public string Description { get; } = "Test command."; + public bool SanitizeResponse { get; } = false; + public bool Execute(ArraySegment arguments, ICommandSender sender, out string response) { response = "Success response";