// If the given item is a trasure, tally it off public void TallyTreasure(string itemID) { // Only tally items if they are treasure, not already seen and the cave is not closed if (ItemExists(itemID, "TallyTreasure") && itemLookup[itemID].isTreasure && !TreasuresSeen.Contains(itemID) && gameController.CurrentCaveStatus != CaveStatus.CLOSED) { TreasuresSeen.Add(itemID); } }
// Creates a fresh dictionary of runtime items and clears treasure seen public void ResetItems() { // Reset treasures seen TreasuresSeen.Clear(); ItemDict = new Dictionary <string, ItemRuntime>(); for (int i = 0; i < items.Length; i++) { ItemDict.Add(items[i].itemID, new ItemRuntime(items[i])); } // Adjust initial item state for rug and chain ItemDict["62Rug"].ItemState = 1; ItemDict["64Chain"].ItemState = 1; }
// Returns true if the given item is a treasure and has been seen by the player public bool TreasureWasSeen(string itemID) { return(ItemExists(itemID, "TreasureWasSeen") && TreasuresSeen.Contains(itemID)); }