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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
This commit is contained in:
donnyandClaude Fable 5.1 committed 2026-10-14 22:45:36 -07:00
1 parent 923764242a
commit 662dc668ad
1 file changed
+3 -2
+3 -2
View File
@@ -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)")