Load and save factory numbers.

Hopefully fixes #3244.
master
cybersphinx 2012-03-16 16:55:48 +01:00
parent d5a97c0399
commit c041fb3dab
1 changed files with 5 additions and 0 deletions

View File

@ -4788,6 +4788,10 @@ static bool loadSaveStructure2(const char *pFileName, STRUCTURE **ppList)
setAssemblyPoint(psFactory->psAssemblyPoint, point.x, point.y, player, true);
psFactory->psAssemblyPoint->selected = ini.value("Factory/assemblyPoint/selected", false).toBool();
}
if (ini.contains("Factory/assemblyPoint/number"))
{
psFactory->psAssemblyPoint->factoryInc = ini.value("Factory/assemblyPoint/number", 42).toInt();
}
for (int runNum = 0; runNum < ini.value("Factory/productionRuns", 0).toInt(); runNum++)
{
ProductionRunEntry currentProd;
@ -5004,6 +5008,7 @@ bool writeStructFile(const char *pFileName)
{
ini.setVector3i("Factory/assemblyPoint/pos", psFlag->coords);
if (psFlag->selected) ini.setValue("Factory/assemblyPoint/selected", psFlag->selected);
ini.setValue("Factory/assemblyPoint/number", psFlag->factoryInc);
}
if (psFactory->psCommander)
{