Got the whole look-at demo up and running.
This commit is contained in:
@@ -234,20 +234,17 @@ LuaDefine(tangible_setclass, "tan,class",
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
LuaDefine(tangible_getclass, "tan",
|
||||
"|Get the class of the tangible, if any."
|
||||
LuaDefine(tangible_getclassname, "tan",
|
||||
"|Get the classname of the tangible, if any."
|
||||
"|"
|
||||
"|The return value is a string, the class name, not"
|
||||
"|the class table."
|
||||
"|The return value is a string (or nil)."
|
||||
"|") {
|
||||
LuaArg tanobj;
|
||||
LuaVar classtab;
|
||||
LuaRet classname;
|
||||
LuaDefStack LS(L, tanobj, classtab, classname);
|
||||
LuaDefStack LS(L, tanobj, classname);
|
||||
World *w = World::fetch_global_pointer(L);
|
||||
w->tangible_get(LS, tanobj, false);
|
||||
LS.tangetclass(classtab, tanobj);
|
||||
eng::string name = LS.classname(classtab);
|
||||
eng::string name = LS.classname(tanobj);
|
||||
if (name == "") {
|
||||
LS.set(classname, LuaNil);
|
||||
} else {
|
||||
@@ -256,6 +253,20 @@ LuaDefine(tangible_getclass, "tan",
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
LuaDefine(tangible_getclass, "tan",
|
||||
"|Get the class of the tangible, if any."
|
||||
"|"
|
||||
"|The return value is a class table (or nil)."
|
||||
"|") {
|
||||
LuaArg tanobj;
|
||||
LuaRet classtab;
|
||||
LuaDefStack LS(L, tanobj, classtab);
|
||||
World *w = World::fetch_global_pointer(L);
|
||||
w->tangible_get(LS, tanobj, false);
|
||||
LS.tangetclass(classtab, tanobj);
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
LuaDefine(tangible_delete, "tan",
|
||||
"|Delete the specified tangible."
|
||||
"|"
|
||||
|
||||
Reference in New Issue
Block a user