diff --git a/luprex/cpp/core/invocation.hpp b/luprex/cpp/core/invocation.hpp index 07303f13..0506382f 100644 --- a/luprex/cpp/core/invocation.hpp +++ b/luprex/cpp/core/invocation.hpp @@ -12,10 +12,20 @@ // // Nothing. // -// KIND_PLAN: +// KIND_CHOOSE: // -// Name of a callback function, in plaintext. +// Name of a callback function, in plaintext. The function name +// is sanity checked. First, we ensure that it begins with the +// prefix "cb_." Then we regenerate the gui, and verify that the +// gui has the specified callback as an option. // +// KIND_ENGIO: +// +// First, a function name is read from the datapack. The function +// name must be a lua function inside class "engio". The function +// is called with arguments: actor, place, and then additional +// arguments of simple dynamic type read from the datapack. +// // KIND_LUA: // // A block of lua source code, in plaintext. diff --git a/luprex/lua/login.lua b/luprex/lua/login.lua index 5e5631c9..6ef8285b 100644 --- a/luprex/lua/login.lua +++ b/luprex/lua/login.lua @@ -58,3 +58,8 @@ function engio.myfunction(actor, place, a, b, c) pprint("B:", b) pprint("C:", c) end + +function engio.moveto(actor, place, action, xyz) + -- todo: sanity check the action and xyz. + tangible.animate(actor, nil, {action=action, xyz=xyz}) + end