test + bugfix santa 2009

This commit is contained in:
Enno Rehling 2009-12-19 23:23:58 +00:00
parent 6212b88426
commit 956039d661
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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")