using System.Collections.Generic; using System.Collections.ObjectModel; namespace BriarQueen.Data.Identifiers { public enum ItemKey { None = 0, S_Key, DirtyTeddyBear, GoldAmulet, } public enum EnvironmentKey { None = 0, C1CarNewspaper, Codex, } public enum PuzzleSlotKey { None = 0, } public static class ItemIDs { public static readonly IReadOnlyDictionary PuzzleSlots = new ReadOnlyDictionary( new Dictionary { }); public static readonly IReadOnlyDictionary Environment = new ReadOnlyDictionary( new Dictionary { }); public static readonly IReadOnlyDictionary Pickups = new ReadOnlyDictionary( new Dictionary { { ItemKey.S_Key, "Item:Pickup:S_Key" }, { ItemKey.DirtyTeddyBear, "Item:Pickup:DirtyTeddyBear" }, { ItemKey.GoldAmulet, "Item:Pickup:GoldAmulet" }, }); public static string Get(ItemKey key) { return Pickups.TryGetValue(key, out var id) ? id : string.Empty; } public static string Get(EnvironmentKey key) { return Environment.TryGetValue(key, out var id) ? id : string.Empty; } public static string Get(PuzzleSlotKey key) { return PuzzleSlots.TryGetValue(key, out var id) ? id : string.Empty; } public static bool TryGet(ItemKey key, out string id) { return Pickups.TryGetValue(key, out id); } public static bool TryGet(EnvironmentKey key, out string id) { return Environment.TryGetValue(key, out id); } public static bool TryGet(PuzzleSlotKey key, out string id) { return PuzzleSlots.TryGetValue(key, out id); } public static IEnumerable GetAllItemIDs() { return Pickups.Values; } } }