Lua: nhcore script with function callbacks
Adds possible callbacks for "start_new_game", "restore_old_game", "moveloop_turn", and "game_exit" which when defined, will be called from core code at the appropriate time. Adds lua hooks for dump_fmtstr (only if DUMPLOG), dnum_name, u.moves, u.uhave_amulet, and u.depth.
This commit is contained in:
@@ -1753,6 +1753,8 @@ void
|
||||
nh_terminate(int status)
|
||||
{
|
||||
g.program_state.in_moveloop = 0; /* won't be returning to normal play */
|
||||
|
||||
l_nhcore_call(NHCORE_GAME_EXIT);
|
||||
#ifdef MAC
|
||||
getreturn("to exit");
|
||||
#endif
|
||||
@@ -1761,6 +1763,7 @@ nh_terminate(int status)
|
||||
if (!g.program_state.panicking) {
|
||||
freedynamicdata();
|
||||
dlb_cleanup();
|
||||
l_nhcore_done();
|
||||
}
|
||||
|
||||
#ifdef VMS
|
||||
|
||||
Reference in New Issue
Block a user