22 lines
659 B
C#
22 lines
659 B
C#
using System.Collections.Generic;
|
|
|
|
namespace AfterHours.Shop
|
|
{
|
|
/// <summary>
|
|
/// Serverseitige Liste aller aktiven Regalfächer. Damit Kunden ein
|
|
/// passendes Fach finden können, ohne FindObjectOfType im Frame-Loop
|
|
/// aufzurufen (siehe CLAUDE.md §5).
|
|
/// </summary>
|
|
public sealed class ShelfRegistry
|
|
{
|
|
public static readonly ShelfRegistry Instance = new();
|
|
|
|
private readonly List<ShelfSlot> _slots = new();
|
|
|
|
public IReadOnlyList<ShelfSlot> Slots => _slots;
|
|
|
|
public void Register(ShelfSlot slot) => _slots.Add(slot);
|
|
|
|
public void Unregister(ShelfSlot slot) => _slots.Remove(slot);
|
|
}
|
|
} |