[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

@@ -233,7 +233,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
return B
/obj/structure/blob/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
visible_message(span_danger("[user] [attack_verb] the [src]!"))
playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
user.do_attack_animation(src)
if(overmind)
@@ -260,7 +260,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
return FALSE
H.do_attack_animation(src)
H.visible_message("<span class='danger'>[H] strikes \the [src]!</span>")
H.visible_message(span_danger("[H] strikes \the [src]!"))
var/real_damage = rand(3,6)
var/hit_dam_type = attack.damage_type
@@ -319,7 +319,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
/obj/structure/blob/attackby(var/obj/item/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
visible_message("<span class='danger'>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]</span>")
visible_message(span_danger("\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]"))
var/damage = W.force
switch(W.damtype)
if(BURN, BIOACID, ELECTROCUTE, OXY)

View File

@@ -86,10 +86,10 @@
/obj/item/blobcore_chunk/attack_self(var/mob/user)
if(blob_type && world.time > active_ability_cooldown + last_active_use)
last_active_use = world.time
to_chat(user, "<span class='alien'>[icon2html(src, user.client)] \The [src] gesticulates.</span>")
to_chat(user, span_alien("[icon2html(src, user.client)] \The [src] gesticulates."))
blob_type.on_chunk_use(src, user)
else
to_chat(user, "<span class='notice'>\The [src] doesn't seem to respond.</span>")
to_chat(user, span_notice("\The [src] doesn't seem to respond."))
..()
/obj/item/blobcore_chunk/process()
@@ -102,9 +102,9 @@
should_tick = !should_tick
if(should_tick)
to_chat(user, "<span class='alien'>\The [src] shudders with life.</span>")
to_chat(user, span_alien("\The [src] shudders with life."))
else
to_chat(user, "<span class='alien'>\The [src] stills, returning to a death-like state.</span>")
to_chat(user, span_alien("\The [src] stills, returning to a death-like state."))
/obj/item/blobcore_chunk/proc/regen(var/newfaction = null)
if(istype(blob_type))
@@ -133,10 +133,10 @@
/decl/chemical_reaction/instant/blob_reconstitution/on_reaction(var/datum/reagents/holder)
var/obj/item/blobcore_chunk/chunk = holder.my_atom
if(chunk.can_genesis && chunk.regen())
chunk.visible_message("<span class='notice'>[chunk] bubbles, surrounding itself with a rapidly expanding mass of [chunk.blob_type.name]!</span>")
chunk.visible_message(span_notice("[chunk] bubbles, surrounding itself with a rapidly expanding mass of [chunk.blob_type.name]!"))
chunk.can_genesis = FALSE
else
chunk.visible_message("<span class='warning'>[chunk] shifts strangely, but falls still.</span>")
chunk.visible_message(span_warning("[chunk] shifts strangely, but falls still."))
/decl/chemical_reaction/instant/blob_reconstitution/domination
name = "Allied Blob Revival"
@@ -148,7 +148,7 @@
/decl/chemical_reaction/instant/blob_reconstitution/domination/on_reaction(var/datum/reagents/holder)
var/obj/item/blobcore_chunk/chunk = holder.my_atom
if(chunk.can_genesis && chunk.regen("neutral"))
chunk.visible_message("<span class='notice'>[chunk] bubbles, surrounding itself with a rapidly expanding mass of [chunk.blob_type.name]!</span>")
chunk.visible_message(span_notice("[chunk] bubbles, surrounding itself with a rapidly expanding mass of [chunk.blob_type.name]!"))
chunk.can_genesis = FALSE
else
chunk.visible_message("<span class='warning'>[chunk] shifts strangely, but falls still.</span>")
chunk.visible_message(span_warning("[chunk] shifts strangely, but falls still."))

View File

@@ -42,7 +42,7 @@
factory = null
if(infested)
infested.forceMove(get_turf(src))
visible_message("<span class='warning'>\The [infested] falls to the ground as the blob spore bursts.</span>")
visible_message(span_warning("\The [infested] falls to the ground as the blob spore bursts."))
infested = null
return ..()
@@ -103,8 +103,8 @@
infested = H
update_icons()
visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
visible_message(span_warning("The corpse of [H.name] suddenly rises!"))
/mob/living/simple_mob/hostile/blob/spore/GetIdCard()
if(infested) // If we've infested someone, use their ID.
return infested.GetIdCard()
return infested.GetIdCard()

View File

@@ -119,7 +119,7 @@ var/list/overminds = list()
if(message)
client.handle_spam_prevention(MUTE_IC)
if((client.prefs.muted & MUTE_IC) || say_disabled)
to_chat(src, "<span class='warning'>You cannot speak in IC (Muted).</span>")
to_chat(src, span_warning("You cannot speak in IC (Muted)."))
return
//These will contain the main receivers of the message

View File

@@ -1,6 +1,6 @@
/mob/observer/blob/proc/can_buy(cost = 15)
if(blob_points < cost)
to_chat(src, "<span class='warning'>You cannot afford this, you need at least [cost] resources!</span>")
to_chat(src, span_warning("You cannot afford this, you need at least [cost] resources!"))
return FALSE
add_points(-cost)
return TRUE
@@ -19,20 +19,20 @@
var/obj/structure/blob/B = (locate(/obj/structure/blob) in T)
if(!B)
to_chat(src, "<span class='warning'>There is no blob here!</span>")
to_chat(src, span_warning("There is no blob here!"))
return
if(B.overmind != src)
to_chat(src, span_warning("This blob isn't controlled by you."))
if(!istype(B, /obj/structure/blob/normal))
to_chat(src, "<span class='warning'>Unable to use this blob, find a normal one.</span>")
to_chat(src, span_warning("Unable to use this blob, find a normal one."))
return
if(nearEquals)
for(var/obj/structure/blob/L in orange(nearEquals, T))
if(L.type == blobType)
to_chat(src, "<span class='warning'>There is a similar blob nearby, move more than [nearEquals] tiles away from it!</span>")
to_chat(src, span_warning("There is a similar blob nearby, move more than [nearEquals] tiles away from it!"))
return
if(!can_buy(price))
@@ -197,7 +197,7 @@
break
if(!B)
to_chat(src, "<span class='warning'>There is no blob cardinally adjacent to the target tile!</span>")
to_chat(src, span_warning("There is no blob cardinally adjacent to the target tile!"))
return
if(!can_buy(4))

View File

@@ -14,9 +14,9 @@
/datum/blob_type/classic/on_chunk_use(obj/item/blobcore_chunk/B, mob/living/user)
var/turf/T = get_turf(B)
to_chat(user, "<span class='alien'>\The [B] produces a soothing ooze!</span>")
to_chat(user, span_alien("\The [B] produces a soothing ooze!"))
T.visible_message("<span class='alium'>\The [B] shudders at \the [user]'s touch, before disgorging a disgusting ooze.</span>")
T.visible_message(span_alium("\The [B] shudders at \the [user]'s touch, before disgorging a disgusting ooze."))
for(var/turf/simulated/floor/F in view(2, T))
spawn()
@@ -34,4 +34,4 @@
blood.reagents.add_reagent("tricorlidaze", 5)
blood.update_icon()
return
return

View File

@@ -27,7 +27,7 @@
/datum/blob_type/ectoplasmic_horror/on_pulse(var/obj/structure/blob/B)
if(B.type == /obj/structure/blob && (locate(/obj/structure/blob/node) in oview(2, get_turf(B))))
B.visible_message("<span class='alien'>The [name] quakes, before hardening.</span>")
B.visible_message(span_alien("The [name] quakes, before hardening."))
new/obj/structure/blob/shield(get_turf(B), B.overmind)
qdel(B)
@@ -47,12 +47,12 @@
break
if(!beamtarget_exists && GetAnomalySusceptibility(L) >= 0.5)
B.visible_message("<span class='danger'>\The [B] lashes out at \the [L]!</span>")
B.visible_message(span_danger("\The [B] lashes out at \the [L]!"))
var/datum/beam/drain_beam = beam_origin.Beam(L, icon_state = "drain_life", time = 10 SECONDS)
active_beams |= drain_beam
spawn(9 SECONDS)
if(B && drain_beam)
B.visible_message("<span class='alien'>\The [B] siphons energy from \the [L]</span>")
B.visible_message(span_alien("\The [B] siphons energy from \the [L]"))
L.add_modifier(/datum/modifier/berserk_exhaustion, 60 SECONDS)
B.overmind.add_points(rand(10,30))
if(!QDELETED(drain_beam))
@@ -60,7 +60,7 @@
/datum/blob_type/ectoplasmic_horror/on_received_damage(var/obj/structure/blob/B, damage, damage_type)
if(prob(round(damage * 0.5)))
B.visible_message("<span class='alien'>\The [B] shimmers, distorting through some unseen dimension.</span>")
B.visible_message(span_alien("\The [B] shimmers, distorting through some unseen dimension."))
var/initial_alpha = B.alpha
spawn()
animate(B,alpha = initial_alpha, alpha = 10, time = 10)
@@ -94,12 +94,12 @@
break
if(!beamtarget_exists && GetAnomalySusceptibility(L) >= 0.5)
carrier.visible_message("<span class='danger'>[icon2html(B,viewers(carrier))] \The [B] lashes out at \the [L]!</span>")
carrier.visible_message(span_danger("[icon2html(B,viewers(carrier))] \The [B] lashes out at \the [L]!"))
var/datum/beam/drain_beam = carrier.Beam(L, icon_state = "drain_life", time = 10 SECONDS)
active_beams |= drain_beam
spawn(9 SECONDS)
if(B && drain_beam)
carrier.visible_message("<span class='alien'>\The [B] siphons energy from \the [L]</span>")
carrier.visible_message(span_alien("\The [B] siphons energy from \the [L]"))
L.add_modifier(/datum/modifier/berserk_exhaustion, 30 SECONDS)
var/total_heal = 0

View File

@@ -33,7 +33,7 @@
var/obj/item/projectile/P = new spore_projectile(get_turf(B))
carrier.visible_message("<span class='danger'>\The [B] discharges energy toward \the [L]!</span>")
carrier.visible_message(span_danger("\The [B] discharges energy toward \the [L]!"))
P.launch_projectile(L, BP_TORSO, carrier)
return
return

View File

@@ -27,7 +27,7 @@
if(damage > 0)
var/reinforce_probability = min(damage, 70)
if(prob(reinforce_probability))
B.visible_message("<span class='danger'>The [name] quakes, before rapidly hardening!</span>")
B.visible_message(span_danger("The [name] quakes, before rapidly hardening!"))
new/obj/structure/blob/shield(get_turf(B), B.overmind)
qdel(B)
return ..()

View File

@@ -33,7 +33,7 @@
/datum/blob_type/fulminant_organism/on_death(obj/structure/blob/B)
if(prob(33)) // 33% chance to make a spore when dying.
var/mob/living/simple_mob/blob/spore/S = new spore_type(get_turf(B))
B.visible_message("<span class='danger'>\The [S] floats free from the [name]!</span>")
B.visible_message(span_danger("\The [S] floats free from the [name]!"))
if(istype(S))
S.overmind = B.overmind
S.faction = faction

View File

@@ -27,11 +27,11 @@
B.adjust_integrity(10)
else
B = new /obj/structure/blob/normal(T, S.overmind) // Otherwise spread it.
B.visible_message("<span class='danger'>\A [B] forms on \the [T] as \the [S] bursts!</span>")
B.visible_message(span_danger("\A [B] forms on \the [T] as \the [S] bursts!"))
/datum/blob_type/fungal_bloom/on_chunk_use(obj/item/blobcore_chunk/B, mob/living/user)
var/mob/living/simple_mob/blob/spore/S = new spore_type(get_turf(B))
S.faction = user.faction
S.blob_type = src
S.update_icons()
S.ai_holder.forget_everything()
S.ai_holder.forget_everything()

View File

@@ -37,7 +37,7 @@
T.wet_floor()
/datum/blob_type/pressurized_slime/on_death(obj/structure/blob/B)
B.visible_message("<span class='danger'>The blob ruptures, spraying the area with liquid!</span>")
B.visible_message(span_danger("The blob ruptures, spraying the area with liquid!"))
wet_surroundings(B, 50)
/datum/blob_type/pressurized_slime/proc/wet_surroundings(var/obj/structure/blob/B, var/probability = 50)
@@ -53,4 +53,4 @@
/datum/blob_type/pressurized_slime/on_chunk_use(obj/item/blobcore_chunk/B, mob/living/user) // Drenches you in water.
if(user)
user.ExtinguishMob()
user.fire_stacks = CLAMP(user.fire_stacks - 1, -25, 25)
user.fire_stacks = CLAMP(user.fire_stacks - 1, -25, 25)

View File

@@ -34,14 +34,14 @@
/datum/blob_type/ravenous_macrophage/on_death(obj/structure/blob/B)
var/obj/structure/blob/other = locate() in oview(2, B)
if(other)
B.visible_message("<span class='danger'>The dying mass is rapidly consumed by the nearby [other]!</span>")
B.visible_message(span_danger("The dying mass is rapidly consumed by the nearby [other]!"))
if(other.overmind)
other.overmind.add_points(rand(1,4))
/datum/blob_type/ravenous_macrophage/on_chunk_tick(obj/item/blobcore_chunk/B)
var/mob/living/L = locate() in range(world.view, B)
if(prob(5) && !L.stat) // There's some active living thing nearby, produce offgas.
B.visible_message("<span class='alien'>[icon2html(B,viewers(B))] \The [B] disgorches a cloud of noxious gas!</span>")
B.visible_message(span_alien("[icon2html(B,viewers(B))] \The [B] disgorches a cloud of noxious gas!"))
var/turf/T = get_turf(B)
var/datum/effect/effect/system/smoke_spread/noxious/BS = new /datum/effect/effect/system/smoke_spread/noxious
BS.attach(T)

View File

@@ -26,7 +26,7 @@
// Even if the melee attack is enough to one-shot this blob, it gets to retaliate at least once.
/datum/blob_type/reactive_spines/on_received_damage(var/obj/structure/blob/B, damage, damage_type, mob/living/attacker)
if(damage > 0 && attacker && get_dist(B, attacker) <= 1)
B.visible_message("<span class='danger'>The [name] retaliates, lashing out at \the [attacker]!</span>")
B.visible_message(span_danger("The [name] retaliates, lashing out at \the [attacker]!"))
B.blob_attack_animation(attacker, B.overmind)
attacker.blob_act(B)
return ..()
@@ -49,7 +49,7 @@
var/obj/item/projectile/P = new spore_projectile(get_turf(B))
carrier.visible_message("<span class='danger'>\The [B] fires a spine at \the [L]!</span>")
carrier.visible_message(span_danger("\The [B] fires a spine at \the [L]!"))
P.launch_projectile(L, BP_TORSO, carrier)
return

View File

@@ -58,7 +58,7 @@
var/obj/item/projectile/P = new spore_projectile(get_turf(B))
user.visible_message("<span class='danger'>[icon2html(B,viewers(user))] \The [B] discharges energy toward \the [L]!</span>")
user.visible_message(span_danger("[icon2html(B,viewers(user))] \The [B] discharges energy toward \the [L]!"))
P.launch_projectile(L, BP_TORSO, user)
return

View File

@@ -68,5 +68,5 @@
carrier.adjustFireLoss(-3 / nearby_mobs.len)
if(need_beam)
carrier.visible_message("<span class='alien'>[icon2html(B,viewers(carrier))] \The [B] sends noxious spores toward \the [victim]!</span>")
carrier.visible_message(span_alien("[icon2html(B,viewers(carrier))] \The [B] sends noxious spores toward \the [victim]!"))
carrier.Beam(victim, icon_state = "lichbeam", time = 2 SECONDS)

View File

@@ -36,10 +36,10 @@
if(I)
if((I.sharp || I.edge) && !istype(I, /obj/item/gun))
I.forceMove(get_turf(B)) // Disarmed entirely.
B.visible_message("<span class='danger'>The [name] heaves, \the [attacker]'s weapon becoming stuck in the churning mass!</span>")
B.visible_message(span_danger("The [name] heaves, \the [attacker]'s weapon becoming stuck in the churning mass!"))
else
I.throw_at(B, 2, 4) // Just yoinked.
B.visible_message("<span class='danger'>The [name] heaves, pulling \the [attacker]'s weapon from their hands!</span>")
B.visible_message(span_danger("The [name] heaves, pulling \the [attacker]'s weapon from their hands!"))
B.blob_attack_animation(attacker, B.overmind)
return ..()
@@ -48,7 +48,7 @@
var/damage = amount * 4
B.adjust_integrity(-(damage))
if(B && prob(damage))
B.visible_message("<span class='danger'>The [name] begins to crumble!</span>")
B.visible_message(span_danger("The [name] begins to crumble!"))
/datum/blob_type/volatile_alluvium/on_chunk_use(obj/item/blobcore_chunk/B, mob/living/user)
if(user)