diff --git a/code/controllers/subsystem/security_level.dm b/code/controllers/subsystem/security_level.dm index 94dc351bdec..c89f2282cae 100644 --- a/code/controllers/subsystem/security_level.dm +++ b/code/controllers/subsystem/security_level.dm @@ -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 diff --git a/code/game/world.dm b/code/game/world.dm index 9b0126a7441..c1c0add8822 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -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 += "[server_name] " + new_status += "[server_name] " 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 += " — [station_name()]" + new_status += " — [station_name()]" var/players = GLOB.clients.len @@ -332,15 +332,18 @@ GLOBAL_VAR(restart_counter) features += "hosted by [hostedby]" if(length(features)) - s += ": [jointext(features, ", ")]" + new_status += ": [jointext(features, ", ")]" - s += "
Time: [gameTimestamp("hh:mm")]" + new_status += "
Time: [gameTimestamp("hh:mm")]" if(SSmapping.config) - s += "
Map: [SSmapping.config.map_path == CUSTOM_MAP_PATH ? "Uncharted Territory" : SSmapping.config.map_name]" - s += "
Alert: [capitalize(SSsecurity_level.get_current_level_as_text())]" + new_status += "
Map: [SSmapping.config.map_path == CUSTOM_MAP_PATH ? "Uncharted Territory" : SSmapping.config.map_name]" + var/alert_text = SSsecurity_level.get_current_level_as_text() + if(alert_text) + new_status += "
Alert: [capitalize(alert_text)]" - status = s + status = new_status */ + /world/proc/update_hub_visibility(new_visibility) if(new_visibility == GLOB.hub_visibility) return