From 8c97f281524ceaf571749ecd2be38db85586772c Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Thu, 24 Sep 2020 21:19:49 +0200 Subject: [PATCH] BACKEND: fixed lua ai test scripts --- data/tests/testluaregistry.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/tests/testluaregistry.lua b/data/tests/testluaregistry.lua index 4ea8a242d..e98c4ab86 100644 --- a/data/tests/testluaregistry.lua +++ b/data/tests/testluaregistry.lua @@ -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)