diff --git a/src/scripts/e3a/xmas2009.lua b/src/scripts/e3a/xmas2009.lua index c29c93bba..ee22a0529 100644 --- a/src/scripts/e3a/xmas2009.lua +++ b/src/scripts/e3a/xmas2009.lua @@ -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 diff --git a/src/scripts/tests/e3a.lua b/src/scripts/tests/e3a.lua index ef82d4f39..e03166c7c 100644 --- a/src/scripts/tests/e3a.lua +++ b/src/scripts/tests/e3a.lua @@ -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")