equal
deleted
inserted
replaced
67 GBoxOptionsLayout->addWidget(SB_InitHealth, 2, 1); |
67 GBoxOptionsLayout->addWidget(SB_InitHealth, 2, 1); |
68 |
68 |
69 mainLayout.addWidget(new QWidget, 100); |
69 mainLayout.addWidget(new QWidget, 100); |
70 } |
70 } |
71 |
71 |
72 quint32 GameCFGWidget::getGameFlags() |
72 quint32 GameCFGWidget::getGameFlags() const |
73 { |
73 { |
74 quint32 result = 0; |
74 quint32 result = 0; |
75 if (CB_mode_Forts->isChecked()) |
75 if (CB_mode_Forts->isChecked()) |
76 result |= 1; |
76 result |= 1; |
77 return result; |
77 return result; |
99 |
99 |
100 quint32 GameCFGWidget::getTurnTime() const |
100 quint32 GameCFGWidget::getTurnTime() const |
101 { |
101 { |
102 return SB_TurnTime->value(); |
102 return SB_TurnTime->value(); |
103 } |
103 } |
|
104 |
|
105 QStringList GameCFGWidget::getFullConfig() const |
|
106 { |
|
107 QStringList sl; |
|
108 sl.append("eseed " + getCurrentSeed()); |
|
109 sl.append(QString("e$gmflags %1").arg(getGameFlags())); |
|
110 sl.append(QString("e$turntime %1").arg(getTurnTime() * 1000)); |
|
111 try { |
|
112 QString currentMap = getCurrentMap(); |
|
113 sl.append("emap " + currentMap); |
|
114 sl.append("etheme " + getCurrentTheme()); |
|
115 } |
|
116 catch(const MapFileErrorException& e) { |
|
117 sl.append(QString("etheme %1").arg("steel")); |
|
118 } |
|
119 return sl; |
|
120 } |