QTfrontend/gamecfgwidget.cpp
changeset 318 46a43b02bbb3
parent 312 c36d0b34ac3d
child 320 1ee7f087195a
--- a/QTfrontend/gamecfgwidget.cpp	Thu Jan 11 22:04:08 2007 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Thu Jan 11 23:19:18 2007 +0000
@@ -69,7 +69,7 @@
 	mainLayout.addWidget(new QWidget, 100);
 }
 
-quint32 GameCFGWidget::getGameFlags()
+quint32 GameCFGWidget::getGameFlags() const
 {
 	quint32 result = 0;
 	if (CB_mode_Forts->isChecked())
@@ -101,3 +101,20 @@
 {
 	return SB_TurnTime->value();
 }
+
+QStringList GameCFGWidget::getFullConfig() const
+{
+	QStringList sl;
+	sl.append("eseed " + getCurrentSeed());
+	sl.append(QString("e$gmflags %1").arg(getGameFlags()));
+	sl.append(QString("e$turntime %1").arg(getTurnTime() * 1000));
+	try {
+		QString currentMap = getCurrentMap();
+		sl.append("emap " + currentMap);
+		sl.append("etheme " + getCurrentTheme());
+	}
+	catch(const MapFileErrorException& e) {
+		sl.append(QString("etheme %1").arg("steel"));
+	}
+	return sl;
+}