Esempio n. 1
0
    protected override void SetupFromSplitJsonString(string[] splitJsonString)
    {
        name            = splitJsonString[0];
        notes           = splitJsonString[1];
        size            = EnumValue.CreateFromJsonString(splitJsonString[2]);
        restockSettings = RestockSettings.CreateFromJsonString(splitJsonString[3]);

        m_AvailabilityPerShopSizePerStockType  = AvailabilityPerStockTypePerShopSize.Load(splitJsonString[4]);
        m_RestockFrequencyModifiersPerShopSize = RestockFrequencyModifiersPerShopSize.Load(splitJsonString[5]);
        m_ReadyCashPerShopSize = ReadyCashPerShopSize.Load(splitJsonString[6]);
        m_RarityPerCharacterClassPerSpellContainer = RarityPerCharacterClassPerSpellContainer.Load(splitJsonString[7]);
        m_BudgetRangePerPowerLevelPerStockType     = FloatRangePerPowerLevelPerStockType.Load(splitJsonString[8]);
        m_ArmourCollection               = ArmourCollection.Load(splitJsonString[9]);
        m_SpellCollection                = SpellCollection.Load(splitJsonString[10]);
        m_WeaponCollection               = WeaponCollection.Load(splitJsonString[11]);
        m_RingCollection                 = RingCollection.Load(splitJsonString[12]);
        m_RodCollection                  = RodCollection.Load(splitJsonString[13]);
        m_StaffCollection                = StaffCollection.Load(splitJsonString[14]);
        m_WondrousCollection             = WondrousCollection.Load(splitJsonString[15]);
        m_ArmourQualityCollection        = ArmourQualityCollection.Load(splitJsonString[16]);
        m_WeaponQualityCollection        = WeaponQualityCollection.Load(splitJsonString[17]);
        m_WeaponQualityConstraintsMatrix = WeaponQualityConstraintsMatrix.Load(splitJsonString[18]);
        m_ArmourQualityConstraintsMatrix = ArmourQualityConstraintsMatrix.Load(splitJsonString[19]);

        shops = new Shop[splitJsonString.Length - 20];
        for (int i = 0; i < shops.Length; i++)
        {
            shops[i] = Shop.CreateFromJsonString(splitJsonString[i + 20]);
        }
    }
Esempio n. 2
0
    protected override void SetupFromSplitJsonString(string[] splitJsonString)
    {
        name               = splitJsonString[0];
        notes              = CreateStringFromSafeJson(splitJsonString[1]);
        m_Books            = EnumSetting.Load(splitJsonString[2]);
        m_CharacterClasses = EnumSetting.Load(splitJsonString[3]);
        m_ShopSizes        = EnumSetting.Load(splitJsonString[4]);
        m_SettlementSizes  = EnumSetting.Load(splitJsonString[5]);
        m_Rarities         = EnumSetting.Load(splitJsonString[6]);
        m_Allowances       = EnumSetting.Load(splitJsonString[7]);
        m_UsesAutomaticBonusProgressionRules = Wrapper <bool> .CreateFromJsonString(splitJsonString[8]);

        m_UsesMinimumCasterLevelForSpellContainerItems = Wrapper <bool> .CreateFromJsonString(splitJsonString[9]);

        m_CasterTypesPerCharacterClass             = SaveableSelectedEnumPerEnum.Load(splitJsonString[10]);
        m_WeightingPerRarity                       = WeightingPerRarity.Load(splitJsonString[11]);
        m_RestockSettingsPerSettlementSize         = RestockSettingsPerSettlementSize.Load(splitJsonString[12]);
        m_AvailabilityPerShopSizePerStockType      = AvailabilityPerStockTypePerShopSize.Load(splitJsonString[13]);
        m_RestockFrequencyModifiersPerShopSize     = RestockFrequencyModifiersPerShopSize.Load(splitJsonString[14]);
        m_ReadyCashPerShopSize                     = ReadyCashPerShopSize.Load(splitJsonString[15]);
        m_RarityPerCharacterClassPerSpellContainer = RarityPerCharacterClassPerSpellContainer.Load(splitJsonString[16]);
        m_BudgetRangePerPowerLevelPerStockType     = FloatRangePerPowerLevelPerStockType.Load(splitJsonString[17]);
        m_ArmourCollection               = ArmourCollection.Load(splitJsonString[18]);
        m_SpellCollection                = SpellCollection.Load(splitJsonString[19]);
        m_WeaponCollection               = WeaponCollection.Load(splitJsonString[20]);
        m_RingCollection                 = RingCollection.Load(splitJsonString[21]);
        m_RodCollection                  = RodCollection.Load(splitJsonString[22]);
        m_StaffCollection                = StaffCollection.Load(splitJsonString[23]);
        m_WondrousCollection             = WondrousCollection.Load(splitJsonString[24]);
        m_ArmourQualityCollection        = ArmourQualityCollection.Load(splitJsonString[25]);
        m_WeaponQualityCollection        = WeaponQualityCollection.Load(splitJsonString[26]);
        m_WeaponQualityConstraintsMatrix = WeaponQualityConstraintsMatrix.Load(splitJsonString[27]);
        m_ArmourQualityConstraintsMatrix = ArmourQualityConstraintsMatrix.Load(splitJsonString[28]);

        settlements = new Settlement[splitJsonString.Length - 29];
        for (int i = 0; i < settlements.Length; i++)
        {
            settlements[i] = Settlement.CreateFromJsonString(splitJsonString[i + 29]);
        }

        current = this;
    }
    protected override void SetupFromSplitJsonString(string[] splitJsonString)
    {
        name                 = splitJsonString[0];
        spellContainers      = EnumSetting.Load(splitJsonString[1]);
        allowances           = EnumSetting.Load(splitJsonString[2]);
        rarities             = EnumSetting.Load(splitJsonString[3]);
        characterClasses     = EnumSetting.Load(splitJsonString[4]);
        characterCasterTypes = SaveableSelectedEnumPerEnum.Load(splitJsonString[5]);
        books                = EnumSetting.Load(splitJsonString[6]);
        rarityPerCharacterClassPerSpellContainer = RarityPerCharacterClassPerSpellContainer.Load(splitJsonString[7]);
        spellCollectionFilter = SpellCollectionFilter.CreateFromJsonString(splitJsonString[8]);

        spells = new Spell[splitJsonString.Length - 9];
        for (int i = 0; i < spells.Length; i++)
        {
            spells[i] = Spell.CreateFromJsonString(splitJsonString[i + 9]);
        }

        spellCollectionFilter.ApplyFilter(this);
    }
Esempio n. 4
0
    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]);
    }