exposing Henek's no wind flag
authorkoda
Fri, 12 Nov 2010 17:08:31 +0100
changeset 4250 d83b53997e0b
parent 4248 e127b3d26248
child 4252 13ec087713dd
exposing Henek's no wind flag
QTfrontend/ammoSchemeModel.cpp
QTfrontend/gamecfgwidget.cpp
QTfrontend/hedgewars.qrc
QTfrontend/pages.cpp
QTfrontend/pages.h
QTfrontend/res/btnNoWind.png
--- a/QTfrontend/ammoSchemeModel.cpp	Fri Nov 12 15:20:54 2010 +0100
+++ b/QTfrontend/ammoSchemeModel.cpp	Fri Nov 12 17:08:31 2010 +0100
@@ -45,19 +45,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(45)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(5)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(4)             // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(2)             // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(45)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(5)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(4)             // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(2)             // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
@@ -103,6 +104,7 @@
         << "infattack"        // 19
         << "resetweps"        // 20
         << "perhogammo"       // 21
+        << "disablewind"      // 22
         << "damagefactor"     // 22
         << "turntime"         // 23
         << "health"           // 24
@@ -142,19 +144,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(15)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(0)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(0)             // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(2)             // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(15)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(0)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(0)             // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(2)             // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> shoppa;
@@ -181,19 +184,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(30)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(50)            // sudden death   25
-        << QVariant(1)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(0)             // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(0)             // explosives     30
-        << QVariant(0)             // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(30)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(50)            // sudden death   26
+        << QVariant(1)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(0)             // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(0)             // explosives     31
+        << QVariant(0)             // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> cleanslate;
@@ -220,19 +224,20 @@
         << QVariant(true)          // inf. attack    19
         << QVariant(true)          // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(45)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(5)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(4)             // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(2)             // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(45)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(5)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(4)             // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(2)             // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> minefield;
@@ -259,19 +264,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(150)           // damage modfier 22
-        << QVariant(30)            // turn time      23
-        << QVariant(50)            // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(0)             // case prob      26
-        << QVariant(0)             // mines time     27
-        << QVariant(80)            // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(0)             // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(150)           // damage modfier 23
+        << QVariant(30)            // turn time      24
+        << QVariant(50)            // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(0)             // case prob      27
+        << QVariant(0)             // mines time     28
+        << QVariant(80)            // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(0)             // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> barrelmayhem;
@@ -298,19 +304,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(30)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(0)             // case prob      26
-        << QVariant(0)             // mines time     27
-        << QVariant(0)             // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(80)            // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(30)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(0)             // case prob      27
+        << QVariant(0)             // mines time     28
+        << QVariant(0)             // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(80)            // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> tunnelhogs;
@@ -337,19 +344,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(30)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(5)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(10)            // mines number   28
-        << QVariant(10)            // mine dud pct   29
-        << QVariant(10)            // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(30)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(5)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(10)            // mines number   29
+        << QVariant(10)            // mine dud pct   30
+        << QVariant(10)            // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> forts;
@@ -376,19 +384,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(45)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(5)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(0)             // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(0)             // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(45)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(5)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(0)             // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(0)             // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> timeless;
@@ -415,19 +424,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(true)          // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(9999)          // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(5)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(5)             // mines number   28
-        << QVariant(10)            // mine dud pct   29
-        << QVariant(2)             // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(30)            // health case amt 32
-        << QVariant(0)             // water rise amt 33
-        << QVariant(0)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(9999)          // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(5)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(5)             // mines number   29
+        << QVariant(10)            // mine dud pct   30
+        << QVariant(2)             // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(30)            // health case amt 33
+        << QVariant(0)             // water rise amt 34
+        << QVariant(0)             // health dec amt 35
         ;
 
     QList<QVariant> thinkingportals;
@@ -454,19 +464,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(45)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(2)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(5)             // mines number   28
-        << QVariant(0)             // mine dud pct   29
-        << QVariant(5)             // explosives     30
-        << QVariant(25)            // health case pct 31
-        << QVariant(25)            // health case amt 32
-        << QVariant(47)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(45)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(2)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(5)             // mines number   29
+        << QVariant(0)             // mine dud pct   30
+        << QVariant(5)             // explosives     31
+        << QVariant(25)            // health case pct 32
+        << QVariant(25)            // health case amt 33
+        << QVariant(47)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
     QList<QVariant> kingmode;
@@ -493,19 +504,20 @@
         << QVariant(false)         // inf. attack    19
         << QVariant(false)         // reset weps     20
         << QVariant(false)         // per hog ammo   21
-        << QVariant(100)           // damage modfier 22
-        << QVariant(45)            // turn time      23
-        << QVariant(100)           // init health    24
-        << QVariant(15)            // sudden death   25
-        << QVariant(5)             // case prob      26
-        << QVariant(3)             // mines time     27
-        << QVariant(3)             // mines number   28
-        << QVariant(20)            // mine dud pct   29
-        << QVariant(3)             // explosives     30
-        << QVariant(35)            // health case pct 31
-        << QVariant(30)            // health case amt 32
-        << QVariant(30)            // water rise amt 33
-        << QVariant(5)             // health dec amt 34
+        << QVariant(false)         // no wind        22
+        << QVariant(100)           // damage modfier 23
+        << QVariant(45)            // turn time      24
+        << QVariant(100)           // init health    25
+        << QVariant(15)            // sudden death   26
+        << QVariant(5)             // case prob      27
+        << QVariant(3)             // mines time     28
+        << QVariant(3)             // mines number   29
+        << QVariant(20)            // mine dud pct   30
+        << QVariant(3)             // explosives     31
+        << QVariant(35)            // health case pct 32
+        << QVariant(30)            // health case amt 33
+        << QVariant(30)            // water rise amt 34
+        << QVariant(5)             // health dec amt 35
         ;
 
 
--- a/QTfrontend/gamecfgwidget.cpp	Fri Nov 12 15:20:54 2010 +0100
+++ b/QTfrontend/gamecfgwidget.cpp	Fri Nov 12 17:08:31 2010 +0100
@@ -149,6 +149,8 @@
         result |= 0x00200000;       // reset weaps
     if (schemeData(21).toBool())
         result |= 0x00400000;       // per hog ammo
+    if (schemeData(22).toBool())
+        result |= 0x00800000;       // no wind
 
     return result;
 }
--- a/QTfrontend/hedgewars.qrc	Fri Nov 12 15:20:54 2010 +0100
+++ b/QTfrontend/hedgewars.qrc	Fri Nov 12 17:08:31 2010 +0100
@@ -71,6 +71,7 @@
     <file>res/btnInfAttack.png</file>
     <file>res/btnResetWeps.png</file>
     <file>res/btnPerHogAmmo.png</file>
+    <file>res/btnNoWind.png</file>
     <file>res/iconBox.png</file>
     <file>res/iconHealth.png</file>
     <file>res/iconSuddenDeath.png</file>
--- a/QTfrontend/pages.cpp	Fri Nov 12 15:20:54 2010 +0100
+++ b/QTfrontend/pages.cpp	Fri Nov 12 17:08:31 2010 +0100
@@ -1558,6 +1558,10 @@
     TBW_perhogammo->setToolTip("<b>" + ToggleButtonWidget::tr("Per Hedgehog Ammo") + "</b>:<br />" + tr("Each hedgehog has its own ammo. It does not share with the team."));
     glGMLayout->addWidget(TBW_perhogammo,4,0,1,1);
 
+    TBW_nowind = new ToggleButtonWidget(gbGameModes, ":/res/btnNoWind.png");
+    TBW_nowind->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Wind") + "</b>:<br />" + tr("Wind will not affect weapons."));
+    glGMLayout->addWidget(TBW_nowind,4,1,1,1);
+
     // Right
     QLabel * l;
 
--- a/QTfrontend/pages.h	Fri Nov 12 15:20:54 2010 +0100
+++ b/QTfrontend/pages.h	Fri Nov 12 17:08:31 2010 +0100
@@ -481,6 +481,7 @@
     ToggleButtonWidget * TBW_infattack;
     ToggleButtonWidget * TBW_resetweps;
     ToggleButtonWidget * TBW_perhogammo;
+    ToggleButtonWidget * TBW_nowind;
 
     QSpinBox * SB_DamageModifier;
     QSpinBox * SB_TurnTime;
Binary file QTfrontend/res/btnNoWind.png has changed