mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +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:
@@ -71,9 +71,9 @@
|
||||
. = COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
var/mob/living/carbon/jedi = user
|
||||
jedi.visible_message(
|
||||
"<span class='danger'>[jedi]'s head begins to collapse in on itself!</span>",
|
||||
"<span class='userdanger'>Your head feels like it's collapsing in on itself! This was really not a good idea!</span>",
|
||||
"<span class='hear'>You hear something crack and explode in gore.</span>"
|
||||
span_danger("[jedi]'s head begins to collapse in on itself!"),
|
||||
span_userdanger("Your head feels like it's collapsing in on itself! This was really not a good idea!"),
|
||||
span_hear("You hear something crack and explode in gore.")
|
||||
)
|
||||
jedi.Stun(3 SECONDS)
|
||||
new /obj/effect/gibspawner/generic(get_turf(jedi), jedi)
|
||||
@@ -377,8 +377,8 @@
|
||||
|
||||
/obj/singularity/proc/combust_mobs()
|
||||
for(var/mob/living/carbon/C in urange(20, src, 1))
|
||||
C.visible_message("<span class='warning'>[C]'s skin bursts into flame!</span>", \
|
||||
"<span class='userdanger'>You feel an inner fire as your skin bursts into flames!</span>")
|
||||
C.visible_message(span_warning("[C]'s skin bursts into flame!"), \
|
||||
span_userdanger("You feel an inner fire as your skin bursts into flames!"))
|
||||
C.adjust_fire_stacks(5)
|
||||
C.IgniteMob()
|
||||
return
|
||||
@@ -395,12 +395,12 @@
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/meson))
|
||||
var/obj/item/clothing/glasses/meson/MS = H.glasses
|
||||
if(MS.vision_flags == SEE_TURFS)
|
||||
to_chat(H, "<span class='notice'>You look directly into the [src.name], good thing you had your protective eyewear on!</span>")
|
||||
to_chat(H, span_notice("You look directly into the [src.name], good thing you had your protective eyewear on!"))
|
||||
return
|
||||
|
||||
M.apply_effect(60, EFFECT_STUN)
|
||||
M.visible_message("<span class='danger'>[M] stares blankly at the [src.name]!</span>", \
|
||||
"<span class='userdanger'>You look directly into the [src.name] and feel weak.</span>")
|
||||
M.visible_message(span_danger("[M] stares blankly at the [src.name]!"), \
|
||||
span_userdanger("You look directly into the [src.name] and feel weak."))
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user