# HG changeset patch # User Wuzzy # Date 1506484160 -7200 # Node ID 0fa07df29499b2d43ab0d5e41524c7e92aeb8c3f # Parent d8af6f9b51c6bb87e319c8da6d3ed785d9eab858 ACF2: Remove restart option when cooperating with cyborg diff -r d8af6f9b51c6 -r 0fa07df29499 ChangeLog.txt --- a/ChangeLog.txt Wed Sep 27 04:28:34 2017 +0200 +++ b/ChangeLog.txt Wed Sep 27 05:49:20 2017 +0200 @@ -182,6 +182,7 @@ * Mission 1: Leaf of faith: Hog was able to walk to the right and get stuck * Mission 1: Leap of faith: Teleport player back to mole when failing * Mission 2: Fix crash when trying to open ammo menu in opening sequence + * Mission 2: Remove restart option when cooperating with cyborg; it messed things up too much * Mission 3: Fix various Lua errors when playing with 2 hogs and one of them dies * Mission 3: Fix broken end sequence after killing cyborg or princess * Mission 3: Fix broken sequence of princess being caged diff -r d8af6f9b51c6 -r 0fa07df29499 share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua Wed Sep 27 04:28:34 2017 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua Wed Sep 27 05:49:20 2017 +0200 @@ -65,7 +65,6 @@ leaksHidden = false denseHidden = false cyborgAttacked = false -retryReturn = false shotgunTaken = false grenadeTaken = false spikyDead = false @@ -200,28 +199,14 @@ SetInputMask(0xFFFFFFFF) end -function RestartReturnAccepted() - retryReturn = false - AnimSetGearPosition(dense, 1350, 1310) - AddAmmo(dense, amGirder, 2) - AddAmmo(dense, amParachute, 2) - ShowMission(loc("The Shadow Falls"), loc("The walk of Fame"), loc("Return to Leaks A Lot! If you get stuck, press [Precise] to try again!"), 1, 6000) - RemoveEventFunc(CheckNeedGirder) - RemoveEventFunc(CheckNeedWeapons) - AddEvent(CheckNeedGirder, {}, DoNeedGirder, {}, 0) - AddEvent(CheckNeedWeapons, {}, DoNeedWeapons, {}, 0) -end - - function AfterAcceptedAnim() stage = acceptedReturnStage SpawnUtilityCrate(1370, 810, amGirder) SpawnUtilityCrate(1300, 810, amParachute) - ShowMission(loc("The Shadow Falls"), loc("The walk of Fame"), loc("Return to Leaks A Lot! If you get stuck, press [Precise] to try again!"), 1, 6000) + ShowMission(loc("The Shadow Falls"), loc("The walk of Fame"), loc("Return to Leaks A Lot!"), 1, 6000) AddEvent(CheckTookWeapons, {}, DoTookWeapons, {}, 0) AddEvent(CheckNeedGirder, {}, DoNeedGirder, {}, 0) AddEvent(CheckNeedWeapons, {}, DoNeedWeapons, {}, 0) - AddEvent(CheckRestartReturnAccepted, {}, RestartReturnAccepted, {}, 1) RemoveEventFunc(CheckDenseDead) SwitchHog(dense) AnimWait(dense, 1) @@ -707,7 +692,7 @@ end function DoNeedGirder() - ShowMission(loc("The Shadow Falls"), loc("Under Construction"), loc("To place a girder, select it, use [Left] and [Right] to select angle and length, place with [Left Click]"), 1, 6000) + ShowMission(loc("The Shadow Falls"), loc("Under Construction"), loc("Return to Leaks A Lot!") .. "|" .. loc("To place a girder, select it, use [Left] and [Right] to select angle and length, place with [Left Click]"), 1, 6000) end function CheckNeedWeapons() @@ -733,7 +718,6 @@ stage = duoStage RemoveEventFunc(CheckNeedGirder) RemoveEventFunc(CheckNeedWeapons) - RemoveEventFunc(CheckRestartReturnAccepted) AddEvent(CheckStronglingsDead, {}, DoStronglingsDead, {}, 0) AddAmmo(cannibals[6], amGrenade, 2) AddAmmo(cannibals[6], amShotgun, 2) @@ -830,10 +814,6 @@ return denseDead and choice ~= choiceAttack end -function CheckRestartReturnAccepted() - return retryReturn -end - -----------------------------Main Functions---------------------------- function onGameInit() @@ -961,12 +941,5 @@ SetAnimSkip(true) return end - if stage == acceptedReturnStage then - retryReturn = true --- else --- for i = 1, 9 do --- DeleteGear(cannibals[i]) --- end - end end