ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
authorWuzzy <almikes@aol.com>
Sun, 01 Oct 2017 00:46:58 +0200
changeset 12629 705dde538519
parent 12628 c8edce7e5f18
child 12630 52ed732cf494
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
share/hedgewars/Data/Scripts/Multiplayer/WxW.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Sat Sep 30 23:53:21 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Sun Oct 01 00:46:58 2017 +0200
@@ -587,7 +587,7 @@
     loc("Press [Left] and [Right] to change the difficulty.") .. "| |" ..
     dstr .. "| |" ..
     loc("Press [Attack] to begin."),
-    0, 300000)
+    0, 9999000)
 end
 
 function SetChoice()
@@ -689,6 +689,18 @@
   CheckEvents()
 end
 
+local choiceDialogTimer = 0
+function onGameTick20()
+  -- Make sure the choice dialog never disappears while it is active
+  if difficultyChoice then
+    choiceDialogTimer = choiceDialogTimer + 20
+    if choiceDialogTimer > 9990000 then
+      ChoiceDialog()
+      choiceDialogTimer = 0
+    end
+  end
+end
+
 function onGearDelete(gear)
   if gear == ropeCrate1 then
     rope1Taken = true
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Sat Sep 30 23:53:21 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Sun Oct 01 00:46:58 2017 +0200
@@ -232,6 +232,18 @@
 	CheckEvents()
 end
 
+local choiceDialogTimer = 0
+function onGameTick20()
+  -- Make sure the choice dialog never disappears while it is active
+  if awaitingInput then
+    choiceDialogTimer = choiceDialogTimer + 20
+    if choiceDialogTimer > 9990000 then
+      ShowMission(unpack(goals[dialog01]))
+      choiceDialogTimer = 0
+    end
+  end
+end
+
 function onGearDelete(gear)
 	if gear == hero.gear then
 		hero.dead = true
--- a/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Sat Sep 30 23:53:21 2017 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Sun Oct 01 00:46:58 2017 +0200
@@ -1550,7 +1550,7 @@
 				preMenuCfg..
 				missionComment ..
 				postMenuCfg ..
-				"", 2, 300000
+				"", 2, 9999000
 				)
 
 	menu[menuIndex].line = temp
@@ -1620,6 +1620,18 @@
 
 end
 
+local menuRepeatTimer = 0
+function onGameTick20()
+  -- Make sure the menu doesn't disappear while it is active
+  if roundN == 1 then
+    menuRepeatTimer = menuRepeatTimer + 20
+    if menuRepeatTimer > 9990000 then
+      HandleStartingStage()
+      menuRepeatTimer = 0
+    end
+  end
+end
+
 function onGearAdd(gear)
 
 	if GetGearType(gear) == gtRope then