mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
[MIRROR] Fixes world status runtiming during initialize [MDB IGNORE] (#14939)
* Fixes world status runtiming during initialize * Update world.dm resolve a code conflict Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
jjpark-kb
parent
3a0fe981fd
commit
ea83b1444c
@@ -78,13 +78,13 @@ SUBSYSTEM_DEF(security_level)
|
||||
* Returns the current security level as a number
|
||||
*/
|
||||
/datum/controller/subsystem/security_level/proc/get_current_level_as_number()
|
||||
return current_security_level.number_level
|
||||
return current_security_level?.number_level
|
||||
|
||||
/**
|
||||
* Returns the current security level as text
|
||||
*/
|
||||
/datum/controller/subsystem/security_level/proc/get_current_level_as_text()
|
||||
return current_security_level.name
|
||||
return current_security_level?.name
|
||||
|
||||
/**
|
||||
* Converts a text security level to a number
|
||||
@@ -94,7 +94,7 @@ SUBSYSTEM_DEF(security_level)
|
||||
*/
|
||||
/datum/controller/subsystem/security_level/proc/text_level_to_number(text_level)
|
||||
var/datum/security_level/selected_level = available_levels[text_level]
|
||||
return selected_level.number_level
|
||||
return selected_level?.number_level
|
||||
|
||||
/**
|
||||
* Converts a number security level to a text
|
||||
|
||||
+11
-8
@@ -309,12 +309,12 @@ GLOBAL_VAR(restart_counter)
|
||||
if(LAZYACCESS(SSlag_switch.measures, DISABLE_NON_OBSJOBS))
|
||||
features += "closed"
|
||||
|
||||
var/s = ""
|
||||
var/new_status = ""
|
||||
var/hostedby
|
||||
if(config)
|
||||
var/server_name = CONFIG_GET(string/servername)
|
||||
if (server_name)
|
||||
s += "<b>[server_name]</b> "
|
||||
new_status += "<b>[server_name]</b> "
|
||||
if(!CONFIG_GET(flag/norespawn))
|
||||
features += "respawn"
|
||||
if(!CONFIG_GET(flag/allow_ai))
|
||||
@@ -322,7 +322,7 @@ GLOBAL_VAR(restart_counter)
|
||||
hostedby = CONFIG_GET(string/hostedby)
|
||||
|
||||
if (CONFIG_GET(flag/station_name_in_hub_entry))
|
||||
s += " — <b>[station_name()]</b>"
|
||||
new_status += " — <b>[station_name()]</b>"
|
||||
|
||||
var/players = GLOB.clients.len
|
||||
|
||||
@@ -332,15 +332,18 @@ GLOBAL_VAR(restart_counter)
|
||||
features += "hosted by <b>[hostedby]</b>"
|
||||
|
||||
if(length(features))
|
||||
s += ": [jointext(features, ", ")]"
|
||||
new_status += ": [jointext(features, ", ")]"
|
||||
|
||||
s += "<br>Time: <b>[gameTimestamp("hh:mm")]</b>"
|
||||
new_status += "<br>Time: <b>[gameTimestamp("hh:mm")]</b>"
|
||||
if(SSmapping.config)
|
||||
s += "<br>Map: <b>[SSmapping.config.map_path == CUSTOM_MAP_PATH ? "Uncharted Territory" : SSmapping.config.map_name]</b>"
|
||||
s += "<br>Alert: <b>[capitalize(SSsecurity_level.get_current_level_as_text())]</b>"
|
||||
new_status += "<br>Map: <b>[SSmapping.config.map_path == CUSTOM_MAP_PATH ? "Uncharted Territory" : SSmapping.config.map_name]</b>"
|
||||
var/alert_text = SSsecurity_level.get_current_level_as_text()
|
||||
if(alert_text)
|
||||
new_status += "<br>Alert: <b>[capitalize(alert_text)]</b>"
|
||||
|
||||
status = s
|
||||
status = new_status
|
||||
*/
|
||||
|
||||
/world/proc/update_hub_visibility(new_visibility)
|
||||
if(new_visibility == GLOB.hub_visibility)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user