I looked over the code again and removed more of my comments that you adressed 
or that I made up my mind about :). One more thing: If you change a Lua method 
make sure that you update where it is used in the code (i.e. in all *.lua 
files) and add in a backwards compatible version (I did this for this change). 
The reason for this is that the Lua interface is a kind of public API that 
people should rely on and that should not change to quickly so that they have 
time to adapt - there is no proper deprecation warning for this yet, for now I 
just simply added a comment.

These methods must be around for at least three builds - the reason is that the 
lua code is saved into savegames, so if the API changes and a player tries to 
reload a scenario with older code, the API calls must still be around.

About the test running, the comments in the file where slightly outdated. I 
updated them to this:
$PATH_TO_WIDELANDS_BINARY --datadir="." --nozip 
--scenario=test/lua/persistence.wmf && $PATH_TO_WIDELANDS_BINARY --datadir="." 
--loadgame=~/.widelands/save/lua_persistence.wgf

of course a rm -rf ~/.widelands/save/lua_persistence.wgf should be a good idea 
as well.

Could you try again if this works for you? You have to be in the root directory 
of the repository for this to work.

-- 
https://code.launchpad.net/~widelands-dev/widelands/autosave_on_objectives/+merge/174546
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/autosave_on_objectives.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to