wesnoth/data/ai/lua/dummy_engine_lua.lua
Dmitry Kovalenko b207a1b1ca LuaAI: the need to define an engine is now deprecated.
All CAs can be store in external .lua files. If the scenario config
lacks an [engine] tag for the Lua AI engine, but still tries to use CA
with engine=lua, a dummy engine will be automatically generated,
providing the needed functionality
2012-06-12 12:36:06 +00:00

16 lines
271 B
Lua

--! #textdomain wesnoth
return {
get_ai = function(ai)
local my_ai = { }
local ai_stdlib = wesnoth.require('ai/lua/stdlib.lua')
ai_stdlib.init(ai, true)
-- compulsory for the external CA's
function my_ai:get_ai()
return ai
end
return my_ai
end
}