Skip to content

Commit

Permalink
remove OnDestroy patch for light controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
IRacle1 committed Dec 28, 2024
1 parent cf08bda commit ddf2b48
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions EXILED/Exiled.Events/Patches/Generic/RoomLightControllersList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace Exiled.Events.Patches.Generic
{
using Exiled.API.Features;
#pragma warning disable SA1313
#pragma warning disable SA1402

using HarmonyLib;

Expand All @@ -24,16 +23,4 @@ private static void Postfix(RoomLightController __instance)
Room.Get(__instance.Room).RoomLightControllersValue.Add(__instance);
}
}

/// <summary>
/// Patch for removing <see cref="RoomLightController"/> to list.
/// </summary>
[HarmonyPatch(typeof(RoomLightController), nameof(RoomLightController.OnDestroy))]
internal class RoomLightControllersList2
{
private static void Postfix(RoomLightController __instance)
{
Room.Get(__instance.Room).RoomLightControllersValue.Remove(__instance);
}
}
}

0 comments on commit ddf2b48

Please sign in to comment.