# HG changeset patch # User Wuzzy # Date 1460993587 -7200 # Node ID be57b0e3e28996934691e153d450f686e277b8a2 # Parent 66ddc8c5ecd7c7363e3cf6061b52a4d6acc5e3d6 Portal mission: Fix speech bubbles appearing when crate got destroyed diff -r 66ddc8c5ecd7 -r be57b0e3e289 share/hedgewars/Data/Missions/Training/portal.lua --- a/share/hedgewars/Data/Missions/Training/portal.lua Mon Apr 18 17:26:32 2016 +0200 +++ b/share/hedgewars/Data/Missions/Training/portal.lua Mon Apr 18 17:33:07 2016 +0200 @@ -177,23 +177,25 @@ end function onGearDelete(gear) + -- Check gear collection + if CurrentHedgehog == player and (band(GetGearMessage(gear), gmDestroy) ~= 0) then + if gear == portalgun then + HogSay(player, loc("Great! Let’s kill all these enemies, using portals."), SAY_THINK) + end - if gear == portalgun then - HogSay(player, loc("Great! Let’s kill all these enemies, using portals."), SAY_THINK) + if gear == girder then + HogSay(player, loc("This will be useful when I need a new platform or if I want to rise."), SAY_THINK) + end + + if gear == parachute then + HogSay(player, loc("You can’t open a portal on the blue surface."), SAY_THINK) + end + + if gear == extratime then + HogSay(player, loc("What?! For all this struggle I just win some ... time? Oh dear!"), SAY_SHOUT) + end end - if gear == girder then - HogSay(player, loc("This will be useful when I need a new platform or if I want to rise."), SAY_THINK) - end - - if gear == parachute then - HogSay(player, loc("You can’t open a portal on the blue surface."), SAY_THINK) - end - - if gear == extratime then - HogSay(player, loc("What?! For all this struggle I just win some ... time? Oh dear!"), SAY_SHOUT) - end - if gear == player then player = nil end