--- a/QTfrontend/model/gameSchemeModel.cpp Sat Jun 27 23:38:45 2020 +0300
+++ b/QTfrontend/model/gameSchemeModel.cpp Sun Jun 28 00:47:43 2020 +0300
@@ -63,14 +63,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(2) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
GameSchemeModel::GameSchemeModel(QObject* parent, const QString & directory) :
@@ -134,14 +135,15 @@
<< "minedudpct" // 33
<< "explosives" // 34
<< "airmines" // 35
- << "healthprobability" // 36
- << "healthcaseamount" // 37
- << "waterrise" // 38
- << "healthdecrease" // 39
- << "ropepct" // 40
- << "getawaytime" // 41
- << "worldedge" // 42
- << "scriptparam" // scriptparam 43
+ << "sentries" // 36
+ << "healthprobability" // 37
+ << "healthcaseamount" // 38
+ << "waterrise" // 39
+ << "healthdecrease" // 40
+ << "ropepct" // 41
+ << "getawaytime" // 42
+ << "worldedge" // 43
+ << "scriptparam" // scriptparam 44
;
QList<QVariant> proMode;
@@ -182,14 +184,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(2) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> shoppa;
@@ -230,14 +233,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(0) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(0) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(0) // water rise amt 38
- << QVariant(0) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(0) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(0) // water rise amt 39
+ << QVariant(0) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> cleanslate;
@@ -278,14 +282,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(2) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> minefield;
@@ -326,14 +331,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(0) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> barrelmayhem;
@@ -374,14 +380,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(200) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> tunnelhogs;
@@ -422,14 +429,15 @@
<< QVariant(10) // mine dud pct 33
<< QVariant(10) // explosives 34
<< QVariant(4) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> timeless;
@@ -470,14 +478,15 @@
<< QVariant(10) // mine dud pct 33
<< QVariant(2) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(30) // health case amt 37
- << QVariant(0) // water rise amt 38
- << QVariant(0) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(30) // health case amt 38
+ << QVariant(0) // water rise amt 39
+ << QVariant(0) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> thinkingportals;
@@ -518,14 +527,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(5) // explosives 34
<< QVariant(4) // air mines 35
- << QVariant(25) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(25) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> kingmode;
@@ -566,14 +576,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(2) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> mutant;
@@ -614,14 +625,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(2) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(0) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(0) // water rise amt 38
- << QVariant(0) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(0) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(0) // water rise amt 39
+ << QVariant(0) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> construction;
@@ -662,15 +674,16 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(0) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
// NOTE: If you change this, also change the defaults in the Construction Mode script
- << QVariant("initialenergy=550, energyperround=50, maxenergy=1000, cratesperround=5") // scriptparam 43
+ << QVariant("initialenergy=550, energyperround=50, maxenergy=1000, cratesperround=5") // scriptparam 44
;
QList<QVariant> specialists;
@@ -711,15 +724,16 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(0) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(100) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(47) // water rise amt 38
- << QVariant(5) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
+ << QVariant(0) // sentries 36
+ << QVariant(100) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(47) // water rise amt 39
+ << QVariant(5) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
// NOTE: If you change this, also change the defaults in the The Specialists script
- << QVariant("t=SENDXHPL") // scriptparam 43
+ << QVariant("t=SENDXHPL") // scriptparam 44
;
QList<QVariant> spaceinvasion;
@@ -760,15 +774,16 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(0) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(0) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(0) // water rise amt 38
- << QVariant(0) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
+ << QVariant(0) // sentries 36
+ << QVariant(0) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(0) // water rise amt 39
+ << QVariant(0) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
// NOTE: If you change this, also change the defaults in the Space Invasion script
- << QVariant("rounds=3, shield=30, barrels=5, pings=2, barrelbonus=3, shieldbonus=30, timebonus=4") // scriptparam 43
+ << QVariant("rounds=3, shield=30, barrels=5, pings=2, barrelbonus=3, shieldbonus=30, timebonus=4") // scriptparam 44
;
QList<QVariant> hedgeeditor;
@@ -809,14 +824,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(0) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(35) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(0) // water rise amt 38
- << QVariant(0) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(35) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(0) // water rise amt 39
+ << QVariant(0) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
QList<QVariant> racer;
@@ -857,14 +873,15 @@
<< QVariant(0) // mine dud pct 33
<< QVariant(0) // explosives 34
<< QVariant(0) // air mines 35
- << QVariant(0) // health case pct 36
- << QVariant(25) // health case amt 37
- << QVariant(0) // water rise amt 38
- << QVariant(0) // health dec amt 39
- << QVariant(100) // rope modfier 40
- << QVariant(100) // get away time 41
- << QVariant(0) // world edge 42
- << QVariant() // scriptparam 43
+ << QVariant(0) // sentries 36
+ << QVariant(0) // health case pct 37
+ << QVariant(25) // health case amt 38
+ << QVariant(0) // water rise amt 39
+ << QVariant(0) // health dec amt 40
+ << QVariant(100) // rope modfier 41
+ << QVariant(100) // get away time 42
+ << QVariant(0) // world edge 43
+ << QVariant() // scriptparam 44
;
--- a/QTfrontend/ui/page/pagescheme.cpp Sat Jun 27 23:38:45 2020 +0300
+++ b/QTfrontend/ui/page/pagescheme.cpp Sun Jun 28 00:47:43 2020 +0300
@@ -191,6 +191,7 @@
QString wtMineDuds = tr("Likelihood of a mine being a dud. Does not affect mines placed by hedgehogs.");
QString wtExplosives = tr("Average number of barrels to be placed a medium-sized island map. This number will be scaled for other maps.");
QString wtAirMines = tr("Average number of air mines to be placed a medium-sized island map. This number will be scaled for other maps.");
+ QString wtSentries = tr("Average number of sentry bots to be placed on a medium-sized island map. This number will be scaled for other maps.");
QString wtWorldEdge = tr("Affects the left and right boundaries of the map");
QString wtGetAwayTime = tr("Time you get after an attack");
QString wtScriptParam = tr("Additional parameter to configure game styles. The meaning depends on the used style, refer to the documentation. When in doubt, leave it empty.");
@@ -462,33 +463,50 @@
glBSLayout->addWidget(SB_AirMines,14,2,1,1);
l = new QLabel(gbBasicSettings);
+ l->setText(QLabel::tr("Sentry Bots"));
+ l->setWhatsThis(wtSentries);
+ l->setWordWrap(true);
+ glBSLayout->addWidget(l,15,0,1,1);
+ l = new QLabel(gbBasicSettings);
+ l->setWhatsThis(wtSentries);
+ l->setFixedSize(32,32);
+ l->setPixmap(QPixmap(":/res/iconAirMine.png"));
+ glBSLayout->addWidget(l,15,1,1,1);
+ SB_Sentries = new QSpinBox(gbBasicSettings);
+ SB_Sentries->setWhatsThis(wtSentries);
+ SB_Sentries->setRange(0, 200);
+ SB_Sentries->setValue(0);
+ SB_Sentries->setSingleStep(5);
+ glBSLayout->addWidget(SB_Sentries,15,2,1,1);
+
+ l = new QLabel(gbBasicSettings);
//: Label of game scheme setting for the time you get after an attack
l->setText(QLabel::tr("% Retreat Time"));
l->setWhatsThis(wtGetAwayTime);
l->setWordWrap(true);
- glBSLayout->addWidget(l,15,0,1,1);
+ glBSLayout->addWidget(l,16,0,1,1);
l = new QLabel(gbBasicSettings);
l->setWhatsThis(wtGetAwayTime);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconTime.png"));
- glBSLayout->addWidget(l,15,1,1,1);
+ glBSLayout->addWidget(l,16,1,1,1);
SB_GetAwayTime = new QSpinBox(gbBasicSettings);
SB_GetAwayTime->setWhatsThis(wtGetAwayTime);
SB_GetAwayTime->setRange(0, 999);
SB_GetAwayTime->setValue(100);
SB_GetAwayTime->setSingleStep(25);
- glBSLayout->addWidget(SB_GetAwayTime,15,2,1,1);
+ glBSLayout->addWidget(SB_GetAwayTime,16,2,1,1);
l = new QLabel(gbBasicSettings);
l->setText(QLabel::tr("World Edge"));
l->setWhatsThis(wtWorldEdge);
l->setWordWrap(true);
- glBSLayout->addWidget(l,16,0,1,1);
+ glBSLayout->addWidget(l,17,0,1,1);
l = new QLabel(gbBasicSettings);
l->setWhatsThis(wtWorldEdge);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconEarth.png"));
- glBSLayout->addWidget(l,16,1,1,1);
+ glBSLayout->addWidget(l,17,1,1,1);
CB_WorldEdge = new QComboBox(gbBasicSettings);
CB_WorldEdge->setWhatsThis(wtWorldEdge);
@@ -497,24 +515,24 @@
CB_WorldEdge->insertItem(2, tr("Bounce (Edges reflect)"));
CB_WorldEdge->insertItem(3, tr("Sea (Edges connect to sea)"));
/* CB_WorldEdge->insertItem(4, tr("Skybox")); */
- glBSLayout->addWidget(CB_WorldEdge,16,2,1,1);
+ glBSLayout->addWidget(CB_WorldEdge,17,2,1,1);
l = new QLabel(gbBasicSettings);
l->setText(QLabel::tr("Script parameter"));
l->setWhatsThis(wtScriptParam);
l->setWordWrap(true);
- glBSLayout->addWidget(l,17,0,1,1);
+ glBSLayout->addWidget(l,18,0,1,1);
l = new QLabel(gbBasicSettings);
l->setWhatsThis(wtScriptParam);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconScript.png"));
- glBSLayout->addWidget(l,17,1,1,1);
+ glBSLayout->addWidget(l,18,1,1,1);
LE_ScriptParam = new QLineEdit(gbBasicSettings);
LE_ScriptParam->setWhatsThis(wtScriptParam);
LE_ScriptParam->setMaxLength(240);
- glBSLayout->addWidget(LE_ScriptParam,17,2,1,1);
+ glBSLayout->addWidget(LE_ScriptParam,18,2,1,1);
L_name = new QLabel(gbBasicSettings);
L_name->setText(QLabel::tr("Scheme Name:"));
@@ -610,14 +628,15 @@
mapper->addMapping(SB_MineDuds, 33);
mapper->addMapping(SB_Explosives, 34);
mapper->addMapping(SB_AirMines, 35);
- mapper->addMapping(SB_HealthCrates, 36);
- mapper->addMapping(SB_CrateHealth, 37);
- mapper->addMapping(SB_WaterRise, 38);
- mapper->addMapping(SB_HealthDecrease, 39);
- mapper->addMapping(SB_RopeModifier, 40);
- mapper->addMapping(SB_GetAwayTime, 41);
- mapper->addMapping(CB_WorldEdge, 42, "currentIndex");
- mapper->addMapping(LE_ScriptParam, 43);
+ mapper->addMapping(SB_Sentries, 36);
+ mapper->addMapping(SB_HealthCrates, 37);
+ mapper->addMapping(SB_CrateHealth, 38);
+ mapper->addMapping(SB_WaterRise, 39);
+ mapper->addMapping(SB_HealthDecrease, 40);
+ mapper->addMapping(SB_RopeModifier, 41);
+ mapper->addMapping(SB_GetAwayTime, 42);
+ mapper->addMapping(CB_WorldEdge, 43, "currentIndex");
+ mapper->addMapping(LE_ScriptParam, 44);
mapper->toFirst();