Add a new, experimental function hackDoNotSave(global name).
It adds global by name to list of variables to not save to savegames. This too is not saved to savegames, so must be called again whenever game is restarted from a savegame.
Prot wrote:Why not just clear useless variables, when event save game is called? Or var's anyway saved but empty?
Prot wrote:Why not just clear useless variables, when event save game is called? Or var's anyway saved but empty?
var V;
hackDoNotSave('V');
(function(global) {
var V;
global.getV = function() { return V; }
global.setV = function(v) { V = v; }
})(this);
If used as in the first code snippet above, i guess it'd work, so it's cool. I was wrong about that in the original proposal.Per wrote:must be called again whenever game is restarted from a savegame.