[MIRROR] refactors most spans (#9139)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-10-04 06:00:17 -07:00
committed by GitHub
parent 43ee646816
commit ab154b48b2
1511 changed files with 12497 additions and 12357 deletions

View File

@@ -184,7 +184,7 @@
attack_mob(L)
spawn()
T.visible_message("<span class='warning'>\The [src] covers \the [T] in a corrosive paste!</span>")
T.visible_message(span_warning("\The [src] covers \the [T] in a corrosive paste!"))
for(var/turf/simulated/floor/F in view(2, T))
spawn()
var/obj/effect/effect/water/splash = new(T)

View File

@@ -256,11 +256,11 @@
var/obj/item/clothing/suit/redtag/S = M.wear_suit
if (S.lasertag_health <= 1)
M.Weaken(5)
to_chat(M,"<span class='warning'>You have been defeated!</span>")
to_chat(M,span_warning("You have been defeated!"))
S.lasertag_health = initial(S.lasertag_health)
else
S.lasertag_health--
to_chat(M,"<span class='warning'>Danger! You have [num2text(S.lasertag_health)] hits remaining!</span>")
to_chat(M,span_warning("Danger! You have [num2text(S.lasertag_health)] hits remaining!"))
return 1
/obj/item/projectile/beam/lasertag/red
@@ -291,11 +291,11 @@
var/obj/item/clothing/suit/bluetag/S = M.wear_suit
if(S.lasertag_health <= 1)
M.Weaken(5)
to_chat(M,"<span class='warning'>You have been defeated!</span>")
to_chat(M,span_warning("You have been defeated!"))
S.lasertag_health = initial(S.lasertag_health)
else
S.lasertag_health--
to_chat(M,"<span class='warning'>Danger! You have [num2text(S.lasertag_health)] hits remaining!</span>")
to_chat(M,span_warning("Danger! You have [num2text(S.lasertag_health)] hits remaining!"))
return 1
/obj/item/projectile/beam/lasertag/omni//A laser tag bolt that stuns EVERYONE
@@ -561,7 +561,7 @@
pulse.anchored = TRUE
spawn(20)
qdel(pulse)
to_chat(target, "<span class='notice'>As the beam strikes you, your injuries close up!</span>")
to_chat(target, span_notice("As the beam strikes you, your injuries close up!"))
M.adjustBruteLoss(-15)
M.adjustFireLoss(-15)
M.adjustToxLoss(-5)

View File

@@ -66,7 +66,7 @@
if(prob(chance))
if(A.opacity)
//display a message so that people on the other side aren't so confused
A.visible_message("<span class='warning'>\The [src] pierces through \the [A]!</span>")
A.visible_message(span_warning("\The [src] pierces through \the [A]!"))
return 1
return 0

View File

@@ -92,10 +92,10 @@
else
new_mob.key = M.key
to_chat(new_mob, "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>")
to_chat(new_mob, span_warning("Your form morphs into that of \a [lowertext(randomize)]."))
qdel(M)
return
else
to_chat(M, "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>")
to_chat(M, span_warning("Your form morphs into that of \a [lowertext(randomize)]."))
return

View File

@@ -46,7 +46,7 @@
//snap pop
playsound(src, 'sound/effects/snap.ogg', 50, 1)
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
src.visible_message(span_warning("\The [src] explodes in a bright flash!"))
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(2, 1, T)
@@ -243,7 +243,7 @@
/obj/item/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M)
to_chat(M, "<span class='danger'>You hear a loud roar.</span>")
to_chat(M, span_danger("You hear a loud roar."))
playsound(src, 'sound/effects/bang.ogg', 50, 1)
var/ear_safety = 0
ear_safety = M.get_ear_protection()
@@ -258,14 +258,14 @@
M.ear_deaf = max(M.ear_deaf,15)
M.deaf_loop.start() // CHOMPStation Add: Ear Ringing/Deafness
if (M.ear_damage >= 15)
to_chat(M, "<span class='danger'>Your ears start to ring badly!</span>")
to_chat(M, span_danger("Your ears start to ring badly!"))
if (prob(M.ear_damage - 5))
to_chat(M, "<span class='danger'>You can't hear anything!</span>")
to_chat(M, span_danger("You can't hear anything!"))
M.sdisabilities |= DEAF
M.deaf_loop.start() // CHOMPStation Add: Ear Ringing/Deafness
else
if (M.ear_damage >= 5)
to_chat(M, "<span class='danger'>Your ears start to ring!</span>")
to_chat(M, span_danger("Your ears start to ring!"))
M.update_icons() //Just to apply matrix transform for laying asap
/obj/item/projectile/energy/plasmastun/on_hit(var/atom/target)

View File

@@ -90,7 +90,7 @@
turfs += T
if(turfs.len)
var/turf/target = pick(turfs)
visible_message("<span class='danger'>[H]'s [W] goes off due to \the [src]!</span>")
visible_message(span_danger("[H]'s [W] goes off due to \the [src]!"))
return W.afterattack(target,H)
if(!(H.species.flags & NO_SLIP) && prob(50))
@@ -98,9 +98,9 @@
H.apply_effect(3, WEAKEN, armor_check)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(armor_check < 60)
visible_message("<span class='danger'>\The [src] has pushed [H]!</span>")
visible_message(span_danger("\The [src] has pushed [H]!"))
else
visible_message("<span class='warning'>\The [src] attempted to push [H]!</span>")
visible_message(span_warning("\The [src] attempted to push [H]!"))
return
else
@@ -111,7 +111,7 @@
for(var/obj/item/I in holding)
if(I)
H.drop_from_inventory(I)
visible_message("<span class='danger'>\The [src] has disarmed [H]!</span>")
visible_message(span_danger("\The [src] has disarmed [H]!"))
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
@@ -151,7 +151,7 @@
spawn(2)
playsound(target, crack_sound, 40, 1)
visible_message("<span class='notice'>\The [T] is snatched by \the [src]!</span>")
visible_message(span_notice("\The [T] is snatched by \the [src]!"))
T.throw_at(get_turf(firer), 7, 1, src)
success = TRUE
else if(isliving(target) && !done_mob_unique)
@@ -163,12 +163,12 @@
if(message == "slaps")
spawn(1)
playsound(src, 'sound/effects/snap.ogg', 50, 1)
visible_message("<span class='notice'>\The [src] [message] [target].</span>")
visible_message(span_notice("\The [src] [message] [target]."))
done_mob_unique = TRUE
success = TRUE
if(I_HURT)
if(prob(10) && istype(L, /mob/living/carbon/human))
to_chat(L, "<span class='warning'>\The [src] rips at your hands!</span>")
to_chat(L, span_warning("\The [src] rips at your hands!"))
ranged_disarm(L)
success = TRUE
done_mob_unique = TRUE
@@ -176,7 +176,7 @@
if(prob(disarm_chance) && istype(L, /mob/living/carbon/human))
ranged_disarm(L)
else
L.visible_message("<span class='danger'>\The [src] sends \the [L] stumbling backwards.</span>")
L.visible_message(span_danger("\The [src] sends \the [L] stumbling backwards."))
L.throw_at(get_turf(get_step(L,get_dir(firer,L))), 1, 1, src)
done_mob_unique = TRUE
success = TRUE
@@ -184,7 +184,7 @@
var/turf/STurf = get_turf(L)
spawn(2)
playsound(STurf, crack_sound, 60, 1)
L.visible_message("<span class='critical'>\The [src] rips [L] towards \the [firer]!</span>")
L.visible_message(span_critical("\The [src] rips [L] towards \the [firer]!"))
L.throw_at(get_turf(get_step(firer,get_dir(firer,L))), 6, 1, src)
done_mob_unique = TRUE
success = TRUE

View File

@@ -118,10 +118,10 @@
/obj/item/projectile/bullet/magnetic/fuelrod/on_impact(var/atom/A) //Future-proofing, again. In the event new fuel rods are introduced, and have special effects for when they stop flying.
if(src.loc)
if(detonate_travel && detonate_mob)
visible_message("<span class='warning'>\The [src] shatters in a violent explosion!</span>")
visible_message(span_warning("\The [src] shatters in a violent explosion!"))
explosion(src.loc, 1, 1, 3, 4)
else if(detonate_travel)
visible_message("<span class='warning'>\The [src] explodes in a shower of embers!</span>")
visible_message(span_warning("\The [src] explodes in a shower of embers!"))
explosion(src.loc, -1, 1, 2, 3)
..(A)
@@ -164,7 +164,7 @@
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //You cannot touch the supermatter without disentigrating. Assumedly, this is true for condensed rods of it flying at relativistic speeds.
if(istype(target,/turf/simulated/wall) || istype(target,/mob/living))
target.visible_message("<span class='danger'>The [src] burns a perfect hole through \the [target] with a blinding flash!</span>")
target.visible_message(span_danger("The [src] burns a perfect hole through \the [target] with a blinding flash!"))
playsound(target, 'sound/effects/teleport.ogg', 40, 0)
return ..(target, blocked, def_zone)
@@ -201,4 +201,4 @@
explosion(A, -1, -1, 1, 3)
return ..()
else
..()
..()

View File

@@ -279,7 +279,7 @@
if(isturf(target.loc))
var/obj/effect/spider/stickyweb/W = locate() in get_turf(target)
if(!W && prob(75))
visible_message("<span class='danger'>\The [src] splatters a layer of web on \the [target]!</span>")
visible_message(span_danger("\The [src] splatters a layer of web on \the [target]!"))
new /obj/effect/spider/stickyweb(target.loc)
..()
@@ -339,17 +339,17 @@
target_limb.dislocate()
if(armor_special > 1)
target.visible_message("<span class='cult'>\The [src] slams into \the [target]'s [target_limb], reverberating loudly!</span>")
target.visible_message(span_cult("\The [src] slams into \the [target]'s [target_limb], reverberating loudly!"))
else if(armor_special)
target.visible_message("<span class='cult'>\The [src] slams into \the [target]'s [target_limb] with a low rumble!</span>")
target.visible_message(span_cult("\The [src] slams into \the [target]'s [target_limb] with a low rumble!"))
..()
/obj/item/projectile/beam/tungsten/on_impact(var/atom/A)
if(istype(A,/turf/simulated/shuttle/wall) || istype(A,/turf/simulated/wall) || (istype(A,/turf/simulated/mineral) && A.density) || istype(A,/obj/mecha) || istype(A,/obj/machinery/door))
var/blast_dir = src.dir
A.visible_message("<span class='danger'>\The [A] begins to glow!</span>")
A.visible_message(span_danger("\The [A] begins to glow!"))
spawn(2 SECONDS)
var/blastloc = get_step(A, blast_dir)
if(blastloc)