fix [micro_ai] when called from lua

fixes #5134
This commit is contained in:
gfgtdf 2020-09-07 18:10:41 +02:00 committed by GitHub
parent 54f86f0c9b
commit ebc65c9b00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ wesnoth.require("ai/micro_ais/mai-defs")
function wesnoth.wml_actions.micro_ai(cfg)
local CA_path = 'ai/micro_ais/cas/'
cfg = cfg.__shallow_parsed
cfg = wml.shallow_parsed(cfg)
-- Check that the required common keys are all present and set correctly
if (not cfg.ai_type) then wml.error("[micro_ai] is missing required ai_type= key") end