mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +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:
@@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
/obj/item/zombie_hand/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is ripping [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message(span_suicide("[user] is ripping [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!"))
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
var/obj/item/bodypart/O = L.get_bodypart(BODY_ZONE_HEAD)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if (causes_damage && !iszombie(owner) && owner.stat != DEAD)
|
||||
owner.adjustToxLoss(0.5 * delta_time)
|
||||
if(DT_PROB(5, delta_time))
|
||||
to_chat(owner, "<span class='danger'>You feel sick...</span>")
|
||||
to_chat(owner, span_danger("You feel sick..."))
|
||||
if(timer_id)
|
||||
return
|
||||
if(owner.suiciding)
|
||||
@@ -88,11 +88,11 @@
|
||||
return
|
||||
|
||||
owner.grab_ghost()
|
||||
owner.visible_message("<span class='danger'>[owner] suddenly convulses, as [owner.p_they()][stand_up ? " stagger to [owner.p_their()] feet and" : ""] gain a ravenous hunger in [owner.p_their()] eyes!</span>", "<span class='alien'>You HUNGER!</span>")
|
||||
owner.visible_message(span_danger("[owner] suddenly convulses, as [owner.p_they()][stand_up ? " stagger to [owner.p_their()] feet and" : ""] gain a ravenous hunger in [owner.p_their()] eyes!"), span_alien("You HUNGER!"))
|
||||
playsound(owner.loc, 'sound/hallucinations/far_noise.ogg', 50, TRUE)
|
||||
owner.do_jitter_animation(living_transformation_time)
|
||||
owner.Stun(living_transformation_time)
|
||||
to_chat(owner, "<span class='alertalien'>You are now a zombie! Do not seek to be cured, do not help any non-zombies in any way, do not harm your zombie brethren and spread the disease by killing others. You are a creature of hunger and violence.</span>")
|
||||
to_chat(owner, span_alertalien("You are now a zombie! Do not seek to be cured, do not help any non-zombies in any way, do not harm your zombie brethren and spread the disease by killing others. You are a creature of hunger and violence."))
|
||||
|
||||
/obj/item/organ/zombie_infection/nodamage
|
||||
causes_damage = FALSE
|
||||
|
||||
Reference in New Issue
Block a user