From 662dc668ad2ab11ed460a85bef11faa5e60f4fd1 Mon Sep 17 00:00:00 2001 From: donnyjang Date: Wed, 14 Oct 2026 22:45:36 -0700 Subject: [PATCH] contract: the probe reads Data/script.zip from the cwd, not from its own path The Unity copy found the repo three folders up from its own file (Tools/YGOLegacy/); from contract/ that resolved to C:\Data\script.zip and the 0009 room setup crashed. Every other path in the probe already uses the cwd, and every --dll run must be from the Unity repo root anyway, so the one line now uses the cwd too. The only change from the Unity copy. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR --- contract/probe-feature-messages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contract/probe-feature-messages.py b/contract/probe-feature-messages.py index 43d1d13..95f85fd 100644 --- a/contract/probe-feature-messages.py +++ b/contract/probe-feature-messages.py @@ -478,8 +478,9 @@ def make_workspace(): root = tempfile.mkdtemp(prefix="ygol-probe-0009-") os.makedirs(os.path.join(root, "script")) os.makedirs(os.path.join(root, "Data")) - # without utility.lua the engine fail-fasts (0xC0000409) at the duel start - repo = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + # without utility.lua the engine fail-fasts (0xC0000409) at the duel start; the cwd is the Unity + # repo root (every --dll run requires that already), so Data/script.zip is read from there + repo = os.getcwd() shutil.copy(os.path.join(repo, "Data", "script.zip"), os.path.join(root, "Data", "script.zip")) db = sqlite3.connect(os.path.join(root, "cards.cdb")) db.execute("CREATE TABLE datas(id integer primary key, ot integer, alias integer, setcode integer, type integer, atk integer, def integer, level integer, race integer, attribute integer, category integer)")