#include "serverremoteplayer.h"
#include "mods.h"
#include "inventorymanager.h"
+#include "subgame.h"
struct LuaState;
typedef struct lua_State lua_State;
class IWritableItemDefManager;
/*
NOTE: Every public method should be thread-safe
*/
-
+
Server(
- std::string gamename,
- std::string mapsavedir,
- std::string configpath
+ const std::string &path_world,
+ const std::string &path_config,
+ const SubgameSpec &gamespec
);
~Server();
void start(unsigned short port);
std::string getWorldPath(){ return m_path_world; }
+ void setAsyncFatalError(const std::string &error)
+ {
+ m_async_fatal_error.set(error);
+ }
+
private:
// con::PeerHandler implementation.
Variables
*/
- // Game name
- std::string m_gamename;
// World directory
std::string m_path_world;
// Path to user's configuration file ("" = no configuration file)
std::string m_path_config;
+ // Subgame specification
+ SubgameSpec m_gamespec;
// Equivalent of /usr/share/minetest/server
std::string m_path_share;
- // Equivalent of /usr/share/minetest/server/games/gamename
- std::string m_path_game;
- // Equivalent of /usr/share/minetest/server/addons/gamename
- // and ~/.minetest/server/addons/gamename
- std::set<std::string> m_path_addons;
+
+ // Thread can set; step() will throw as ServerError
+ MutexedVariable<std::string> m_async_fatal_error;
// Some timers
float m_liquid_transform_timer;