Added small test for argument passing to Lua code.

This commit is contained in:
Guillaume Melquiond 2009-11-01 11:05:49 +00:00
parent 918e27f8b8
commit 7913dfc335

View file

@ -277,9 +277,14 @@ Xu , Xu , Qxu , Qxu , Ql , Ql
name=prestart
[lua]
code=<<
local team = wesnoth.get_side(1);
team.gold = team.gold + 500;
local args = ...
local team = wesnoth.get_side(args.side);
team.gold = team.gold + args.gold;
>>
[args]
side=1
gold=500
[/args]
[/lua]
[set_menu_item]
description="Calculate unit worth"