From d344c4656e21ab2ce6126db6a9413d0b8251b2f8 Mon Sep 17 00:00:00 2001 From: Joseph <108951296+Josephfallen@users.noreply.github.com> Date: Sun, 8 Sep 2024 02:32:44 -0400 Subject: [PATCH] Update Map.cs --- EXILED/Exiled.API/Features/Map.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs index 3f1f6fc1a..89e75aea9 100644 --- a/EXILED/Exiled.API/Features/Map.cs +++ b/EXILED/Exiled.API/Features/Map.cs @@ -185,6 +185,33 @@ public static void TurnOffAllLights(float duration, IEnumerable zoneTy TurnOffAllLights(duration, zone); } + /// + /// Turns on all lights in the facility. + /// + /// The s to affect. + public static void TurnOnAllLights(IEnumerable zoneTypes) + { + foreach (ZoneType zone in zoneTypes) + TurnOnAllLights(zone); + } + + /// + /// Turns on all lights in the facility. + /// + /// The to affect. + public static void TurnOnAllLights(ZoneType zoneType) + { + foreach (RoomLightController controller in RoomLightController.Instances) + { + Room room = controller.GetComponentInParent(); + if (room == null) + continue; + + if (zoneType == ZoneType.Unspecified || room.Zone.HasFlag(zoneType)) + controller.ServerFlickerLights(0f); + } + } + /// /// Changes the of all lights in the facility. ///