equal
deleted
inserted
replaced
340 local g2 = (not goal.xMax) or gX <= goal.xMax |
340 local g2 = (not goal.xMax) or gX <= goal.xMax |
341 local g3 = (not goal.yMin) or gY >= goal.yMin |
341 local g3 = (not goal.yMin) or gY >= goal.yMin |
342 local g4 = (not goal.yMax) or gY <= goal.yMax |
342 local g4 = (not goal.yMax) or gY <= goal.yMax |
343 return g1 and g2 and g3 and g4 |
343 return g1 and g2 and g3 and g4 |
344 elseif goal.type == "distGearPos" or goal.type == "distGearGear" then |
344 elseif goal.type == "distGearPos" or goal.type == "distGearGear" then |
345 local gX, tY, tX, tY |
345 local gX, gY, tX, tY |
346 if goal.type == "distGearPos" then |
346 if goal.type == "distGearPos" then |
347 if getGearValue(_G.sm.goalGears[goal.id], "sm_destroyed") then |
347 if getGearValue(_G.sm.goalGears[goal.id], "sm_destroyed") then |
348 -- Fail if gear was destroyed |
348 -- Fail if gear was destroyed |
349 return "fail", criticalGearFailText(goal.id) |
349 return "fail", criticalGearFailText(goal.id) |
350 end |
350 end |
561 EndGame() |
561 EndGame() |
562 end |
562 end |
563 end |
563 end |
564 |
564 |
565 _G.onSuddenDeath = function() |
565 _G.onSuddenDeath = function() |
566 sm.isInSuddenDeath = true |
566 _G.sm.isInSuddenDeath = true |
567 end |
567 end |
568 |
568 |
569 _G.onGearWaterSkip = function(gear) |
569 _G.onGearWaterSkip = function(gear) |
570 increaseGearValue(gear, "sm_waterSkips") |
570 increaseGearValue(gear, "sm_waterSkips") |
571 end |
571 end |