Replaced a block of code in setup_server.lua with one line
This commit is contained in:
+2
-3
@@ -37,9 +37,8 @@
|
||||
#include "lua.hpp"
|
||||
|
||||
#include "entity_api.hpp"
|
||||
#include "monster_system_api.hpp"
|
||||
|
||||
#include "map_system_api.hpp"
|
||||
#include "monster_system_api.hpp"
|
||||
#include "room_system_api.hpp"
|
||||
#include "waypoint_system_api.hpp"
|
||||
|
||||
@@ -63,8 +62,8 @@ static const luaL_Reg loadedlibs[] = {
|
||||
//these libs are preloaded and must be required before used
|
||||
static const luaL_Reg preloadedlibs[] = {
|
||||
{TORTUGA_ENTITY_API, openEntityAPI},
|
||||
{TORTUGA_MONSTER_SYSTEM_API, openMonsterSystemAPI},
|
||||
{TORTUGA_MAP_SYSTEM_API, openMapSystemAPI},
|
||||
{TORTUGA_MONSTER_SYSTEM_API, openMonsterSystemAPI},
|
||||
{TORTUGA_ROOM_SYSTEM_API, openRoomSystemAPI},
|
||||
{TORTUGA_WAYPOINT_SYSTEM_API, openWaypointSystemAPI},
|
||||
{NULL, NULL}
|
||||
|
||||
@@ -66,10 +66,8 @@ static int getWaypointMgr(lua_State* L) {
|
||||
}
|
||||
|
||||
static int initialize(lua_State* L) {
|
||||
//set the members of the given room
|
||||
//TODO: This could fit into the room system's globals
|
||||
RoomData* room = static_cast<RoomData*>(lua_touserdata(L, 1));
|
||||
room->SetName(lua_tostring(L, 2));
|
||||
room->SetTileset(lua_tostring(L, 3));
|
||||
|
||||
//set the refs of these parameters (backwards, since it pops from the top of the stack)
|
||||
room->GetPager()->SetUnloadReference(luaL_ref(L, LUA_REGISTRYINDEX));
|
||||
|
||||
Reference in New Issue
Block a user