# HG changeset patch # User Wuzzy # Date 1557775910 -7200 # Node ID 6325384065737769331530cd7510253e74bea593 # Parent f112847eb93eebe37ce58806083b24c2d7c20bdf Rope Training: Re-display nade help text when trying to throw nade by hand diff -r f112847eb93e -r 632538406573 share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua --- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua Mon May 13 21:26:13 2019 +0200 +++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua Mon May 13 21:31:50 2019 +0200 @@ -283,6 +283,16 @@ end end +local function dropNadeText(time) + ShowMission(loc("Basic Rope Training"), loc("Rope Weapons"), + loc("Some weapons can be dropped from the rope.").."|".. + loc("Collect the weapon crate and drop|a grenade from rope to destroy the barrels.").."|".. + loc("Step 1: Start roping").."|".. + loc("Step 2: Select grenade").."|".. + loc("Step 3: Drop the grenade").."| |".. + loc("Drop weapon (while on rope): [Long Jump]"), 2, time) +end + function onGearDelete(gear) if GetGearType(gear) == gtTarget then -- Update checkpoint @@ -312,13 +322,7 @@ eraseGirder(8) eraseGirder(9) elseif currentTarget == 5 then - ShowMission(loc("Basic Rope Training"), loc("Rope Weapons"), - loc("Some weapons can be dropped from the rope.").."|".. - loc("Collect the weapon crate and drop|a grenade from rope to destroy the barrels.").."|".. - loc("Step 1: Start roping").."|".. - loc("Step 2: Select grenade").."|".. - loc("Step 3: Drop the grenade").."| |".. - loc("Drop weapon (while on rope): [Long Jump]"), 2, 20000) + dropNadeText(20000) AddAmmo(hog, amBaseballBat, 0) SpawnAmmoCrate(1849, 920, amGrenade, AMMO_INFINITE) elseif currentTarget == 6 then @@ -405,6 +409,7 @@ function onAttack() if GetCurAmmoType() == amGrenade and not ropeGear then AddCaption(loc("You have to drop the grenade from rope!"), 0xFF4000FF, capgrpMessage) + dropNadeText(5000) PlaySound(sndDenied) end end