diff --git a/server/rooms/room_manager.cpp b/server/rooms/room_manager.cpp index 46beb53..637513e 100644 --- a/server/rooms/room_manager.cpp +++ b/server/rooms/room_manager.cpp @@ -41,7 +41,6 @@ RoomData* RoomManager::CreateRoom(MapType mapType) { //create the generator, use a lambda because I'm lazy newRoom->generator = [mapType]() -> BaseGenerator* { switch(mapType) { - case MapType::NONE: //use overworld as a default case MapType::OVERWORLD: return new OverworldGenerator(); case MapType::RUINS: return new RuinsGenerator(); case MapType::TOWERS: return new TowersGenerator(); @@ -98,7 +97,8 @@ void RoomManager::UnloadRoom(int uid) { RoomData* RoomManager::GetRoom(int uid) { RoomData* ptr = FindRoom(uid); if (ptr) return ptr; - return CreateRoom(MapType::NONE); + //TODO: proper Get() method + return nullptr; } RoomData* RoomManager::FindRoom(int uid) { diff --git a/server/rooms/room_mgr_api.cpp b/server/rooms/room_mgr_api.cpp index 1d7825b..9907896 100644 --- a/server/rooms/room_mgr_api.cpp +++ b/server/rooms/room_mgr_api.cpp @@ -39,6 +39,8 @@ static int getRoom(lua_State* L) { } static int createRoom(lua_State* L) { + //TODO: check parameter count for the glue functions + //get the room manager lua_pushstring(L, ROOM_MANAGER_PSEUDOINDEX); lua_gettable(L, LUA_REGISTRYINDEX); diff --git a/todo.txt b/todo.txt index 78b1506..f3394b6 100644 --- a/todo.txt +++ b/todo.txt @@ -1,6 +1,7 @@ TODO: encapsulate the data structures TODO: Get the rooms working +TODO: make the whole thing more fault tolerant TODO: Authentication TODO: server is slaved to the client