+
+/////////////////////////////////////////////////////////////////////
+//
+bool BSConf::loadStats()
+{
+ UnitList units;
+ QFile f(m_sStatsFilename);
+
+ if ( f.open(IO_ReadOnly) )
+ { // file opened successfully
+ QTextStream t( &f ); // use a text stream
+ QString s;
+ QString r;
+ string race;
+ while ( !t.eof() )
+ {
+ r = t.readLine(); // line of text excluding '\n'
+ race = (const char*) r;
+ s = t.readLine(); // line of text excluding '\n'
+ QTextStream t1(s,IO_ReadOnly );
+ t1.skipWhiteSpace();
+ while ( !t1.eof() )
+ {
+ QString temp;
+ units[race].setName(race);
+ t1 >> temp;
+ units[race].setRace(temp.toInt());
+ t1 >> temp;
+ units[race].setUnitClass((const char*) temp);
+ t1 >> temp;
+ units[race].addTarget((const char*) temp);
+ t1 >> temp;
+ units[race].addTarget((const char*) temp);
+ t1 >> temp;
+ units[race].addTarget((const char*) temp);
+ t1 >> temp;
+ units[race].setInitiative(temp.toInt());
+ t1 >> temp;
+ units[race].setAgility(temp.toInt());
+ t1 >> temp;
+ units[race].setWeaponSpeed(temp.toInt());
+ t1 >> temp;
+ units[race].setGuns(temp.toInt());
+ t1 >> temp;
+ units[race].setPower(temp.toInt());
+ t1 >> temp;
+ units[race].setArmor(temp.toInt());
+ t1 >> temp;
+ units[race].setEMP(temp.toInt());
+ t1 >> temp;
+ units[race].setTotalResources(temp.toInt());
+ t1 >> temp;
+ units[race].setFuel(temp.toInt());
+ t1 >> temp;
+ units[race].setETA(temp.toInt());
+ t1 >> temp;
+ units[race].setType((const char*) temp);
+ }
+ }
+ Fleet::setUnits(units);
+ }
+ return true;
+}
+
+/////////////////////////////////////////////////////////////////////
+//
+bool BSConf::saveStats()
+{
+ return true;