feat: Add mcrfpy.step() and synchronous screenshot for headless mode (closes #153)

Implements Python-controlled simulation advancement for headless mode:

- Add mcrfpy.step(dt) to advance simulation by dt seconds
- step(None) advances to next scheduled event (timer/animation)
- Timers use simulation_time in headless mode for deterministic behavior
- automation.screenshot() now renders synchronously in headless mode
  (captures current state, not previous frame)

This enables LLM agent orchestration (#156) by allowing:
- Set perspective, take screenshot, query LLM - all synchronous
- Deterministic simulation control without frame timing issues
- Event-driven advancement with step(None)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
John McCardle 2025-12-01 21:56:47 -05:00
commit 60ffa68d04
7 changed files with 409 additions and 10 deletions

View file

@ -62,6 +62,9 @@ public:
static PyObject* _setTimer(PyObject*, PyObject*);
static PyObject* _delTimer(PyObject*, PyObject*);
// #153 - Headless simulation control
static PyObject* _step(PyObject*, PyObject*);
static PyObject* _exit(PyObject*, PyObject*);
static PyObject* _setScale(PyObject*, PyObject*);