Add empty weapons scheme (instead of default) when using “New” button
authorWuzzy <almikes@aol.com>
Wed, 13 Apr 2016 12:13:34 +0200
changeset 11768 59e979b1408f
parent 11651 42d7f5dbd8dc
child 11769 54a1ac4123cd
Add empty weapons scheme (instead of default) when using “New” button
QTfrontend/hwconsts.cpp.in
QTfrontend/hwconsts.h
QTfrontend/ui/widget/selectWeapon.cpp
QTfrontend/weapons.h
--- a/QTfrontend/hwconsts.cpp.in	Tue Apr 12 15:41:48 2016 -0400
+++ b/QTfrontend/hwconsts.cpp.in	Wed Apr 13 12:13:34 2016 +0200
@@ -41,6 +41,8 @@
 
 QString * cDefaultAmmoStore = new QString( AMMOLINE_DEFAULT_QT AMMOLINE_DEFAULT_PROB
                                            AMMOLINE_DEFAULT_DELAY AMMOLINE_DEFAULT_CRATE );
+QString * cEmptyAmmoStore =   new QString( AMMOLINE_EMPTY_QT AMMOLINE_EMPTY_PROB
+                                           AMMOLINE_EMPTY_DELAY AMMOLINE_EMPTY_CRATE );
 int cAmmoNumber = cDefaultAmmoStore->size() / 4;
 
 QList< QPair<QString, QString> > cDefaultAmmos =
--- a/QTfrontend/hwconsts.h	Tue Apr 12 15:41:48 2016 -0400
+++ b/QTfrontend/hwconsts.h	Wed Apr 13 12:13:34 2016 +0200
@@ -42,6 +42,7 @@
 class QStandardItemModel;
 
 extern QString * cDefaultAmmoStore;
+extern QString * cEmptyAmmoStore;
 extern int cAmmoNumber;
 extern QList< QPair<QString, QString> > cDefaultAmmos;
 
--- a/QTfrontend/ui/widget/selectWeapon.cpp	Tue Apr 12 15:41:48 2016 -0400
+++ b/QTfrontend/ui/widget/selectWeapon.cpp	Wed Apr 13 12:13:34 2016 +0200
@@ -308,7 +308,7 @@
     }
     else
     {
-        setWeapons(*cDefaultAmmoStore);
+        setWeapons(*cEmptyAmmoStore);
     }
 }
 
--- a/QTfrontend/weapons.h	Tue Apr 12 15:41:48 2016 -0400
+++ b/QTfrontend/weapons.h	Wed Apr 13 12:13:34 2016 +0200
@@ -16,6 +16,10 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#define AMMOLINE_EMPTY_QT       "000000900000000000000000000000000000000000000000000000000"
+#define AMMOLINE_EMPTY_PROB     "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_EMPTY_DELAY    "000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_EMPTY_CRATE    "131111031211111112311411111111111111121111111111111111111"
 
 /*
  AmmoType lookup table (use monospace font / cursor movements)