fix: Resolve --exec double script execution bug
Scripts passed to --exec were executing twice because GameEngine constructor ran scripts, and main.cpp created two GameEngine instances. - Move exec_scripts from constructor to new executeStartupScripts() method - Call executeStartupScripts() once after final engine setup in main.cpp - Remove double-execution workarounds from tests - Delete duplicate test_viewport_visual.py (flaky due to race condition) - Fix test constructor syntax and callback signatures 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b173f59f22
commit
ce0be78b73
9 changed files with 118 additions and 451 deletions
|
|
@ -14,9 +14,6 @@ from mcrfpy import automation
|
|||
import sys
|
||||
import os
|
||||
|
||||
# Note: Engine runs --exec scripts twice - we use this to our advantage
|
||||
# First run sets up scenes, second run's timer fires after game loop starts
|
||||
|
||||
# Add parent to path for imports
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue