Construction Mode: Now amSwitch amount can be changed in weapon scheme
authorWuzzy <Wuzzy2@mail.ru>
Sat, 10 Feb 2018 12:01:00 +0100
changeset 12960 4fbe2d18df9c
parent 12959 50dd4f88daf4
child 12961 89930daecaab
Construction Mode: Now amSwitch amount can be changed in weapon scheme
ChangeLog.txt
QTfrontend/weapons.h
share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua
--- a/ChangeLog.txt	Sat Feb 10 11:46:57 2018 +0100
+++ b/ChangeLog.txt	Sat Feb 10 12:01:00 2018 +0100
@@ -21,6 +21,7 @@
  + Construction Mode: Remember all selections
  + Construction Mode: Add subtle glow to healing station
  + Construction Mode: Change message colors
+ + Construction Mode: Allow to change "Switch Hedgehog" in weapon scheme
  * Construction Mode: Remove mine strike if added by weapon scheme (it's broken)
 
 A Space Adventure:
--- a/QTfrontend/weapons.h	Sat Feb 10 11:46:57 2018 +0100
+++ b/QTfrontend/weapons.h	Sat Feb 10 12:01:00 2018 +0100
@@ -127,9 +127,9 @@
 #define AMMOLINE_HIGHLANDER_QT    "11111191111111111111019111111111100101111101111001001011111"
 #define AMMOLINE_HIGHLANDER_PROB  "00000000000000000000000000000000000000000000000000000000000"
 #define AMMOLINE_HIGHLANDER_DELAY "00000000000000000000000000000000000000000000000000000000000"
-#define AMMOLINE_HIGHLANDER_CRATE "00000000000000000000000000000000000000000000000000000000000"
+#define AMMOLINE_HIGHLANDER_CRATE "00000000000000000090000000000000000000000000000000000000000"
 
-#define AMMOLINE_CONSTRUCTION_QT    "11000190000000100100000000000000000000000000000000000000000"
+#define AMMOLINE_CONSTRUCTION_QT    "11000190000000100100900000000000000000000000000000000000000"
 #define AMMOLINE_CONSTRUCTION_PROB  "11111101111111111111111111111111111111111111111111111111111"
 #define AMMOLINE_CONSTRUCTION_DELAY "00000000000000000000000000000000000000000000000000000000000"
 #define AMMOLINE_CONSTRUCTION_CRATE "11111101111111111111111111111111111111111111111111111111111"
--- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Sat Feb 10 11:46:57 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Sat Feb 10 12:01:00 2018 +0100
@@ -155,7 +155,7 @@
 -- Weapons which shouldn't be aded:
 -- Air attack, napalm, drillstrike: Overwritten weapons for the Construction Mode tools
 -- Mine strike: Is currently broken
--- Piano strike: Hog is resurrected by respawner
+-- Piano strike: Hog is resurrected by respawner. Not strictly prohibited, however.
 local atkArray = {
 	{amBazooka,	 2*costFactor},
 	--{amBee,	 4*costFactor},
@@ -207,7 +207,7 @@
 
 -- Utilities which shouldn't be added:
 -- * Teleport: We have teleportation node
--- * Switch: Always infinite
+-- * Switch: Infinite in default Construction Mode weapons scheme
 -- * Girder, rubber: Requires construction station
 -- * Resurrector: We have the resurrector structure for this
 
@@ -712,7 +712,6 @@
 					end
 
 					AddAmmo(gear, amCMStructurePlacer, 100)
-					AddAmmo(gear, amSwitch, 100)
 					AddAmmo(gear, amSkip, 100)
 
 				end
@@ -1489,18 +1488,24 @@
 		FindPlace(gear, false, clanBoundsSX[GetHogClan(gear)], clanBoundsEX[GetHogClan(gear)],true)
 	end
 
-
 	-- Add core ammo
 	AddAmmo(gear, amCMStructurePlacer, 100)
-	AddAmmo(gear, amSwitch, 100)
 	AddAmmo(gear, amSkip, 100)
 
-	-- Remove the other special Construction Mode tools
+	-- Remove special Construction Mode stuff.
+	-- This stuff is added and removed dynamically based on
+	-- proximity to structures.
 	AddAmmo(gear, amCMObjectPlacer, 0)
 	AddAmmo(gear, amCMCratePlacer, 0)
+	AddAmmo(gear, amGirder, 0)
+	AddAmmo(gear, amRubber, 0)
+	AddAmmo(gear, amTeleport, 0)
 
-	-- Mine strike is broken
+	-- Mine strike is broken, so we force-remove it
 	AddAmmo(gear, amMineStrike, 0)
+
+	-- Everything else is set by the weapon scheme.
+	-- Infinite switch is recommended.
 end
 
 function onGameStart()