Skip to content

Commit

Permalink
Fix PocketDimension api for 13.1 and increment version
Browse files Browse the repository at this point in the history
  • Loading branch information
ced777ric committed Jun 21, 2024
1 parent a267cd3 commit ab2a155
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions NwPluginAPI/Commands/ListCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> arguments, ICommandSender sender, out string response)
Expand Down
1 change: 1 addition & 0 deletions NwPluginAPI/Commands/ReloadCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 1 addition & 3 deletions NwPluginAPI/Core/Zones/Pocket/PocketDimension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class PocketDimension : FacilityRoom
/// </summary>
public new readonly UnknownZone Zone;

internal PocketDimensionGenerator _pocketDim;
internal List<PocketDimensionTeleport> _teleports = new List<PocketDimensionTeleport>();

/// <summary>
Expand All @@ -38,7 +37,7 @@ public class PocketDimension : FacilityRoom
/// </summary>
public void ShuffleTeleports()
{
_pocketDim.GenerateRandom();
PocketDimensionGenerator.RandomizeTeleports();
}

/// <summary>
Expand All @@ -48,7 +47,6 @@ public void ShuffleTeleports()
/// <param name="room">The room identifier.</param>
public PocketDimension(UnknownZone zone, RoomIdentifier room) : base(zone, room)
{
_pocketDim = Server.Instance.GetComponent<PocketDimensionGenerator>(true);
_teleports = UnityEngine.Object.FindObjectsOfType<PocketDimensionTeleport>().ToList();
}
}
Expand Down
4 changes: 2 additions & 2 deletions NwPluginAPI/PluginApiVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 2 additions & 5 deletions NwPluginAPI/Roles/Scps/Scp049.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using PlayerRoles.PlayableScps.Scp049;
using PluginAPI.Core;
using static PlayerRoles.PlayableScps.Scp049.Scp049AudioPlayer;

namespace PluginAPI.Roles
{
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions TemplatePlugin/Commands/TestCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public class TestCommand : ICommand

public string Description { get; } = "Test command.";

public bool SanitizeResponse { get; } = false;

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
response = "Success response";
Expand Down

0 comments on commit ab2a155

Please sign in to comment.