Bazooka/Grende training: Hide mission panel on pressing attack key
authorWuzzy <Wuzzy2@mail.ru>
Tue, 17 Jul 2018 22:00:15 +0200
changeset 13503 c5d7376fa58a
parent 13502 99a99dbfbf6d
child 13504 f747c385b5ba
Bazooka/Grende training: Hide mission panel on pressing attack key
share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Tue Jul 17 21:31:41 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Tue Jul 17 22:00:15 2018 +0200
@@ -221,6 +221,12 @@
 	end
 end
 
+function onAttack()
+	if GetCurAmmoType() == amBazooka then
+		HideMission()
+	end
+end
+
 function onGearAdd(gear)
 	if GetGearType(gear) == gtTarget then
 		targetsLeft = targetsLeft + 1
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Tue Jul 17 21:31:41 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Tue Jul 17 22:00:15 2018 +0200
@@ -192,6 +192,12 @@
 	end
 end
 
+function onAttack()
+	if GetCurAmmoType() == amGrenade then
+		HideMission()
+	end
+end
+
 function onGearAdd(gear)
 	if GetGearType(gear) == gtTarget then
 		targetsLeft = targetsLeft + 1