mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs. Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines. Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing. Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc. (Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
@@ -15,7 +15,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
|
||||
var/response = tgui_alert(usr, "Anon mode is currently enabled. Disable?", "cold feet", list("Disable Anon Names", "Keep it Enabled"))
|
||||
if(response != "Disable Anon Names")
|
||||
return
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has disabled anonymous names.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has disabled anonymous names."))
|
||||
QDEL_NULL(GLOB.current_anonymous_theme)
|
||||
return
|
||||
var/list/input_list = list("Cancel")
|
||||
@@ -36,7 +36,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
|
||||
extras_enabled = extras_enabled == "Yes"
|
||||
alert_players = alert_players == "Yes"
|
||||
GLOB.current_anonymous_theme = new chosen_theme(extras_enabled, alert_players)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has enabled anonymous names. THEME: [GLOB.current_anonymous_theme].</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has enabled anonymous names. THEME: [GLOB.current_anonymous_theme]."))
|
||||
|
||||
/* Datum singleton initialized by the client proc to hold the naming generation */
|
||||
/datum/anonymous_theme
|
||||
|
||||
Reference in New Issue
Block a user