Skip to content

Commit

Permalink
Update Map.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josephfallen authored Sep 8, 2024
1 parent 227e367 commit d344c46
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions EXILED/Exiled.API/Features/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,33 @@ public static void TurnOffAllLights(float duration, IEnumerable<ZoneType> zoneTy
TurnOffAllLights(duration, zone);
}

/// <summary>
/// Turns on all lights in the facility.
/// </summary>
/// <param name="zoneTypes">The <see cref="ZoneType"/>s to affect.</param>
public static void TurnOnAllLights(IEnumerable<ZoneType> zoneTypes)
{
foreach (ZoneType zone in zoneTypes)
TurnOnAllLights(zone);
}

/// <summary>
/// Turns on all lights in the facility.
/// </summary>
/// <param name="zoneType">The <see cref="ZoneType"/> to affect.</param>
public static void TurnOnAllLights(ZoneType zoneType)
{
foreach (RoomLightController controller in RoomLightController.Instances)
{
Room room = controller.GetComponentInParent<Room>();
if (room == null)
continue;

if (zoneType == ZoneType.Unspecified || room.Zone.HasFlag(zoneType))
controller.ServerFlickerLights(0f);
}
}

/// <summary>
/// Changes the <see cref="Color"/> of all lights in the facility.
/// </summary>
Expand Down

0 comments on commit d344c46

Please sign in to comment.