Lua: Persistent variables

Add a way for the lua scripts to set and retrieve variables
that are persistent - saved and restored with the game.

Invalidates saves.
This commit is contained in:
Pasi Kallinen
2023-01-15 10:32:31 +02:00
parent 18cc99150a
commit 6abb12aee0
8 changed files with 194 additions and 1 deletions

View File

@@ -688,6 +688,7 @@ restgamestate(NHFILE* nhfp, unsigned int* stuckid, unsigned int* steedid)
restnames(nhfp);
restore_msghistory(nhfp);
restore_gamelog(nhfp);
restore_luadata(nhfp);
/* must come after all mons & objs are restored */
relink_timers(FALSE);
relink_light_sources(FALSE);