Added getactor/getplace using registry keys.
This commit is contained in:
@@ -153,6 +153,21 @@ LuaDefine(tangible_id, "c") {
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
LuaDefine(tangible_getactor, "c") {
|
||||
LuaRet actor;
|
||||
LuaStack LS(L, actor);
|
||||
LS.rawget(actor, LuaRegistry, "actor");
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
LuaDefine(tangible_getplace, "c") {
|
||||
LuaRet place;
|
||||
LuaStack LS(L, place);
|
||||
LS.rawget(place, LuaRegistry, "place");
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
|
||||
LuaDefine(world_wait, "f") {
|
||||
if ((lua_gettop(L) != 1) || (lua_type(L, -1) != LUA_TNUMBER)) {
|
||||
luaL_error(L, "Argument to wait must be a number.");
|
||||
|
||||
Reference in New Issue
Block a user