Update of patch #3320 (project freeciv):
Status: None => Ready For Test
Assigned to: None => jtn
Planned Release: 2.5.0 => 2.4.0,2.5.0
Summary: Add ai type argument to Lua create_player() => Add
ai type argument to Lua edit.create_player()
_______________________________________________________
Follow-up Comment #2:
I looked at this because I thought it would be trivial. Of course it turned
out not to be entirely so, but I learned something relevant to 2.4.0.
* It turns out that our scripting arrangements don't support optional
arguments as I thought they did. So it's not possible to add arguments in a
backward-compatible way.
* But! Some time in 2.4 development, a number of global functions were put in
the "edit" module, so create_player() becomes edit.create_player(). For
pre-existing functions a global wrapper create_player() was left behind (for
functions new in 2.4, only the new name is available, edit.climate_change()).
All this had completely passed me by.
* So, 2.4 is the natural point to add an extra argument -- the old name
create_player() won't take it, the new name edit.create_player() will.
Technically this is too late given file format freeze, but if we don't do it
now, we won't ever be able to, for script backward compatibility reasons.
Lots of words, small patch, which is attached. Will commit to S2_4 unless
someone objects.
(file #15939)
_______________________________________________________
Additional Item Attachment:
File name: trunk-S2_4-lua-create-player-ai-type.diff Size:3 KB
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?3320>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev