When --watch flag is passed, reload all the code upon resume.

This allows you to reload without wiping all game state!

But maybe this should be a different flag?
This commit is contained in:
Phil Hagelberg 2019-05-13 18:09:41 -07:00
parent c2099ee1f7
commit d902d6ab74
1 changed files with 5 additions and 0 deletions

View File

@ -2156,6 +2156,11 @@ static void onConsoleResumeCommand(Console* console, const char* param)
{
commandDone(console);
const tic_script_config* script_config = console->tic->api.get_script_config(console->tic);
if (script_config->eval && console->codeLiveReload.active)
{
script_config->eval(console->tic, console->tic->cart.code.data);
}
console->tic->api.resume(console->tic);
resumeRunMode();