From 4a7206d7e80d7a03d4157f43aa04c883778bf83b Mon Sep 17 00:00:00 2001 From: Mahtra <93822896+MahtraDR@users.noreply.github.com> Date: Thu, 7 May 2026 11:22:46 +1200 Subject: [PATCH] fix(autostart.lic): use Script.run so dependency finishes before DR scripts start start_scripts_if_available only waits 0.25s for a script to complete. dependency.lic takes longer, so parse_args() is still undefined when autostart scripts begin. Script.run blocks until the script exits the @@running list, guaranteeing the bridge is available. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/autostart.lic | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/autostart.lic b/scripts/autostart.lic index 791809309..838da910c 100644 --- a/scripts/autostart.lic +++ b/scripts/autostart.lic @@ -9,10 +9,12 @@ contributors: Athias game: any tags: core - version: 0.69 + version: 0.70 required: Lich >= 4.6.58 changelog: + 0.70 (2026-05-07): + fix: use Script.run to block until dependency finishes before starting DR scripts 0.69 (2026-05-06): fix: start dependency before autostart scripts so parse_args() bridge is available 0.68 (2026-05-05): @@ -142,7 +144,7 @@ if script.vars.empty? # dependency.lic defines the parse_args() bridge that DR scripts need. if XMLData.game =~ /^DR/ if respond_to?(:start_scripts_if_available, true) - start_scripts_if_available('dependency') if Script.exists?('dependency') + Script.run('dependency') if Script.exists?('dependency') && !Script.running?('dependency') did_something = true else # Legacy path: dependency.lic handles everything (script sync, autostarts, map edits)