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

View File

@@ -11,7 +11,7 @@
else if (query != null)
src << link(wikiurl)
else
to_chat(src, "<span class='danger'>The wiki URL is not set in the server configuration.</span>")
to_chat(src, span_danger("The wiki URL is not set in the server configuration."))
return
/client/verb/forum()
@@ -24,7 +24,7 @@
return
src << link(forumurl)
else
to_chat(src, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
to_chat(src, span_danger("The forum URL is not set in the server configuration."))
return
/client/verb/rules()
@@ -37,7 +37,7 @@
return
src << link(rulesurl)
else
to_chat(src, "<span class='danger'>The rules URL is not set in the server configuration.</span>")
to_chat(src, span_danger("The rules URL is not set in the server configuration."))
return
/client/verb/github()
@@ -50,7 +50,7 @@
return
src << link(githuburl)
else
to_chat(src, "<span class='danger'>The Github URL is not set in the server configuration.</span>")
to_chat(src, span_danger("The Github URL is not set in the server configuration."))
return
/client/verb/reportissue()
@@ -95,7 +95,7 @@
var/url_params = "Reporting client version: [byond_version].[byond_build]\n\n[local_template]"
DIRECT_OUTPUT(src, link("[githuburl]/issues/new?body=[url_encode(url_params)]"))
else
to_chat(src, "<span class='danger'>The Github URL is not set in the server configuration.</span>")
to_chat(src, span_danger("The Github URL is not set in the server configuration."))
return
/client/verb/changelog()