Lua API: More info in wesnoth.get_terrain_info
This commit is contained in:
parent
c79874086d
commit
503c2f01ae
2 changed files with 8 additions and 0 deletions
|
@ -114,6 +114,8 @@ 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 table returned by wesnoth.get_terrain_info:
|
||||
* icon, editor_image, light
|
||||
* LuaAI:
|
||||
* The table returned by check_*() now has a "result" field which
|
||||
gives a description of the action's result; similar to "status"
|
||||
|
|
|
@ -1309,6 +1309,12 @@ int game_lua_kernel::intf_get_terrain_info(lua_State *L)
|
|||
lua_setfield(L, -2, "editor_name");
|
||||
luaW_pushtstring(L, info.description());
|
||||
lua_setfield(L, -2, "description");
|
||||
lua_push(L, info.icon_image());
|
||||
lua_setfield(L, -2, "icon");
|
||||
lua_push(L, info.editor_image());
|
||||
lua_setfield(L, -2, "editor_image");
|
||||
lua_pushinteger(L, info.light_bonus(0));
|
||||
lua_setfield(L, -2, "light");
|
||||
lua_pushboolean(L, info.is_village());
|
||||
lua_setfield(L, -2, "village");
|
||||
lua_pushboolean(L, info.is_castle());
|
||||
|
|
Loading…
Add table
Reference in a new issue