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:
Watermelon914
2021-06-14 13:03:53 -07:00
committed by GitHub
parent b9982f6970
commit 375a20e49b
1676 changed files with 15455 additions and 15226 deletions
+3 -3
View File
@@ -16,7 +16,7 @@
var/mob/living/L = locate() in buckled_mobs
if(!L)
return
to_chat(user, "<span class='notice'>Invoking the sacred ritual, you sacrifice [L].</span>")
to_chat(user, span_notice("Invoking the sacred ritual, you sacrifice [L]."))
L.gib()
message_admins("[ADMIN_LOOKUPFLW(user)] has sacrificed [key_name_admin(L)] on the sacrificial altar at [AREACOORD(src)].")
@@ -35,10 +35,10 @@
if(.)
return
if(last_process + time_between_uses > world.time)
to_chat(user, "<span class='notice'>The fountain appears to be empty.</span>")
to_chat(user, span_notice("The fountain appears to be empty."))
return
last_process = world.time
to_chat(user, "<span class='notice'>The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards.</span>")
to_chat(user, span_notice("The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards."))
user.reagents.add_reagent(/datum/reagent/medicine/omnizine/godblood,20)
update_appearance()
addtimer(CALLBACK(src, /atom/.proc/update_appearance), time_between_uses)