Issue: Farmtronics MiniScript interpreter context is not correctly isolated to a single save
greysondn opened this issue · 0 comments
greysondn commented
Interpreter /usr
folder context corresponds to an in-game save folder. If you swap saves without exiting the game itself, the interpreter maintains its previous context - in essence, you end up with your /usr
set to the wrong saved game's folder.
This issue was uncovered in JoeStrout's MiniScript Discord server during testing of other things and can be seen in the logs starting here.
Detailed Description
The above covers most of it.
Expected Behavior
The interpreter's /usr
folder should always match the current save's folder.
Reproduction Steps
- Load a saved game for Stardew Valley with Farmtronics installed.
- (Maybe) start a machine or bot, just to be sure the interpreter has initialized.
- Use the in-game option to "Exit to Title"
- Load a different saved game.
- Examining the machine's
/usr
folder ingame will reveal you're in the saved game's folder from step 1.
Current Workaround
Completely exit Stardew Valley if you wish to swap saves. This means "Exit to Desktop", not "Exit to Title".
Fix Ideas
- Move the interpreter context initialization to world loading if at all possible
- Similarly, destroy interpreter context on world exit
Environment
- Version used:
- Farmtronics 1.1.0
- Host operating system:
- Windows 10 Home x64