QTfrontend/gamecfgwidget.cpp
changeset 3743 234ce4da76d4
parent 3697 d5b30d6373fc
child 3919 76d5b32758d9
equal deleted inserted replaced
3742:8461f0cef2e6 3743:234ce4da76d4
    51     connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
    51     connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
    52 
    52 
    53     GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
    53     GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
    54 
    54 
    55     QPixmap pmEdit(":/res/edit.png");
    55     QPixmap pmEdit(":/res/edit.png");
    56 
    56     
    57     QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
    57     QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
    58     goToSchemePage->setToolTip(tr("Edit schemes"));
    58     goToSchemePage->setToolTip(tr("Edit schemes"));
    59     goToSchemePage->setIconSize(pmEdit.size());
    59     goToSchemePage->setIconSize(pmEdit.size());
    60     goToSchemePage->setIcon(pmEdit);
    60     goToSchemePage->setIcon(pmEdit);
    61     goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
    61     goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
   132         result |= 0x10000;
   132         result |= 0x10000;
   133     if (schemeData(16).toBool())
   133     if (schemeData(16).toBool())
   134         result |= 0x20000;
   134         result |= 0x20000;
   135     if (schemeData(17).toBool())
   135     if (schemeData(17).toBool())
   136         result |= 0x80000;
   136         result |= 0x80000;
       
   137     if (schemeData(18).toBool())
       
   138         result |= 0x100000;
   137 
   139 
   138     return result;
   140     return result;
   139 }
   141 }
   140 
   142 
   141 quint32 GameCFGWidget::getInitHealth() const
   143 quint32 GameCFGWidget::getInitHealth() const
   142 {
   144 {
   143     return schemeData(20).toInt();
   145     return schemeData(21).toInt();
   144 }
   146 }
   145 
   147 
   146 QStringList GameCFGWidget::getFullConfig() const
   148 QStringList GameCFGWidget::getFullConfig() const
   147 {
   149 {
   148     QStringList sl;
   150     QStringList sl;
   149     sl.append("eseed " + pMapContainer->getCurrentSeed());
   151     sl.append("eseed " + pMapContainer->getCurrentSeed());
   150     sl.append(QString("e$gmflags %1").arg(getGameFlags()));
   152     sl.append(QString("e$gmflags %1").arg(getGameFlags()));
   151     sl.append(QString("e$damagepct %1").arg(schemeData(18).toInt()));
   153     sl.append(QString("e$damagepct %1").arg(schemeData(19).toInt()));
   152     sl.append(QString("e$turntime %1").arg(schemeData(19).toInt() * 1000));
   154     sl.append(QString("e$turntime %1").arg(schemeData(20).toInt() * 1000));
   153     sl.append(QString("e$minestime %1").arg(schemeData(23).toInt() * 1000));
   155     sl.append(QString("e$minestime %1").arg(schemeData(24).toInt() * 1000));
   154     sl.append(QString("e$landadds %1").arg(schemeData(24).toInt()));
   156     sl.append(QString("e$landadds %1").arg(schemeData(25).toInt()));
   155     sl.append(QString("e$sd_turns %1").arg(schemeData(21).toInt()));
   157     sl.append(QString("e$sd_turns %1").arg(schemeData(22).toInt()));
   156     sl.append(QString("e$casefreq %1").arg(schemeData(22).toInt()));
   158     sl.append(QString("e$casefreq %1").arg(schemeData(23).toInt()));
   157     sl.append(QString("e$minedudpct %1").arg(schemeData(25).toInt()));
   159     sl.append(QString("e$minedudpct %1").arg(schemeData(26).toInt()));
   158     sl.append(QString("e$explosives %1").arg(schemeData(26).toInt()));
   160     sl.append(QString("e$explosives %1").arg(schemeData(27).toInt()));
   159     sl.append(QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()));
   161     sl.append(QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()));
   160     sl.append(QString("e$mapgen %1").arg(pMapContainer->get_mapgen()));
   162     sl.append(QString("e$mapgen %1").arg(pMapContainer->get_mapgen()));
   161     sl.append(QString("e$maze_size %1").arg(pMapContainer->get_maze_size()));
   163     sl.append(QString("e$maze_size %1").arg(pMapContainer->get_maze_size()));
   162 
   164 
   163     QString currentMap = pMapContainer->getCurrentMap();
   165     QString currentMap = pMapContainer->getCurrentMap();