Remove action subtable, fix bug in makeclass
This commit is contained in:
@@ -542,8 +542,8 @@ void World::invoke_plan(int64_t actor_id, int64_t place_id, const std::string &a
|
||||
|
||||
// Set up for Lua manipulation.
|
||||
lua_State *L = state();
|
||||
LuaVar actor, place, func, tangibles, mt, index, actions, thread, threads, thinfo, message, invdata;
|
||||
LuaStack LS(L, actor, place, func, tangibles, mt, index, actions, thread, threads, thinfo, message, invdata);
|
||||
LuaVar actor, place, func, tangibles, mt, index, thread, threads, thinfo, message, invdata;
|
||||
LuaStack LS(L, actor, place, func, tangibles, mt, index, thread, threads, thinfo, message, invdata);
|
||||
|
||||
// Get the actor and place.
|
||||
LS.rawget(tangibles, LuaRegistry, "tangibles");
|
||||
@@ -565,12 +565,7 @@ void World::invoke_plan(int64_t actor_id, int64_t place_id, const std::string &a
|
||||
LS.result();
|
||||
return;
|
||||
}
|
||||
LS.rawget(actions, index, "action");
|
||||
if (!LS.istable(actions)) {
|
||||
LS.result();
|
||||
return;
|
||||
}
|
||||
LS.rawget(func, actions, action);
|
||||
LS.rawget(func, index, action);
|
||||
if (!LS.isfunction(func)) {
|
||||
LS.result();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user