Closed furudean closed 2 months ago
The way I implemented this ideology is by having an .rpe
file whose autorun.py
has:
import renpy
renpy.exports.set_autoreload(True)
This makes renpy start in autoreload mode.
Because rpe files are run before .rpy
files, it works without the need to raise an renpy.game.UtterRestartException
.
To note that the renpy.game.UtterRestartException
can only be raised at least, during config.display_start_callbacks
execution, otherwise Ren'Py crashes.
Check out #18, I implemented something similar. Though, with my own auto reload mechanism. Renpy's autoreload works poorly with what I was trying to build so it's a bit of a workaround. Still not sure how I feel about it yet
If own renpy's autoload doesn't work for what you are trying to do, then I think your code is fine. You also cleaned up a bit which is nice. In my case, I don't have issues with renpy's own autoreload. I haven't encountered times it didn't work.
I think your code is fine.
Send this signal via IPC. Gate behind an option.