Auto-resume flight across chunk unload/reload
When the ship's chunk unloads the CC computer powers off and its redstone outputs reset to 0, so on return the ship dropped and the pilot had to re-ENGAGE every time. Flight state now survives the reboot: - engaged.txt flag written while flying, cleared on pilot STOP. - On boot, if engaged + profile present: drive the hover baseline immediately (closes the fall gap), then runStandby(true) re-enters the flight loop automatically with the persisted target -- no manual ENGAGE. - runFly drives hover before its first sleep so no entry path leaves a 0-output gap. - Cleanup no longer lifts a PARKED ship: Ctrl+T out of standby holds hover only when engaged, else valves off. - engaged.txt registered as per-ship state (gitignore, installer keep/reset, menu reset, build excludes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ local BASE = "https://gt.zyon.no/Stian/airship-autopilot/raw/branch/main"
|
||||
local ROLES = { "autopilot", "cockpit" }
|
||||
|
||||
-- per-skip tilstand: roeres aldri automatisk, men tilbys nullstilt ved install
|
||||
local STATE_FILES = { "sides.txt", "calib.txt", "target.txt", "settings.txt" }
|
||||
local STATE_FILES = { "sides.txt", "calib.txt", "target.txt", "settings.txt", "engaged.txt" }
|
||||
|
||||
-- kjente filer fra eldre versjoner som ikke lenger hoerer til rollen (engangs-rydding;
|
||||
-- videre oppdateringer ryddes automatisk via installasjons-loggen .installed_<role>)
|
||||
|
||||
Reference in New Issue
Block a user