Resource icon

SaveUtils.lua 2016-10-05

Version 2

http://forums.civfanatics.com/showthread.php?t=392958

To use this file, place the following line of code in your modded file's
global scope and set your mod name.

include( "SaveUtils" ); MY_MOD_NAME= "myMod";

This file allows for itemized data storage across mods and caching of deserialized data. Caching functionality can be set to one of three states per mod: 0 = no cache, 1 = serialize on save(), 2 = serialize on sync(). Default = 1.

Now, the load() function will return the entire save table when the third parameter is false, or return the specific mod table when the second parameter is nil.

Many thanks to killmeplease for the serialize(), deserialize() functions, and the idea of spanning mods.
Author
Ryan F. Mercer
Downloads
217
Views
217
First release
Last update
Rating
0.00 star(s) 0 ratings
Top Bottom