Hide creeper from frontend, prevent addition of creeper ammo via ammo scheme
authorWuzzy <Wuzzy2@mail.ru>
Fri, 05 Oct 2018 20:20:09 +0200
changeset 13875 ccfbc5f59c52
parent 13874 46e1c1069ac2
child 13876 d987e65761ac
Hide creeper from frontend, prevent addition of creeper ammo via ammo scheme This is a temporary measure because the creeper is still very unfinished. This can be reverted when the creeper is finished.
QTfrontend/ui/widget/selectWeapon.cpp
hedgewars/uAmmos.pas
--- a/QTfrontend/ui/widget/selectWeapon.cpp	Fri Oct 05 19:37:06 2018 +0200
+++ b/QTfrontend/ui/widget/selectWeapon.cpp	Fri Oct 05 20:20:09 2018 +0200
@@ -180,7 +180,9 @@
     int i = 0, k = 0;
     for(; i < m_numItems; ++i)
     {
-        if (i == 6) continue;
+        // Hide amSkip (6) and amCreeper (57)
+        // TODO: Unhide amCreeper when this weapon is done
+        if (i == 6 || i == 57) continue;
         if (k % 4 == 0) ++j;
         SelWeaponItem * swi = new SelWeaponItem(true, i, currentState[i].digitValue(), QImage(":/res/ammopic.png"), QImage(":/res/ammopicgrey.png"), this);
         weaponItems[i].append(swi);
--- a/hedgewars/uAmmos.pas	Fri Oct 05 19:37:06 2018 +0200
+++ b/hedgewars/uAmmos.pas	Fri Oct 05 20:20:09 2018 +0200
@@ -116,7 +116,10 @@
         or ((a = amInvulnerable) and ((GameFlags and gfInvulnerable) <> 0))
         or ((a = amLaserSight) and ((GameFlags and gfLaserSight) <> 0))
         or ((a = amVampiric) and ((GameFlags and gfVampiric) <> 0))
-        or ((a = amExtraTime) and (cHedgehogTurnTime >= 1000000)) then
+        or ((a = amExtraTime) and (cHedgehogTurnTime >= 1000000))
+        // Always remove creeper because it's unfinished.
+        // TODO: Re-enable creeper when creeper is done
+        or (a = amCreeper) then
             begin
             cnt:= 0;
             Ammoz[a].Probability:= 0