mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Hubstuff (#50422)
cl Qustinnus add: Hub visibility can now automatically turn on/off based on population (config-based) /cl did this for the headmins
This commit is contained in:
@@ -90,4 +90,15 @@ SUBSYSTEM_DEF(server_maint)
|
||||
if(tgsversion)
|
||||
SSblackbox.record_feedback("text", "server_tools", 1, tgsversion.raw_parameter)
|
||||
|
||||
|
||||
/datum/controller/subsystem/server_maint/proc/UpdateHubStatus()
|
||||
if(!CONFIG_GET(flag/hub) || !CONFIG_GET(number/max_hub_pop))
|
||||
return FALSE //no point, hub / auto hub controls are disabled
|
||||
|
||||
var/max_pop = CONFIG_GET(number/max_hub_pop)
|
||||
|
||||
if(GLOB.clients.len > max_pop)
|
||||
world.update_hub_visibility(FALSE)
|
||||
else
|
||||
world.update_hub_visibility(TRUE)
|
||||
#undef PING_BUFFER_TIME
|
||||
|
||||
Reference in New Issue
Block a user