private static DesignInfo GetDesignInfoFromRow( SQLiteConnection db, AssetDatabase assets, Row row) { int integer = row[0].SQLiteValueToInteger(); DesignInfo designInfo = new DesignInfo() { ID = integer, DesignSections = DesignsCache.GetDesignSectionInfos(db, assets, integer).ToArray <DesignSectionInfo>(), PlayerID = row[1].SQLiteValueToOneBasedIndex(), Name = row[2], Armour = int.Parse(row[3]), Structure = float.Parse(row[4]), NumTurrets = int.Parse(row[5]), Mass = float.Parse(row[6]), Acceleration = float.Parse(row[8]), TopSpeed = float.Parse(row[9]), SavingsCost = int.Parse(row[10]), ProductionCost = int.Parse(row[11]), Class = (ShipClass)int.Parse(row[12]), CrewAvailable = int.Parse(row[13]), PowerAvailable = int.Parse(row[14]), SupplyAvailable = int.Parse(row[15]), CrewRequired = int.Parse(row[16]), PowerRequired = int.Parse(row[17]), SupplyRequired = int.Parse(row[18]), NumBuilt = int.Parse(row[19]), DesignDate = int.Parse(row[20]), Role = (ShipRole)int.Parse(row[21]), WeaponRole = (WeaponRole)int.Parse(row[22]), isPrototyped = bool.Parse(row[23]), isAttributesDiscovered = bool.Parse(row[24]), StationType = (StationType)int.Parse(row[25]), StationLevel = int.Parse(row[26]), PriorityWeaponName = row[28] ?? string.Empty, NumDestroyed = int.Parse(row[29]), RetrofitBaseID = row[30].SQLiteValueToOneBasedIndex() }; designInfo.HackValidateRole(); foreach (DesignSectionInfo designSection in designInfo.DesignSections) { designSection.DesignInfo = designInfo; } return(designInfo); }