/* * Method: GetStarSystem * * Get a <StarSystem> object for the system that this path points to * * > system = path:GetStarSystem() * * Return: * * system - the <StarSystem> * * Availability: * * alpha 10 * * Status: * * stable */ static int l_sbodypath_get_star_system(lua_State *l) { SystemPath *path = LuaSystemPath::GetFromLua(1); StarSystem *s = StarSystem::GetCached(path); LuaStarSystem::PushToLua(s); s->Release(); return 1; }
/* * Method: GetSystemBody * * Get a <SystemBody> object for the body that this path points to * * > body = path:GetSystemBody() * * Return: * * body - the <SystemBody> * * Availability: * * alpha 10 * * Status: * * stable */ static int l_sbodypath_get_system_body(lua_State *l) { SystemPath *path = LuaSystemPath::GetFromLua(1); StarSystem *s = StarSystem::GetCached(path); SBody *sbody = s->GetBodyByPath(path); LuaSBody::PushToLua(sbody); s->Release(); return 1; }