BACKEND: fixed lua ai test scripts

master
Martin Gerhardy 2020-09-24 21:19:49 +02:00
parent b5a9d92a9a
commit 8c97f28152
1 changed files with 7 additions and 7 deletions

View File

@ -113,11 +113,11 @@ function luatest:execute(ai, deltaMillis)
print("error: expected value was " .. aggroVal .. " - but found was " .. val)
return FAILED
end
chr:setAttribute("Key", "Value")
chr:setAttribute("Key2", "Value2")
chr:setAttribute("Attribute", "1.0")
if chr:attributes()["Key"] ~= "Value" then
print("error: expected attribute for 'Key' is 'Value' - but found was " .. chr:attributes()["Key"])
chr:setMetaAttribute("Key", "Value")
chr:setMetaAttribute("Key2", "Value2")
chr:setMetaAttribute("Attribute", "1.0")
if chr:metaAttributes()["Key"] ~= "Value" then
print("error: expected attribute for 'Key' is 'Value' - but found was " .. chr:metaAttributes()["Key"])
return FAILED
end
local execute = function (ai)
@ -157,8 +157,8 @@ function luatest:execute(ai, deltaMillis)
end
print("aggroentries:")
printtable(entries)
print("attributes:")
printtable(chr:attributes())
print("metaattributes:")
printtable(chr:metaAttributes())
print("position: " .. tostring(pos))
print("position x: " .. pos.x)
print("position y: " .. pos.y)