Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #819533

Save Lua tables in savegames

Added by Alexandro Ignatiev over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Scripting API
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Without this, Lua scripting can not be advanced enough for anything past hut hook. At least, we have to serialize non-metatabled tables, or tables with a way to serialize them recorded in the metatable, and standard functions. We must mind table insertion cycles (that are currently ignored by listenv() that is a bug). We should not save the API itself (and maybe we should lock the variables, but it will be another task). Some functions and tables provided by the ruleset also should not be saved in savegames (maybe most of them).

Here comes a draft (script loadable to any version right now that is going to be preloaded in tolua_common_[az].pkg when the code will be bugfixed).

test_saves.lua (25.8 KB) test_saves.lua draft script, loads but not works properly yet Alexandro Ignatiev, 2019-06-02 09:49 PM

Also available in: Atom PDF