mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 14:36:22 +00:00

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
16 lines
271 B
Lua
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
|
|
} |