diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 53a90d179fe..541b485af80 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -18,6 +18,7 @@ var/server_suffix = 0 // generate numeric suffix based on server port var/lobby_countdown = 120 // In between round countdown. var/round_end_countdown = 25 // Post round murder death kill countdown + var/hub = 0 var/log_ooc = 0 // log OOC channel var/log_access = 0 // log login/logout @@ -265,7 +266,7 @@ if(type == "config") switch(name) if("hub") - world.visibility = 1 + config.hub = 1 if("admin_legacy_system") config.admin_legacy_system = 1 if("ban_legacy_system") diff --git a/code/controllers/subsystem/server_maintenance.dm b/code/controllers/subsystem/server_maintenance.dm index ee368c4c429..1e4b4ae76fe 100644 --- a/code/controllers/subsystem/server_maintenance.dm +++ b/code/controllers/subsystem/server_maintenance.dm @@ -3,12 +3,16 @@ var/datum/subsystem/server_maint/SSserver /datum/subsystem/server_maint name = "Server Tasks" wait = 6000 - init_order = 19 - flags = SS_NO_TICK_CHECK|SS_NO_INIT + flags = SS_NO_TICK_CHECK /datum/subsystem/server_maint/New() NEW_SS_GLOBAL(SSserver) +/datum/subsystem/server_maint/Initialize(timeofday) + if (config.hub) + world.visibility = 1 + ..() + /datum/subsystem/server_maint/fire() //handle kicking inactive players if(config.kick_inactive > 0) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 10b98e0c909..c48931b2332 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1163,4 +1163,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.") message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.") + if (world.visibility && !world.reachable) + message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.") + feedback_add_details("admin_verb","HUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! \ No newline at end of file diff --git a/code/world.dm b/code/world.dm index d4d1bb3ab4a..79cf68722b5 100644 --- a/code/world.dm +++ b/code/world.dm @@ -8,6 +8,7 @@ hub_password = "kMZy3U5jJHSiBQjr" name = "/tg/ Station 13" fps = 20 + visibility = 0 var/list/map_transition_config = MAP_TRANSITION_CONFIG @@ -35,7 +36,6 @@ var/list/map_transition_config = MAP_TRANSITION_CONFIG changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) - visibility = 0 load_configuration() load_mode() load_motd()