[Add] Added __tostring metatable functions.
This commit is contained in:
parent
00384adf7b
commit
0121c6ac9d
@ -28,6 +28,7 @@ static int factionL_modplayerraw(lua_State* L);
|
|||||||
static int factionL_playerstanding(lua_State* L);
|
static int factionL_playerstanding(lua_State* L);
|
||||||
static const luaL_reg faction_methods[] = {
|
static const luaL_reg faction_methods[] = {
|
||||||
{ "__eq", factionL_eq },
|
{ "__eq", factionL_eq },
|
||||||
|
{ "__tostring", factionL_name },
|
||||||
{ "name", factionL_name },
|
{ "name", factionL_name },
|
||||||
{ "longname", factionL_longname },
|
{ "longname", factionL_longname },
|
||||||
{ "areEnemeies", factionL_areenemies },
|
{ "areEnemeies", factionL_areenemies },
|
||||||
@ -40,6 +41,7 @@ static const luaL_reg faction_methods[] = {
|
|||||||
|
|
||||||
static const luaL_reg faction_methods_cond[] = {
|
static const luaL_reg faction_methods_cond[] = {
|
||||||
{ "__eq", factionL_eq },
|
{ "__eq", factionL_eq },
|
||||||
|
{ "__tostring", factionL_name },
|
||||||
{ "name", factionL_name },
|
{ "name", factionL_name },
|
||||||
{ "longname", factionL_longname },
|
{ "longname", factionL_longname },
|
||||||
{ "areEnemeies", factionL_areenemies },
|
{ "areEnemeies", factionL_areenemies },
|
||||||
|
@ -32,6 +32,7 @@ static int planetL_services(lua_State* L);
|
|||||||
static int planetL_position(lua_State* L);
|
static int planetL_position(lua_State* L);
|
||||||
static const luaL_reg planet_methods[] = {
|
static const luaL_reg planet_methods[] = {
|
||||||
{ "__eq", planetL_eq },
|
{ "__eq", planetL_eq },
|
||||||
|
{ "__tostring", planetL_name },
|
||||||
{ "name", planetL_name },
|
{ "name", planetL_name },
|
||||||
{ "faction", planetL_faction },
|
{ "faction", planetL_faction },
|
||||||
{ "class", planetL_class },
|
{ "class", planetL_class },
|
||||||
@ -47,6 +48,7 @@ static int systemL_faction(lua_State* L);
|
|||||||
static int systemL_jumpdistance(lua_State* L);
|
static int systemL_jumpdistance(lua_State* L);
|
||||||
static const luaL_reg system_methods[] = {
|
static const luaL_reg system_methods[] = {
|
||||||
{ "__eq", systemL_eq },
|
{ "__eq", systemL_eq },
|
||||||
|
{ "__tostring", systemL_name },
|
||||||
{ "name", systemL_name },
|
{ "name", systemL_name },
|
||||||
{ "faction", systemL_faction },
|
{ "faction", systemL_faction },
|
||||||
{ "jumpDist", systemL_jumpdistance },
|
{ "jumpDist", systemL_jumpdistance },
|
||||||
|
Loading…
Reference in New Issue
Block a user