Update/correct RN and changelog

This commit is contained in:
Celtic Minstrel 2016-03-27 14:13:23 -04:00
parent 503c2f01ae
commit 02cfb7c279
3 changed files with 7 additions and 4 deletions

View file

@ -64,7 +64,7 @@ A number of changes were made to the way Lua AI components are declared in the W
[list=1]
[*]If you used old-style Lua candidate actions (with execute= and evaluate= keys) together with an explicit [engine]name=lua tag, they will no longer work as written. In many cases, the fix will be simple - the code within [engine] frequently begins with a line similar to [c]local ai = ...[/c]. Simply removing this line will be sufficient to fix most such cases; if you accessed a "data" variable in the AI, see the Experimental AI definition (data/ai/ais/ai_generic_rush.cfg) for an example of how to fix it.
[*]If you used old-style Lua candidate actions without an explicit engine tag, you may need to remove a line similar to [c]local ai = ...[/c] from some of your code. In general, anything of the form [c]ai = <something>[/c] needs to be changed.
[*]If you used new-style (external) Lua candidate actions (with a location key), they will still work for the time being (provided that they use the exec_parms= and/or eval_parms= keys), but we recommend updating them nevertheless. The exec_parms= and eval_parms= keys should be combined into an [args] tag, and the argument list of your execution and evaluation functions should be changed from [c](ai, cfg, self)[/c] to [c](data, cfg)[/c]. The data parameter is the same as self.data was before; however, provided you do not have an explicit [engine] tag, self.data will continue to work.
[*]If you used new-style (external) Lua candidate actions (with a location key), they will still work for the time being (provided that they use the exec_parms= and/or eval_parms= keys), but we recommend updating them nevertheless. The exec_parms= and eval_parms= keys should be combined into an [args] tag, and the argument list of your execution and evaluation functions should be changed from [c](ai, cfg, self)[/c] to [c](cfg, data)[/c]. The data parameter is the same as self.data was before; however, provided you do not have an explicit [engine] tag, self.data will continue to work.
[/list]
[/rawarn]

View file

@ -114,6 +114,10 @@ Version 1.13.4+dev:
built-in effects - for example, to add a new feature to
[effect]apply_to=attack. It also now supports effect descriptions,
for use by the [trait] tag.
* Additional fields in unit proxy:
* usage, cost - self-explanatory
* traits - list of the IDs of all traits
* abilities - list of the IDs of all abilities
* Additional fields in table returned by wesnoth.get_terrain_info:
* icon, editor_image, light
* LuaAI:
@ -198,7 +202,6 @@ Version 1.13.4+dev:
* Dice operator is now synced (where possible)
* Modulus (%) operator now works on decimal numbers
* Exponentiation (^) operator is now right-associative
* List/map indexing now has highest precedence of any operator (instead of lowest)
* Fix several math operations returning a very large negative number when
the operation was invalid (for example, (-2) ^ 0.5).
Now they return null instead.

View file

@ -335,11 +335,11 @@ static int impl_unit_get(lua_State *L)
return 1;
}
if (strcmp(m, "traits") == 0) {
lua_push(L, u.get_ability_list());
lua_push(L, u.get_traits_list());
return 1;
}
if (strcmp(m, "abilities") == 0) {
lua_push(L, u.get_traits_list());
lua_push(L, u.get_ability_list());
return 1;
}
if (strcmp(m, "status") == 0) {