diff --git a/.github/workflows/labapi.yml b/.github/workflows/labapi.yml index 889c33f8d6..0e950dea97 100644 --- a/.github/workflows/labapi.yml +++ b/.github/workflows/labapi.yml @@ -16,7 +16,7 @@ defaults: env: EXILED_REFERENCES_URL: https://exmod-team.github.io/SL-References/LabAPI.zip EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References - EXILED_DLL_ARCHIVER_URL: https://github.com/ExMod-Team/EXILED-DLL-Archiver/releases/latest/download/EXILED-DLL-Archiver.exe + EXILED_DLL_ARCHIVER_URL: https://github.com/ExMod-Team/EXILED-DLL-Archiver/releases/download/v1.8.0/EXILED-DLL-Archiver.exe jobs: diff --git a/EXILED/Exiled.API/Features/Lockers/Chamber.cs b/EXILED/Exiled.API/Features/Lockers/Chamber.cs index 1b499294ae..1a234730f2 100644 --- a/EXILED/Exiled.API/Features/Lockers/Chamber.cs +++ b/EXILED/Exiled.API/Features/Lockers/Chamber.cs @@ -77,13 +77,13 @@ public Chamber(LockerChamber chamber, Locker locker) /// public IEnumerable ToBeSpawned { - get => Base._toBeSpawned.Select(Pickup.Get); + get => Base.ToBeSpawned.Select(Pickup.Get); set { - Base._toBeSpawned.Clear(); + Base.ToBeSpawned.Clear(); foreach (Pickup pickup in value) - Base._toBeSpawned.Add(pickup.Base); + Base.ToBeSpawned.Add(pickup.Base); } } @@ -137,8 +137,8 @@ public bool UseMultipleSpawnpoints /// public Transform Spawnpoint { - get => Base._spawnpoint; - set => Base._spawnpoint = value; + get => Base.Spawnpoint; + set => Base.Spawnpoint = value; } /// @@ -146,8 +146,8 @@ public Transform Spawnpoint /// public bool InitiallySpawn { - get => Base._spawnOnFirstChamberOpening; - set => Base._spawnOnFirstChamberOpening = value; + get => Base.SpawnOnFirstChamberOpening; + set => Base.SpawnOnFirstChamberOpening = value; } /// @@ -155,8 +155,8 @@ public bool InitiallySpawn /// public float Cooldown { - get => Base._targetCooldown; - set => Base._targetCooldown = value; + get => Base.TargetCooldown; + set => Base.TargetCooldown = value; } /// @@ -219,7 +219,7 @@ public void AddItemToSpawn(ItemType itemType, int quantity = 1, bool spawnIfIsOp continue; } - Base._toBeSpawned.Add(pickup.Base); + Base.ToBeSpawned.Add(pickup.Base); } } diff --git a/EXILED/Exiled.API/Features/Lockers/Locker.cs b/EXILED/Exiled.API/Features/Lockers/Locker.cs index 653e432d2f..c525ec5d98 100644 --- a/EXILED/Exiled.API/Features/Lockers/Locker.cs +++ b/EXILED/Exiled.API/Features/Lockers/Locker.cs @@ -220,7 +220,7 @@ public void AddItem(Pickup item) // If the chamber is configured to spawn items on the first opening, add the item to the list of items to be spawned. // Otherwise, spawn the item immediately. if (chamber.InitiallySpawn) - chamber.Base._toBeSpawned.Add(item.Base); + chamber.Base.ToBeSpawned.Add(item.Base); else ItemDistributor.SpawnPickup(item.Base); } diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index df2ab96604..cf03ed24ba 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -3535,7 +3535,7 @@ public void Teleport(object obj, Vector3 offset) Teleport(locker.transform.position + Vector3.up + offset); break; case LockerChamber chamber: - Teleport(chamber._spawnpoint.position + Vector3.up + offset); + Teleport(chamber.Spawnpoint.position + Vector3.up + offset); break; case ElevatorChamber elevator: Teleport(elevator.transform.position + Vector3.up + offset); diff --git a/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs index 375eed5302..4a9e233dd9 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EscapingPocketDimensionEventArgs.cs @@ -21,18 +21,27 @@ public class EscapingPocketDimensionEventArgs : IPlayerEvent, IDeniableEvent /// /// Initializes a new instance of the class. /// + /// + /// + /// /// /// /// /// /// /// - public EscapingPocketDimensionEventArgs(Player player, Vector3 position) + public EscapingPocketDimensionEventArgs(PocketDimensionTeleport pocketDimensionTeleport, Player player, Vector3 position) { + Teleporter = pocketDimensionTeleport; Player = player; TeleportPosition = position; } + /// + /// Gets the PocketDimensionTeleport the player walked into. + /// + public PocketDimensionTeleport Teleporter { get; } + /// /// Gets the player who's escaping the pocket dimension. /// diff --git a/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs index 9d398abdda..490ebfa1a9 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/FailingEscapePocketDimensionEventArgs.cs @@ -21,14 +21,18 @@ public class FailingEscapePocketDimensionEventArgs : IPlayerEvent, IDeniableEven /// /// Initializes a new instance of the class. /// + /// + /// + /// /// /// /// /// /// /// - public FailingEscapePocketDimensionEventArgs(Player player, bool isAllowed = true) + public FailingEscapePocketDimensionEventArgs(PocketDimensionTeleport pocketDimensionTeleport, Player player, bool isAllowed = true) { + Teleporter = pocketDimensionTeleport; Player = player; IsAllowed = isAllowed; } @@ -36,7 +40,6 @@ public FailingEscapePocketDimensionEventArgs(Player player, bool isAllowed = tru /// /// Gets the PocketDimensionTeleport the player walked into. /// - [Obsolete("can't be used")] public PocketDimensionTeleport Teleporter { get; } /// diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs b/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs index 6c6408b36f..fb40fe943f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EscapingPocketDimension.cs @@ -26,7 +26,7 @@ namespace Exiled.Events.Patches.Events.Player using static HarmonyLib.AccessTools; /// - /// Patches the method. + /// Patches the method. /// Adds the event. /// [EventPatch(typeof(Handlers.Player), nameof(Handlers.Player.EscapingPocketDimension))] @@ -47,14 +47,17 @@ private static IEnumerable Transpiler(IEnumerable - /// Patches . + /// Patches . /// Adds the event. /// [EventPatch(typeof(Handlers.Player), nameof(Handlers.Player.FailingEscapePocketDimension))] @@ -39,13 +39,16 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instruction.IsLdarg(0)).labels[0]; + Label @break = (Label)newInstructions.FindLast(instruction => instruction.opcode == OpCodes.Br_S).operand; int offset = 1; int index = newInstructions.FindIndex(instruction => instruction.Calls(Method(typeof(Stopwatch), nameof(Stopwatch.Stop)))) + offset; diff --git a/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs b/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs index 47cc0809bb..97cbb98577 100644 --- a/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/LockerFixes.cs @@ -31,7 +31,7 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions); int offset = -1; - int index = newInstructions.FindIndex(i => i.LoadsField(Field(typeof(LockerChamber), nameof(LockerChamber._spawnOnFirstChamberOpening)))) + offset; + int index = newInstructions.FindIndex(i => i.LoadsField(Field(typeof(LockerChamber), nameof(LockerChamber.SpawnOnFirstChamberOpening)))) + offset; newInstructions.InsertRange(index, new[] { @@ -50,16 +50,16 @@ private static void Hepler(LockerChamber chamber) { chamber.Content.Clear(); - if (!chamber._spawnOnFirstChamberOpening) + if (!chamber.SpawnOnFirstChamberOpening) return; - foreach (ItemPickupBase ipb in chamber._toBeSpawned) + foreach (ItemPickupBase ipb in chamber.ToBeSpawned) { if (ipb != null) ItemDistributor.SpawnPickup(ipb); } - chamber._toBeSpawned.Clear(); + chamber.ToBeSpawned.Clear(); } } } \ No newline at end of file diff --git a/EXILED/Exiled.Loader/AutoUpdateFiles.cs b/EXILED/Exiled.Loader/AutoUpdateFiles.cs index c04a1d00e3..18d49995ef 100644 --- a/EXILED/Exiled.Loader/AutoUpdateFiles.cs +++ b/EXILED/Exiled.Loader/AutoUpdateFiles.cs @@ -17,6 +17,6 @@ public static class AutoUpdateFiles /// /// Gets which SCP: SL version generated Exiled. /// - public static readonly Version RequiredSCPSLVersion = new(14, 0, 0, 2); + public static readonly Version RequiredSCPSLVersion = new(14, 0, 0, 3); } } \ No newline at end of file diff --git a/EXILED/Exiled/Exiled.nuspec b/EXILED/Exiled/Exiled.nuspec index 388d8ae0e9..28c3c7bead 100644 --- a/EXILED/Exiled/Exiled.nuspec +++ b/EXILED/Exiled/Exiled.nuspec @@ -26,7 +26,7 @@ - + diff --git a/EXILED/docs/articles/SCPSLRessources/NW_Documentation.md b/EXILED/docs/articles/SCPSLRessources/NW_Documentation.md index 66dd2d881e..d192c18231 100644 --- a/EXILED/docs/articles/SCPSLRessources/NW_Documentation.md +++ b/EXILED/docs/articles/SCPSLRessources/NW_Documentation.md @@ -17,7 +17,7 @@ title: NW Documentation --- -Last Update (14.0.0.2) +Last Update (14.0.0.3) ### Index @@ -290,6 +290,7 @@ Last Update (14.0.0.2) - [SpectatorSpawnReason](#spectatorspawnreason) - [State](#state) - [States](#states) +- [StatMessageType](#statmessagetype) - [StatusType](#statustype) - [SteamLobbyPrivacy](#steamlobbyprivacy) - [StorageLocation](#storagelocation) @@ -1747,6 +1748,7 @@ Last Update (14.0.0.2) [2] = CuffedClassD [3] = Scientist [4] = CuffedScientist + [5] = Custom ``` @@ -4636,6 +4638,17 @@ Last Update (14.0.0.2) +### StatMessageType + +
PlayerStatsSystem.SyncedStatMessages+StatMessageType + +``` + [0] = CurrentValue + [1] = MaxValue +``` + +
+ ### StatusType
InventorySystem.Items.Usables.StatusMessage+StatusType @@ -5200,7 +5213,7 @@ Last Update (14.0.0.2)
Damage Handlers -```md title="Latest Updated: 14.0.0.2" +```md title="Latest Updated: 14.0.0.3" All available DamageHandlers + Symbol ':' literally means "inherits from"