Use new script variable cMaxTurnTime in scripts for consistency
authorWuzzy <Wuzzy2@mail.ru>
Tue, 14 Aug 2018 14:19:03 +0200
changeset 13664 85506d95977d
parent 13663 91d48cbae927
child 13665 5664650befcd
Use new script variable cMaxTurnTime in scripts for consistency
share/hedgewars/Data/Maps/ClimbHome/map.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua
share/hedgewars/Data/Missions/Challenge/ClimbHome.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -86,7 +86,7 @@
 
 function onGameInit()
     -- Ensure people get same map for same theme
-    TurnTime = 999999999
+    TurnTime = cMaxTurnTime
     CaseFreq = 0
     Explosives = 0
     MineDudPercent = 0
@@ -351,7 +351,7 @@
 
     if CurrentHedgehog ~= nil and TurnTimeLeft > 0 and band(GetState(CurrentHedgehog),gstHHDriven) ~= 0 then
         if MaxHeight < delayHeight and
-           TurnTimeLeft<(999999999-delayTime) and 
+           TurnTimeLeft<(cMaxTurnTime-delayTime) and
             MaxHeight > 286 and WaterLine > 286 then
             if waterAccel ~= 0 then
                 SetWaterLine(WaterLine-(baseWaterSpeed+div(getActualHeight(MaxHeight)*100,waterAccel)))
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -61,7 +61,7 @@
 function onGameInit()
 	GameFlags = gfOneClanMode
 	Seed = 1
-	TurnTime = -1
+	TurnTime = cMaxTurnTime
 	Ready = 30000
 	CaseFreq = 0
 	MinesNum = 0
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -38,7 +38,7 @@
 function onGameInit()
 	GameFlags = gfDisableWind + gfOneClanMode
 	Seed = 1
-	TurnTime = -1
+	TurnTime = cMaxTurnTime
 	CaseFreq = 0
 	MinesNum = 0
 	MinesTime = 1
--- a/share/hedgewars/Data/Missions/Challenge/ClimbHome.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/ClimbHome.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -16,7 +16,7 @@
     -- Ensure people get same map for same theme
     Theme = themes[GetRandom(#themes)+1]
     Seed = ClimbHome
-    TurnTime = 999999999
+    TurnTime = cMaxTurnTime
     EnableGameFlags(gfOneClanMode)
     DisableGameFlags(gfBottomBorder+gfBorder)
     CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -21,7 +21,7 @@
 	GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode + gfSolidLand
 
 	-- Basically unlimited turn time
-	TurnTime = 100000000
+	TurnTime = cMaxTurnTime
 
 	Map = "Ropes"
 	Theme = "Eyes"
--- a/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -13,7 +13,7 @@
 function onGameInit()
 	Seed = 0
 	GameFlags = gfDisableWind
-	TurnTime = 600000000
+	TurnTime = cMaxTurnTime
 	CaseFreq = 0
 	MinesNum = 0
 	MinesTime = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -38,7 +38,7 @@
 	Seed = 0
 	Theme = "Nature"
 	MapGen = mgDrawn
-	TurnTime = 9999000
+	TurnTime = cMaxTurnTime
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -365,8 +365,8 @@
 function onGameInit()
 	Seed = 1
 	GameFlags = gfInfAttack + gfOneClanMode + gfSolidLand + gfDisableWind
-	TurnTime = 2000000 --[[ This rffectively hides the turn time; a turn time above 1000s is not displayed.
-				We will also ensure this timer always stays above 999s later ]]
+	TurnTime = cMaxTurnTime --[[ This effectively hides the turn time; a turn time above 1000s is not displayed.
+			   	     We will also ensure this timer always stays above 999s later ]]
 	CaseFreq = 0
 	MinesNum = 0
 	Explosives = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -30,7 +30,7 @@
 	Map = "Mushrooms"
 	Seed = 0
 	Theme = "Nature"
-	TurnTime = 9999000
+	TurnTime = cMaxTurnTime
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -102,7 +102,7 @@
 	Seed = 0
 	Theme = "Brick"
 	MapGen = mgDrawn
-	TurnTime = 9999000
+	TurnTime = cMaxTurnTime
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -110,7 +110,7 @@
 	MapFeatureSize = 12
 	TemplateFilter = 0
 	TemplateNumber = 0
-	TurnTime = 9999000
+	TurnTime = cMaxTurnTime
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Tue Aug 14 13:43:04 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Tue Aug 14 14:19:03 2018 +0200
@@ -3778,7 +3778,7 @@
 	-- regardless of our other ammo, give stuff that is useful for editing
 	SetEditingWeps(100)
 	if GetHogLevel(CurrentHedgehog) == 0 then
-		TurnTimeLeft = -1	-- is that turntime in your pocket? :D
+		TurnTimeLeft = cMaxTurnTime
 	else
 		SkipTurn() -- skip the computer's turn
 	end