From 799c522f3e338ff0091493d21758671ef8699d7c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:58:58 -0800 Subject: [PATCH 1/2] Update world.dm --- code/game/world.dm | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/code/game/world.dm b/code/game/world.dm index 6894a4289038..7c58816a39c1 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -1,7 +1,7 @@ #define RESTART_COUNTER_PATH "data/round_counter.txt" GLOBAL_VAR(restart_counter) - +GLOBAL_VAR_INIT(hub_visibility, TRUE) GLOBAL_VAR(topic_status_lastcache) GLOBAL_LIST(topic_status_cache) @@ -10,11 +10,17 @@ GLOBAL_LIST(topic_status_cache) turf = /turf/space/basic area = /area/space view = "15x15" - hub = "Exadv1.spacestation13" - hub_password = "kMZy3U5jJHSiBQjr" name = "Citadel Station 13 - Roleplay" status = "ERROR: Default status" + /// world visibility. this should never, ever be touched. + /// a weird byond bug yet to be resolved is probably making this + /// permanently delist the server if this is disabled at any point. visibility = TRUE + /// static value, do not change + hub = "Exadv1.spacestation13" + /// static value, do not change, except to toggle visibility + /// * use this instead of `visibility` to toggle, via `update_hub_visibility` + hub_password = "kMZy3U5jJHSiBQjr" movement_mode = PIXEL_MOVEMENT_MODE fps = 20 #ifdef FIND_REF_NO_CHECK_TICK @@ -410,12 +416,17 @@ GLOBAL_LIST(topic_status_cache) status = . +/** + * Sets whether or not we're visible on the hub. + * * This is the only place where `hub_password` should be touched! + * * Never, ever modify `hub` or `visibility`. + */ /world/proc/update_hub_visibility(new_visibility) - if(new_visibility == visibility) + new_visibility = !!new_visibility + if(new_visibility == GLOB.hub_visibility) return - - visibility = new_visibility - if(visibility) + GLOB.hub_visibility = new_visibility + if(GLOB.hub_visibility) hub_password = "kMZy3U5jJHSiBQjr" else hub_password = "SORRYNOPASSWORD" From 6155fac1dcf13c5c64a53f3abcc31696fb6d9b40 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 27 Dec 2024 14:43:06 -0800 Subject: [PATCH 2/2] Update admin.dm --- code/modules/admin/admin.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 2c7138660328..4c43719421e2 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -827,9 +827,9 @@ var/datum/legacy_announcement/minor/admin_min_announcer = new if(!check_rights(R_ADMIN)) return - world.update_hub_visibility(!world.visibility) + world.update_hub_visibility(!GLOB.hub_visibility) log_admin("[key_name(usr)] toggled hub visibility.") - message_admins("[key_name_admin(usr)] toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility]).", 1) + message_admins("[key_name_admin(usr)] toggled hub visibility. The server is now [GLOB.hub_visibility ? "visible" : "invisible"] ([GLOB.hub_visibility]).", 1) feedback_add_details("admin_verb","THUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc /datum/admins/proc/toggletraitorscaling()