Follow-up Comment #3, patch #1432 (project wesnoth):
> How can I garbage collect these?
You don't have to do anything special. See how the lua_action_handler class
handles it.
> You think that for such boolean-parameters-which-come-last, 'false' is a
better default than 'true'?
Obviously, since missing arguments evaluate to nil/false in Lua.
> This can be changed ai-wide (stopunit_action being similar).
Why do you want to change the whole AI just for an interface issue? The
chosen Lua interface shouldn't matter with respect to the global C++ engine.
> but it is always a first argument of ai actions, for consistency - some
other ai actions need it.
Again, who cares about the C++ code? This is a Lua interface you are
designing here. If the user always has to pass the exact same argument to
each call, this is a broken interface, whether it is consistent with the C++
code or not.
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1432>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs