From 07c9a24529f7c429821cb992c41ef096a7b3ec1b Mon Sep 17 00:00:00 2001 From: Zach Dziura Date: Thu, 3 Mar 2016 00:43:34 -0500 Subject: [PATCH] v2.0.1 Fixed a pretty awful bug in the autopilot fallback routines where they weren't actually firing (and even worse, they were causing us to blow up!). Also fixed an existing bug where the autopilot subsystem wouldn't update its position once a karibidean flew out! --- Dreadnought.xml | 367 ++++++++++++++++++++++++++---------------------- 1 file changed, 201 insertions(+), 166 deletions(-) diff --git a/Dreadnought.xml b/Dreadnought.xml index ac3bcff..a30b165 100644 --- a/Dreadnought.xml +++ b/Dreadnought.xml @@ -113,7 +113,7 @@ if matches[2] == "chair" then disableTrigger("Pilot") disableTrigger("Autopilot") - local returned = dreadnought.pilot.reset() + local returned = dreadnought.reset.pilot() dreadnought.aetherbeastsTotal = returned.aetherbeastsTotal dreadnought.pilot = returned.pilot @@ -121,7 +121,7 @@ elseif matches[2] == "grid" then disableAlias("Empath") disableTrigger("Empath") - local returned = dreadnought.empath.reset() + local returned = dreadnought.reset.pilot() dreadnought.aetherbeastsTotal = returned.aetherbeastsTotal dreadnought.empath = returned.empath @@ -304,8 +304,13 @@ dreadnought.pilot.siphonCalloutCount = 0 send("shipt Target " .. matches[2]) -local newPosition = dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, - dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) +local newPosition = dreadnought.autopilot( + dreadnought.balance, + dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, + dreadnought.pilot.currentPosition, + dreadnought.pilot.flags +) if newPosition ~= 0 then dreadnought.pilot.currentPosition = newPosition @@ -344,8 +349,17 @@ send("shipt Target karibidean") flowerbox("red", "KARIBIDEAN!!!") dmsg("Switching to manual override!") -dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, - dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) +local newPosition = dreadnought.autopilot( + dreadnought.balance, + dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, + dreadnought.pilot.currentPosition, + dreadnought.pilot.flags +) + +if newPosition ~= 0 then + dreadnought.pilot.currentPosition = newPosition +end disableTrigger("Siphon Callout") @@ -370,13 +384,17 @@ disableTrigger("Siphon Callout") Aetherbeast Enters +end 0 0 0 @@ -422,13 +440,17 @@ end Freed From Shockwave +end 0 0 0 @@ -456,14 +478,19 @@ end if dreadnought.aetherbeastsTotal > 0 then dreadnought.aetherbeastsTotal = dreadnought.aetherbeastsTotal - 1 + + if dreadnought.aetherbeastsTotal == 0 then + dreadnought.pilot.flags.siphonCallout = true + end end -if dreadnought.aetherbeastsTotal == 0 then - dreadnought.pilot.flags.siphonCallout = true -end - -local newPosition = dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, - dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) +local newPosition = dreadnought.autopilot( + dreadnought.balance, + dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, + dreadnought.pilot.currentPosition, + dreadnought.pilot.flags +) if newPosition ~= 0 then dreadnought.pilot.currentPosition = newPosition @@ -492,8 +519,13 @@ end Pilot Balance 0 0 @@ -537,12 +573,10 @@ end) #000000 #000000 - ^You steer(?:\s\w+(?:\'\w+)?)+ to the \w+\.$ - ^With a ripple,(?:\s\w+(?:\'\w+)?)+ frees itself from its shockwave\.$ - The command chair whirrs quietly, ready to be used once again. + ^(?:\w+\s){3}suddenly explodes\!$ + A six-headed scyllus suddenly explodes! - 1 1 3 @@ -1722,7 +1756,7 @@ dreadnought.fireTurret(dreadnought.combateer.targets, dreadnought.combateer.flag - + Collector 0 @@ -2563,7 +2597,7 @@ end - + Collector @@ -2698,10 +2732,10 @@ disableAlias("Pilot") disableTrigger("Empath") disableAlias("Empath") -disableTrigger("Gunner") +disableTrigger("Combateer") disableTrigger("Targetting - Auto") disableTrigger("Targetting - Callout") -disableAlias("Gunner") +disableAlias("Combateer") disableTrigger("Collector") disableTrigger("Siphoning - Auto") @@ -2717,142 +2751,11 @@ dmsg("All Dreadnought reflexes have been disabled.") - - Data Structures - - - - - - - - - - Dreadnought @@ -3195,6 +3099,137 @@ if string.find(line, "%d-hull, .*") then deleteLine() end ]]) +end + + + + + Data Structures + + + + + + +