Serverlist: announce mg_name from map_meta.txt instead of minetest.conf
parent
a1e9732407
commit
0adadba218
|
@ -687,6 +687,7 @@ void Server::AsyncRunStep(bool initial_step)
|
||||||
m_env->getGameTime(),
|
m_env->getGameTime(),
|
||||||
m_lag,
|
m_lag,
|
||||||
m_gamespec.id,
|
m_gamespec.id,
|
||||||
|
m_emerge->params.mg_name,
|
||||||
m_mods);
|
m_mods);
|
||||||
counter = 0.01;
|
counter = 0.01;
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,6 +194,7 @@ void sendAnnounce(const std::string &action,
|
||||||
const u32 game_time,
|
const u32 game_time,
|
||||||
const float lag,
|
const float lag,
|
||||||
const std::string &gameid,
|
const std::string &gameid,
|
||||||
|
const std::string &mg_name,
|
||||||
const std::vector<ModSpec> &mods)
|
const std::vector<ModSpec> &mods)
|
||||||
{
|
{
|
||||||
Json::Value server;
|
Json::Value server;
|
||||||
|
@ -227,7 +228,7 @@ void sendAnnounce(const std::string &action,
|
||||||
if (action == "start") {
|
if (action == "start") {
|
||||||
server["dedicated"] = g_settings->getBool("server_dedicated");
|
server["dedicated"] = g_settings->getBool("server_dedicated");
|
||||||
server["rollback"] = g_settings->getBool("enable_rollback_recording");
|
server["rollback"] = g_settings->getBool("enable_rollback_recording");
|
||||||
server["mapgen"] = g_settings->get("mg_name");
|
server["mapgen"] = mg_name;
|
||||||
server["privs"] = g_settings->get("default_privs");
|
server["privs"] = g_settings->get("default_privs");
|
||||||
server["can_see_far_names"] = g_settings->getS16("player_transfer_distance") <= 0;
|
server["can_see_far_names"] = g_settings->getS16("player_transfer_distance") <= 0;
|
||||||
server["mods"] = Json::Value(Json::arrayValue);
|
server["mods"] = Json::Value(Json::arrayValue);
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace ServerList
|
||||||
const std::vector<std::string> &clients_names = std::vector<std::string>(),
|
const std::vector<std::string> &clients_names = std::vector<std::string>(),
|
||||||
const double uptime = 0, const u32 game_time = 0,
|
const double uptime = 0, const u32 game_time = 0,
|
||||||
const float lag = 0, const std::string &gameid = "",
|
const float lag = 0, const std::string &gameid = "",
|
||||||
|
const std::string &mg_name = "",
|
||||||
const std::vector<ModSpec> &mods = std::vector<ModSpec>());
|
const std::vector<ModSpec> &mods = std::vector<ModSpec>());
|
||||||
#endif
|
#endif
|
||||||
} // ServerList namespace
|
} // ServerList namespace
|
||||||
|
|
Loading…
Reference in New Issue