Some minor convenience improvements in Basic Flying Saucer Training
authorWuzzy <Wuzzy2@mail.ru>
Mon, 26 Feb 2018 21:17:36 +0100
changeset 13071 bcb205281f38
parent 13070 53cbf7aea5f0
child 13072 1ff4671066d2
Some minor convenience improvements in Basic Flying Saucer Training
share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Mon Feb 26 21:09:35 2018 +0100
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Mon Feb 26 21:17:36 2018 +0100
@@ -430,6 +430,9 @@
 		if (TargetNumber == LaunchTarget or TargetNumber == UnderwaterAttackTarget) and BazookasLeft > 0 then
 			AddAmmo(Player, amBazooka, BazookasLeft)
 		end
+		-- If player starts using saucer, the player probably finished reading and the mission panel
+		-- would just get in the way. So we hide it!
+		HideMission()
 	end
 	if GetGearType(Gear) == gtGrenade then
 		GrenadeThrown = true
@@ -491,7 +494,9 @@
 
 
 function onNewTurn()
-	SetWeapon(amJetpack)
+	if GetAmmoCount(CurrentHedgehog, amJetpack) > 0 then
+		SetWeapon(amJetpack)
+	end
 end
 
 function onGameTick20()