Skip to content

Commit

Permalink
TGS Test Merge (#6944)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinz authored and Kevinz committed Dec 28, 2024
2 parents 54763d0 + 6155fac commit d4a5815
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
25 changes: 18 additions & 7 deletions code/game/world.dm
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d4a5815

Please sign in to comment.