Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions EXILED/Exiled.API/Enums/LockerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,10 @@ public enum LockerType
/// SCP-127 pedestal.
/// </summary>
Scp127Pedestal,

/// <summary>
/// SCP-1509 pedestal.
/// </summary>
Scp1509Pedestal,
}
}
1 change: 1 addition & 0 deletions EXILED/Exiled.API/Extensions/LockerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public static class LockerExtensions
"AdrenalineMedkitStructure" => LockerType.Adrenaline,
"MicroHIDpedestal" => LockerType.MicroHid,
"SCP_127_Container" => LockerType.Scp127Pedestal,
"Scp1509PedestalStructure Variant" => LockerType.Scp1509Pedestal,
_ => LockerType.Unknown,
};
}
Expand Down
6 changes: 6 additions & 0 deletions EXILED/Exiled.API/Features/Lockers/Chamber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ public Vector3 GetRandomSpawnPoint()
return Spawnpoint.position;
}

/// <summary>
/// Returns the Door in a human-readable format.
/// </summary>
/// <returns>A string containing Door-related data.</returns>
public override string ToString() => $"({string.Join(",", AcceptableTypes)}) [{string.Join(",", ToBeSpawned)}] *{Cooldown}* ={IsOpen}=";

/// <summary>
/// Gets the chamber by its <see cref="LockerChamber"/>.
/// </summary>
Expand Down
8 changes: 8 additions & 0 deletions EXILED/Exiled.API/Features/Lockers/Locker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public Locker(BaseLocker locker)

Chambers = locker.Chambers.Select(x => new Chamber(x, this)).ToList();
Type = locker.GetLockerType();
if (Type == LockerType.Unknown)
Log.Warn($"[LockerType.Unknown] {Base}");
}

/// <summary>
Expand Down Expand Up @@ -181,6 +183,12 @@ public Vector3 RandomChamberPosition
/// <param name="type">The type of item to be added.</param>
public void AddItem(ItemType type) => AddItem(Pickup.Create(type));

/// <summary>
/// Returns the Door in a human-readable format.
/// </summary>
/// <returns>A string containing Door-related data.</returns>
public override string ToString() => $"{Type} [{Room}] *{Chambers.Count}*";

/// <summary>
/// Clears the cached lockers in the <see cref="BaseToExiledLockers"/> dictionary.
/// </summary>
Expand Down
Loading