[celx] Add method celestia:version()
parent
d9243202fa
commit
a33e24914b
|
@ -2132,6 +2132,12 @@ static int celestia_loadfragment(lua_State* l)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int celestia_version(lua_State* l)
|
||||||
|
{
|
||||||
|
lua_pushstring(l, "1.7.0");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
void CreateCelestiaMetaTable(lua_State* l)
|
void CreateCelestiaMetaTable(lua_State* l)
|
||||||
{
|
{
|
||||||
Celx_CreateClassMetatable(l, Celx_Celestia);
|
Celx_CreateClassMetatable(l, Celx_Celestia);
|
||||||
|
@ -2236,6 +2242,8 @@ void CreateCelestiaMetaTable(lua_State* l)
|
||||||
|
|
||||||
Celx_RegisterMethod(l, "loadfragment", celestia_loadfragment);
|
Celx_RegisterMethod(l, "loadfragment", celestia_loadfragment);
|
||||||
|
|
||||||
|
Celx_RegisterMethod(l, "version", celestia_version);
|
||||||
|
|
||||||
lua_pop(l, 1);
|
lua_pop(l, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
print(_VERSION)
|
print(_VERSION)
|
||||||
print(_RELEASE)
|
print(_RELEASE)
|
||||||
print(_LUAJIT_VERSION)
|
print(_LUAJIT_VERSION)
|
||||||
|
|
||||||
|
if type(celestia['version']) == 'function' then
|
||||||
|
print(celestia:version())
|
||||||
|
else
|
||||||
|
print("No celestia:version defined")
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue