using System.Collections.Generic; using System.Collections.ObjectModel; namespace BriarQueen.Data.Identifiers { public enum ItemKey { None = 0, RustedKnife = 1, SharpenedKnife = 2, EmeraldAmulet = 3, DustyMirror = 4, SmallRag = 5, GreenCandle = 6, IndigoCandle = 7, DirtyMagnifyingGlass = 8, PumphouseKey = 9, RedCandle = 10, OrangeCandle = 11, YellowCandle = 12, BlueCandle = 13, VioletCandle = 14, Pliers = 15, Emerald = 16, Sapphire = 17, Ruby = 18, RubyRing = 19, SilverCoin = 20, GoldCoin = 21, GrindstoneAxlePin = 22, Diamond = 23, DiamondTiara = 24, DustySapphire = 25, TornPage1 = 26, TornPage2 = 27, TornPage3 = 28, TornPage4 = 29, TornPage5 = 30, IncompleteBook = 31, CompleteBook = 32, Stamp = 33, LaxleyClockHourHand = 34, LaxleyClockMinuteHand = 35, } public enum EnvironmentKey { None = 0, ChainLock = 1, FountainVines = 2, GrindingStone = 3, WorkshopWindow = 4, WorkshopDamagedBook = 5, WorkshopBookSlot = 6, WorkshopDiary = 7, PumphouseWaterValve = 8, WorkshopFadedPhoto = 9, WorkshopDownstairsLight = 10, WorkshopBrokenLantern = 11, WorkshopWriting = 12, StreetVines = 13, GrandfatherClockPlaque = 14, } public enum PuzzleSlotKey { None = 0, WorkshopCandleSlot = 1, WorkshopPuzzleBoxSlot = 2, FountainGemSlot = 3, FireplaceLockboxSlot = 4, GrandfatherClockFace = 5, GrandfatherClockHand = 6, } public static class ItemIDs { public static readonly IReadOnlyDictionary PuzzleSlots = new ReadOnlyDictionary( new Dictionary { { PuzzleSlotKey.WorkshopCandleSlot, "PUZ_WorkshopCandleSlot" }, { PuzzleSlotKey.WorkshopPuzzleBoxSlot, "PUZ_WorkshopPuzzleBoxSlot" }, { PuzzleSlotKey.FountainGemSlot, "PUZ_FountainGemSlot" }, { PuzzleSlotKey.FireplaceLockboxSlot, "PUZ_FireplaceLockboxSlot" }, { PuzzleSlotKey.GrandfatherClockFace, "PUZ_GrandfatherClockFace" }, { PuzzleSlotKey.GrandfatherClockHand, "PUZ_GrandfatherClockHand" }, }); public static readonly IReadOnlyDictionary Environment = new ReadOnlyDictionary( new Dictionary { { EnvironmentKey.ChainLock, "ENV_ChainLock" }, { EnvironmentKey.FountainVines, "ENV_FountainVines" }, { EnvironmentKey.GrindingStone, "ENV_GrindingStone" }, { EnvironmentKey.WorkshopWindow, "ENV_WorkshopWindow" }, { EnvironmentKey.WorkshopDamagedBook, "ENV_WorkshopDamagedBook" }, { EnvironmentKey.WorkshopBookSlot, "ENV_WorkshopBookSlot" }, { EnvironmentKey.WorkshopDiary, "ENV_WorkshopDiary" }, { EnvironmentKey.PumphouseWaterValve, "ENV_PumphouseWaterValve" }, { EnvironmentKey.WorkshopFadedPhoto, "ENV_WorkshopFadedPhoto" }, { EnvironmentKey.WorkshopDownstairsLight, "ENV_WorkshopDownstairsLight" }, { EnvironmentKey.WorkshopBrokenLantern, "ENV_WorkshopBrokenLantern" }, { EnvironmentKey.WorkshopWriting, "ENV_WorkshopWriting" }, { EnvironmentKey.StreetVines, "ENV_StreetVines" }, { EnvironmentKey.GrandfatherClockPlaque, "ENV_GrandfatherClockPlaque" }, }); public static readonly IReadOnlyDictionary Pickups = new ReadOnlyDictionary( new Dictionary { { ItemKey.RustedKnife, "01_RustedKnife" }, { ItemKey.SharpenedKnife, "02_SharpenedKnife" }, { ItemKey.EmeraldAmulet, "03_EmeraldAmulet" }, { ItemKey.DustyMirror, "04_DustyMirror" }, { ItemKey.SmallRag, "05_SmallRag" }, { ItemKey.GreenCandle, "06_GreenCandle" }, { ItemKey.IndigoCandle, "07_IndigoCandle" }, { ItemKey.DirtyMagnifyingGlass, "08_DirtyMagnifyingGlass" }, { ItemKey.PumphouseKey, "09_PumphouseKey" }, { ItemKey.RedCandle, "10_RedCandle" }, { ItemKey.OrangeCandle, "11_OrangeCandle" }, { ItemKey.YellowCandle, "12_YellowCandle" }, { ItemKey.BlueCandle, "13_BlueCandle" }, { ItemKey.VioletCandle, "14_VioletCandle" }, { ItemKey.Pliers, "15_Pliers" }, { ItemKey.Emerald, "16_Emerald" }, { ItemKey.Sapphire, "17_Sapphire" }, { ItemKey.Ruby, "18_Ruby" }, { ItemKey.RubyRing, "19_RubyRing" }, { ItemKey.SilverCoin, "20_SilverCoin" }, { ItemKey.GoldCoin, "21_GoldCoin" }, { ItemKey.GrindstoneAxlePin, "22_GrindstoneAxlePin" }, { ItemKey.Diamond, "23_Diamond" }, { ItemKey.DiamondTiara, "24_DiamondTiara" }, { ItemKey.DustySapphire, "25_DustySapphire" }, { ItemKey.TornPage1, "26_TornPage1" }, { ItemKey.TornPage2, "27_TornPage2" }, { ItemKey.TornPage3, "28_TornPage3" }, { ItemKey.TornPage4, "29_TornPage4" }, { ItemKey.TornPage5, "30_TornPage5" }, { ItemKey.IncompleteBook, "31_IncompleteBook" }, { ItemKey.CompleteBook, "32_CompleteBook" }, { ItemKey.Stamp, "33_Stamp" }, { ItemKey.LaxleyClockHourHand, "34_LaxleyClockHourHand" }, { ItemKey.LaxleyClockMinuteHand, "35_LaxleyClockMinuteHand" }, }); 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; } } }