make Random Weapons and No Jumping use the new custom goal function
authorHenek
Mon, 31 Jan 2011 21:59:59 +0100
changeset 4893 353781305c07
parent 4892 b0610081ee95
child 4894 efcea232bbf6
make Random Weapons and No Jumping use the new custom goal function
hedgewars/uScript.pas
share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua
share/hedgewars/Data/Scripts/Multiplayer/Random_Weapon.lua
--- a/hedgewars/uScript.pas	Mon Jan 31 08:45:05 2011 +0100
+++ b/hedgewars/uScript.pas	Mon Jan 31 21:59:59 2011 +0100
@@ -1350,7 +1350,6 @@
 ScriptSetInteger('HealthDecrease', cHealthDecrease);
 ScriptSetString('Map', '');
 ScriptSetString('Theme', '');
-
 ScriptSetString('Goals', '');
 
 ScriptCall('onGameInit');
--- a/share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua	Mon Jan 31 08:45:05 2011 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua	Mon Jan 31 21:59:59 2011 +0100
@@ -4,10 +4,14 @@
 
 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
 
-function onGameStart()
-	ShowMission(loc("NO JUMPING"), loc("- Jumping is disabled"), loc("Good luck out there!"), 0, 0)
+function onGameInit()
+    Goals = loc("Jumping is disabled")
 end
 
+--function onGameStart()
+--	ShowMission(loc("NO JUMPING"), loc("- Jumping is disabled"), loc("Good luck out there!"), 0, 0)
+--end
+
 function onNewTurn()
 	SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
 end
--- a/share/hedgewars/Data/Scripts/Multiplayer/Random_Weapon.lua	Mon Jan 31 08:45:05 2011 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Random_Weapon.lua	Mon Jan 31 21:59:59 2011 +0100
@@ -5,13 +5,14 @@
             amBaseballBat, amTeleport, amMortar, amCake, amSeduction,
             amWatermelon, amHellishBomb, amDrill, amBallgun, amRCPlane,
             amSniperRifle, amMolotov, amBirdy, amBlowTorch, amGasBomb,
-            amFlamethrower, amSMine, amHammer, amSnowball }
+            amFlamethrower, amSMine, amHammer, amSnowball, amTardis, amStructure }
 
 local airweapons = { amAirAttack, amMineStrike, amNapalm, amDrillStrike }
 
 
 function onGameInit()
     GameFlags = band(bor(GameFlags, gfResetWeps), bnot(gfInfAttack + gfPerHogAmmo))
+    Goals = loc("Each turn you get one random weapon")
 end
 
 function onGameStart()
@@ -20,8 +21,7 @@
             table.insert(weapons, w)
         end
     end
-
-    ShowMission(loc("Random Weapons"), loc("A game of luck"), loc("There has been a mix-up with your gear and now you|have to utilize whatever is coming your way!"), -amSkip, 0)
+    --ShowMission(loc("Random Weapons"), loc("A game of luck"), loc("There has been a mix-up with your gear and now you|have to utilize whatever is coming your way!"), -amSkip, 0)
 end
 
 function onAmmoStoreInit()