private void AddAllKindsOfUnlocker(Quest questToAddTo, JSONObject whatToAdd) { List <Unlocker> unlockersListToAdd = new List <Unlocker>(); for (questParserHelper i = questParserHelper.PATRONUNLOCK; i < questParserHelper.LOCATION; i++) { for (int j = 0; j < whatToAdd[(int)i].Count; j++) { JSONObject unlockerComponents = whatToAdd[(int)i][j]; unlockersListToAdd.Add(unlockerLoader.createUnlocker(i.ToString(), unlockerComponents)); } } questToAddTo.ThingsToUnlock = unlockersListToAdd; }
private void AddAllKindsOfUnlocker(Conversation conversationToModify, JSONObject whatToAdd) { List <Unlocker> unlockersListToAdd = new List <Unlocker>(); for (ConversationParserHelper i = ConversationParserHelper.PATRONUNLOCK; i < ConversationParserHelper.LENGTH; i++) { for (int j = 0; j < whatToAdd[(int)i].Count; j++) { JSONObject unlockerComponents = whatToAdd[(int)i][j]; unlockersListToAdd.Add(unlockerLoader.createUnlocker(i.ToString(), unlockerComponents)); } } conversationToModify.ThingsThisConversationUnlocks = unlockersListToAdd; }