public void FromString_ForList_AllEntriesParsed()
        {
            const string key        = "TT";
            const string serialized = "WhiteMushroom,WhiteMushroom,WhiteMushroom,\r\n" +
                                      "Lithium,AluminumOxide,Magnetite,\r\n" +
                                      "PrecursorIonBattery,HatchingEnzymes,HatchingEnzymes,\r\n" +
                                      "Lead,UraniniteCrystal,UraniniteCrystal";

            var emTechType = new EmPropertyList <TechType>(key);

            Assert.IsTrue(emTechType.FromString($"{key}:{serialized};"));
            Assert.IsTrue(emTechType.HasValue);
            Assert.AreEqual(12, emTechType.Values.Count);

            Assert.AreEqual(TechType.WhiteMushroom, emTechType.Values[0]);
            Assert.AreEqual(TechType.WhiteMushroom, emTechType.Values[1]);
            Assert.AreEqual(TechType.WhiteMushroom, emTechType.Values[2]);
            Assert.AreEqual(TechType.Lithium, emTechType.Values[3]);
            Assert.AreEqual(TechType.AluminumOxide, emTechType.Values[4]);
            Assert.AreEqual(TechType.Magnetite, emTechType.Values[5]);
            Assert.AreEqual(TechType.PrecursorIonBattery, emTechType.Values[6]);
            Assert.AreEqual(TechType.HatchingEnzymes, emTechType.Values[7]);
            Assert.AreEqual(TechType.HatchingEnzymes, emTechType.Values[8]);
            Assert.AreEqual(TechType.Lead, emTechType.Values[9]);
            Assert.AreEqual(TechType.UraniniteCrystal, emTechType.Values[10]);
            Assert.AreEqual(TechType.UraniniteCrystal, emTechType.Values[11]);
        }
 public ModdedItemsConfig() : base("ModdedItems", ModdedItemsProperties)
 {
     CyclopsAbilityModules = (EmPropertyList <string>)Properties["CyclopsAbilityModules"];
     CyclopsPowerModules   = (EmPropertyList <string>)Properties["CyclopsPowerModules"];
     CyclopsRechargeTab    = (EmPropertyList <string>)Properties["CyclopsRechargeTab"];
     ExosuitModules        = (EmPropertyList <string>)Properties["ExosuitModules"];
     SeamothModules        = (EmPropertyList <string>)Properties["SeamothModules"];
     SeamothDepthModules   = (EmPropertyList <string>)Properties["SeamothDepthModules"];
     SeamothAbilityModules = (EmPropertyList <string>)Properties["SeamothAbilityModules"];
     CommonModules         = (EmPropertyList <string>)Properties["CommonModules"];
     TorpedoesModules      = (EmPropertyList <string>)Properties["TorpedoesModules"];
 }
 public EmTextPluginPack()
     : base(MainKey, PluginDefinitions)
 {
     pluginPackName           = (EmProperty <string>)Properties[nameof(IPluginPack.PluginPackName)];
     batteryCapacity          = (EmProperty <int>)Properties[nameof(IPluginPack.BatteryCapacity)];
     unlocksWith              = (EmProperty <TechType>)Properties[nameof(IPluginPack.UnlocksWith)];
     batteryID                = (EmProperty <string>)Properties[nameof(IPluginPack.BatteryID)];
     batteryName              = (EmProperty <string>)Properties[nameof(IPluginPack.BatteryName)];
     batterFlavorText         = (EmProperty <string>)Properties[nameof(IPluginPack.BatteryFlavorText)];
     batteryParts             = (EmPropertyList <TechType>)Properties[nameof(IPluginPack.BatteryParts)];
     batteryIconFile          = (EmProperty <string>)Properties[nameof(ITextPluginPack.BatteryIconFile)];
     powerCellID              = (EmProperty <string>)Properties[nameof(IPluginPack.PowerCellID)];
     powerCellName            = (EmProperty <string>)Properties[nameof(IPluginPack.PowerCellName)];
     powerCellFlavorText      = (EmProperty <string>)Properties[nameof(IPluginPack.PowerCellFlavorText)];
     powerCellAdditionalParts = (EmPropertyList <TechType>)Properties[nameof(IPluginPack.PowerCellAdditionalParts)];
     powerCellIconFile        = (EmProperty <string>)Properties[nameof(ITextPluginPack.PowerCellIconFile)];
 }