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 { private static readonly IReadOnlyDictionary _puzzleSlots = new ReadOnlyDictionary( new Dictionary { }); private static readonly IReadOnlyDictionary _environment = new ReadOnlyDictionary( new Dictionary { }); private 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; } } }