forked from github/server
test + bugfix santa 2009
This commit is contained in:
parent
6212b88426
commit
956039d661
|
@ -4,7 +4,10 @@ function xmas2009()
|
|||
set_key("xm09", true)
|
||||
for f in factions() do
|
||||
f:add_item("xmastree", 1)
|
||||
f:add_notice("santa2006")
|
||||
local msg = message.create("msg_event")
|
||||
msg:set_string("string", "santa2006")
|
||||
msg:send_faction(f)
|
||||
return 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,6 +18,15 @@ local function use_tree(terrain)
|
|||
return r
|
||||
end
|
||||
|
||||
function test_xmas2009()
|
||||
local r = region.create(0,0, "plain")
|
||||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u1 = unit.create(f, r, 1)
|
||||
process_orders()
|
||||
xmas2009()
|
||||
assert_equal("xmastree", f.items())
|
||||
end
|
||||
|
||||
function test_xmastree()
|
||||
local r
|
||||
r = use_tree("ocean")
|
||||
|
|
Loading…
Reference in New Issue