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 21:03:53 +01:00
committed by GitHub
parent b9982f6970
commit 375a20e49b
1676 changed files with 15455 additions and 15226 deletions
@@ -91,12 +91,12 @@
switch (action)
if ("toggleLock")
if(computer.obj_flags & EMAGGED)
to_chat(usr, "<span class='boldwarning'>Security protocol error: Unable to access locking protocols.</span>")
to_chat(usr, span_boldwarning("Security protocol error: Unable to access locking protocols."))
return TRUE
if(ACCESS_RND in user_id_card?.access)
locked = !locked
else
to_chat(usr, "<span class='boldwarning'>Unauthorized Access. Please insert research ID card.</span>")
to_chat(usr, span_boldwarning("Unauthorized Access. Please insert research ID card."))
return TRUE
if ("researchNode")
if(!SSresearch.science_tech.available_nodes[params["node_id"]])