protected override string ConvertToJsonString(string[] jsonSplitter) { string jsonString = ""; jsonString += name + jsonSplitter[0]; jsonString += GetSafeJsonFromString(notes) + jsonSplitter[0]; jsonString += size + jsonSplitter[0]; jsonString += Wrapper <float> .GetJsonString(frequencyModifier) + jsonSplitter[0]; jsonString += Wrapper <float> .GetJsonString(readyCash) + jsonSplitter[0]; jsonString += FlagsEnumSetting.GetJsonString(stockTypes) + jsonSplitter[0]; jsonString += Wrapper <int> .GetJsonString(daysSinceLastRestock) + jsonSplitter[0]; jsonString += Wrapper <float> .GetJsonString(totalCash) + jsonSplitter[0]; jsonString += SpecificArmourCollection.GetJsonString(specificArmourCollection) + jsonSplitter[0]; jsonString += SpecificPotionCollection.GetJsonString(specificPotionCollection) + jsonSplitter[0]; jsonString += SpecificRingCollection.GetJsonString(specificRingCollection) + jsonSplitter[0]; jsonString += SpecificRodCollection.GetJsonString(specificRodCollection) + jsonSplitter[0]; jsonString += SpecificScrollCollection.GetJsonString(specificScrollCollection) + jsonSplitter[0]; jsonString += SpecificStaffCollection.GetJsonString(specificStaffCollection) + jsonSplitter[0]; jsonString += SpecificWandCollection.GetJsonString(specificWandCollection) + jsonSplitter[0]; jsonString += SpecificWeaponCollection.GetJsonString(specificWeaponCollection) + jsonSplitter[0]; jsonString += SpecificWondrousCollection.GetJsonString(specificWondrousCollection) + jsonSplitter[0]; jsonString += m_RarityPerCharacterClassPerSpellContainer.name + jsonSplitter[0]; jsonString += m_BudgetRangePerPowerLevelPerStockType.name + jsonSplitter[0]; jsonString += m_ArmourCollection.name + jsonSplitter[0]; jsonString += m_SpellCollection.name + jsonSplitter[0]; jsonString += m_WeaponCollection.name + jsonSplitter[0]; jsonString += m_RingCollection.name + jsonSplitter[0]; jsonString += m_RodCollection.name + jsonSplitter[0]; jsonString += m_StaffCollection.name + jsonSplitter[0]; jsonString += m_WondrousCollection.name + jsonSplitter[0]; jsonString += m_ArmourQualityCollection.name + jsonSplitter[0]; jsonString += m_WeaponQualityCollection.name + jsonSplitter[0]; jsonString += m_WeaponQualityConstraintsMatrix.name + jsonSplitter[0]; jsonString += m_ArmourQualityConstraintsMatrix.name + jsonSplitter[0]; return(jsonString); }
protected override void SetupFromSplitJsonString(string[] splitJsonString) { name = splitJsonString[0]; notes = CreateStringFromSafeJson(splitJsonString[1]); size = splitJsonString[2]; frequencyModifier = Wrapper <float> .CreateFromJsonString(splitJsonString[3]); readyCash = Wrapper <float> .CreateFromJsonString(splitJsonString[4]); stockTypes = FlagsEnumSetting.CreateFromJsonString(splitJsonString[5]); daysSinceLastRestock = Wrapper <int> .CreateFromJsonString(splitJsonString[6]); totalCash = Wrapper <float> .CreateFromJsonString(splitJsonString[7]); specificArmourCollection = SpecificArmourCollection.CreateFromJsonString(splitJsonString[8]); specificPotionCollection = SpecificPotionCollection.CreateFromJsonString(splitJsonString[9]); specificRingCollection = SpecificRingCollection.CreateFromJsonString(splitJsonString[10]); specificRodCollection = SpecificRodCollection.CreateFromJsonString(splitJsonString[11]); specificScrollCollection = SpecificScrollCollection.CreateFromJsonString(splitJsonString[12]); specificStaffCollection = SpecificStaffCollection.CreateFromJsonString(splitJsonString[13]); specificWandCollection = SpecificWandCollection.CreateFromJsonString(splitJsonString[14]); specificWeaponCollection = SpecificWeaponCollection.CreateFromJsonString(splitJsonString[15]); specificWondrousCollection = SpecificWondrousCollection.CreateFromJsonString(splitJsonString[16]); m_RarityPerCharacterClassPerSpellContainer = RarityPerCharacterClassPerSpellContainer.Load(splitJsonString[17]); m_BudgetRangePerPowerLevelPerStockType = FloatRangePerPowerLevelPerStockType.Load(splitJsonString[18]); m_ArmourCollection = ArmourCollection.Load(splitJsonString[19]); m_SpellCollection = SpellCollection.Load(splitJsonString[20]); m_WeaponCollection = WeaponCollection.Load(splitJsonString[21]); m_RingCollection = RingCollection.Load(splitJsonString[22]); m_RodCollection = RodCollection.Load(splitJsonString[23]); m_StaffCollection = StaffCollection.Load(splitJsonString[24]); m_WondrousCollection = WondrousCollection.Load(splitJsonString[25]); m_ArmourQualityCollection = ArmourQualityCollection.Load(splitJsonString[26]); m_WeaponQualityCollection = WeaponQualityCollection.Load(splitJsonString[27]); m_WeaponQualityConstraintsMatrix = WeaponQualityConstraintsMatrix.Load(splitJsonString[28]); m_ArmourQualityConstraintsMatrix = ArmourQualityConstraintsMatrix.Load(splitJsonString[29]); }