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
+2 -2
View File
@@ -11,11 +11,11 @@
var/screw_delay = 3 SECONDS
/obj/item/shell/screwdriver_act(mob/living/user, obj/item/tool)
user.visible_message("<span class='notice'>[user] begins finishing [src].</span>", "<span class='notice'>You begin finishing [src].</span>")
user.visible_message(span_notice("[user] begins finishing [src]."), span_notice("You begin finishing [src]."))
tool.play_tool_sound(src)
if(!do_after(user, screw_delay, src))
return
user.visible_message("<span class='notice'>[user] finishes [src].</span>", "<span class='notice'>You finish [src].</span>")
user.visible_message(span_notice("[user] finishes [src]."), span_notice("You finish [src]."))
var/turf/drop_loc = drop_location()