converts our spans (#9185)

This commit is contained in:
Kashargul
2024-10-07 20:47:23 +02:00
committed by GitHub
parent f4155aa973
commit a92a42b85b
162 changed files with 1360 additions and 1269 deletions
@@ -87,9 +87,9 @@ rborosilicate = 12
var/amount_to_use = min(S.amount, maxsheets)
S.use(amount_to_use)
stored_matter += value*amount_to_use
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into [src]. </span>")
to_chat(user, span_notice("You insert [amount_to_use] [S.name] sheets into [src]. "))
return 1
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into [src]!</span>")
to_chat(user, span_warning("You can't insert any more [S.name] sheets into [src]!"))
return 0
/obj/item/rcd/attack_self(mob/living/user)
@@ -242,7 +242,7 @@ rborosilicate = 12
else
return
playsound(src, 'sound/effects/pop.ogg', 50, FALSE)
to_chat(user, "<span class='notice'>You change RCD's mode to '[choice]'.</span>")
to_chat(user, span_notice("You change RCD's mode to '[choice]'."))
/obj/item/rcd/proc/get_airlock_image(airlock_type)
var/obj/machinery/door/airlock/proto = airlock_type
@@ -385,17 +385,17 @@ rborosilicate = 12
t1 += "<a href='?src=[REF(src)];access=all'>Remove All</a><br>"
var/accesses = ""
accesses += "<div align='center'><b>Access</b></div>"
accesses += "<div align='center'>" + span_bold("Access") + "</div>"
accesses += "<table style='width:100%'>"
accesses += "<tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%'><b>[get_region_accesses_name(i)]:</b></td>"
accesses += "<td style='width:14%'>" + span_bold("[get_region_accesses_name(i)]:") + "</td>"
accesses += "</tr><tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in conf_access)
accesses += "<a href='?src=[REF(src)];access=[A]'><font color=\"red\">[replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
accesses += "<a href='?src=[REF(src)];access=[A]'>" + span_red("[replacetext(get_access_desc(A), " ", "&nbsp")]") + "</a> "
else
accesses += "<a href='?src=[REF(src)];access=[A]'>[replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
accesses += "<br>"
@@ -21,7 +21,7 @@
formatted_desc = replacetext(in_gut.desc, "%belly", lowertext(in_gut.name)) //replace with this belly's name
formatted_desc = replacetext(formatted_desc, "%pred", in_gut.owner) //replace with this belly's owner
formatted_desc = replacetext(formatted_desc, "%prey", contained) //replace with whatever mob entered into this belly
to_chat(contained, "<span class='notice'><B>[formatted_desc]</B></span>")
to_chat(contained, span_boldnotice("[formatted_desc]"))
/obj/item/capture_crystal/exit_belly()
for(var/mob/living/contained in src.contents)
@@ -102,7 +102,7 @@
/* // Disabled (and untested) for now, left to make it easier if we want to enable this later.
if(in_gut.disable_hud)
if(contained?.hud_used?.hud_shown)
to_chat(contained, "<span class='notice'>((Your pred has disabled huds in their belly. Turn off vore FX and hit F12 to get it back; or relax, and enjoy the serenity.))</span>")
to_chat(contained, span_notice("((Your pred has disabled huds in their belly. Turn off vore FX and hit F12 to get it back; or relax, and enjoy the serenity.))"))
contained.toggle_hud_vis(TRUE) */
// Inelegant copy-pasta since I can't steal the proc from bellies.
@@ -136,14 +136,14 @@
/obj/item/capture_crystal/loadout/attack(mob/living/M, mob/living/user)
if(!bound_mob && M != user)
to_chat(user, "<span class='notice'>\The [src] emits an unpleasant tone...</span>")
to_chat(user, span_notice("\The [src] emits an unpleasant tone..."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
return
. = ..()
/obj/item/capture_crystal/loadout/attack_self(mob/living/user)
if(!bound_mob)
to_chat(user, "<span class='notice'>\The [src] emits an unpleasant tone... It is not ready yet.</span>")
to_chat(user, span_notice("\The [src] emits an unpleasant tone... It is not ready yet."))
playsound(src, 'sound/effects/capture-crystal-problem.ogg', 75, 1, -1)
return
. = ..()
@@ -160,12 +160,12 @@
//The basic capture command does most of the registration work.
/obj/item/capture_crystal/cheap/capture(mob/living/M, mob/living/U)
if(!M.capture_crystal || M.capture_caught)
to_chat(U, "<span class='warning'>This creature is not suitable for capture with this crystal.</span>")
to_chat(U, span_warning("This creature is not suitable for capture with this crystal."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
return
knowyoursignals(M, U)
if(isanimal(M) || !M.client)
to_chat(U, "<span class='warning'>This creature is not suitable for capture.</span>")
to_chat(U, span_warning("This creature is not suitable for capture."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
return
owner = U
@@ -178,7 +178,7 @@
/obj/item/capture_crystal/cheap/activate(mob/living/user, target)
if(!cooldown_check()) //Are we ready to do things yet?
to_chat(thrower, "<span class='notice'>\The [src] clicks unsatisfyingly... It is not ready yet.</span>")
to_chat(thrower, span_notice("\The [src] clicks unsatisfyingly... It is not ready yet."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
return
if(spawn_mob_type && !bound_mob) //We don't already have a mob, but we know what kind of mob we want
@@ -201,31 +201,31 @@
last_activate = world.time
if(M.capture_caught) //Can't capture things that were already caught.
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
to_chat(user, "<span class='notice'>\The [src] clicks unsatisfyingly... \The [M] is already under someone else's control.</span>")
to_chat(user, span_notice("\The [src] clicks unsatisfyingly... \The [M] is already under someone else's control."))
return
else if(M.stat == DEAD) //Is it dead? We can't influence dead things.
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
to_chat(user, "<span class='notice'>\The [src] clicks unsatisfyingly... \The [M] is not in a state to be captured.</span>")
to_chat(user, span_notice("\The [src] clicks unsatisfyingly... \The [M] is not in a state to be captured."))
return
else if(M.client) //Is it player controlled?
capture_player(M, user) //We have to do things a little differently if so.
return
else if(!isanimal(M)) //So it's not player controlled, but it's also not a simplemob?
to_chat(user, "<span class='warning'>This creature is not suitable for capture.</span>")
to_chat(user, span_warning("This creature is not suitable for capture."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
return
var/mob/living/simple_mob/S = M
if(!S.ai_holder) //We don't really want to capture simplemobs that don't have an AI
to_chat(user, "<span class='warning'>This creature is not suitable for capture.</span>")
to_chat(user, span_warning("This creature is not suitable for capture."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
else //Shoot, it didn't work and now it's mad!!!
S.ai_holder.go_wake()
S.ai_holder.give_target(user, urgent = TRUE)
user.visible_message("\The [src] bonks into \the [S], angering it!")
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
to_chat(user, "<span class='notice'>\The [src] clicks unsatisfyingly.</span>")
to_chat(user, span_notice("\The [src] clicks unsatisfyingly."))
update_icon()
return
//The target is not a mob, so let's not do anything.
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
to_chat(user, "<span class='notice'>\The [src] clicks unsatisfyingly.</span>")
to_chat(user, span_notice("\The [src] clicks unsatisfyingly."))
@@ -38,12 +38,12 @@
item_state = "[base_state]on"
playsound(src, activation_sound, 75, 1)
if(prob(50))
user.visible_message("<span class='rose'>[user] safely activates the [src] with a push of a button!</span>")
user.visible_message(span_rose("[user] safely activates the [src] with a push of a button!"))
else
if(prob(95))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to excite the supermatter within the [src].</span>")
user.visible_message(span_notice("After a few attempts, [user] manages to excite the supermatter within the [src]."))
else // Just like the cheap lighter, this time you can shock/burn yourself a little on the hardlight shield
to_chat(user, "<span class='warning'>You hurt yourself on the shielding!</span>")
to_chat(user, span_warning("You hurt yourself on the shielding!"))
if (user.get_left_hand() == src)
user.apply_damage(1,SEARING,"l_hand")
user.apply_damage(2,ELECTROCUTE,"l_hand")
@@ -54,7 +54,7 @@
user.apply_damage(2,ELECTROCUTE,"r_hand")
user.apply_damage(3,CLONE,"r_hand")
user.apply_damage(4,ELECTROMAG,"r_hand")
user.visible_message("<span class='notice'>After a few attempts, [user] manages to activate the [src], they however sting themselves on the shielding!</span>")
user.visible_message(span_notice("After a few attempts, [user] manages to activate the [src], they however sting themselves on the shielding!"))
set_light(2)
START_PROCESSING(SSobj, src)
@@ -64,9 +64,9 @@
item_state = "[base_state]"
playsound(src, deactivation_sound, 75, 1)
if(istype(src, /obj/item/flame/lighter/supermatter) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts the [src] without even looking at what they're doing.</span>")
user.visible_message(span_rose("You hear a quiet click, as [user] shuts the [src] without even looking at what they're doing."))
else
user.visible_message("<span class='notice'>[user] quietly shuts the [src].</span>")
user.visible_message(span_notice("[user] quietly shuts the [src]."))
set_light(0)
STOP_PROCESSING(SSobj, src)
@@ -87,9 +87,9 @@
cig.attackby(src, user)
else
if(istype(src, /obj/item/flame/lighter/supermatter))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M].</span>")
cig.light(span_rose("[user] whips the [name] out and holds it for [M]."))
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
cig.light(span_notice("[user] holds the [name] out for [M], and lights the [cig.name]."))
else
..()
@@ -109,12 +109,12 @@
item_state = "[base_state]on"
playsound(src, activation_sound, 75, 1)
if(prob(50))
user.visible_message("<span class='rose'>[user] safely activates the [src] with a push of a button!</span>")
user.visible_message(span_rose("[user] safely activates the [src] with a push of a button!"))
else
if(prob(95))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to excite the supermatter within the [src].</span>")
user.visible_message(span_notice("After a few attempts, [user] manages to excite the supermatter within the [src]."))
else // Just like with the cheap lighter, but this time you can hurt yourself on the heated phoron field
to_chat(user, "<span class='warning'>You singe yourself on the phoron shielding the excited supermatter!</span>")
to_chat(user, span_warning("You singe yourself on the phoron shielding the excited supermatter!"))
if (user.get_left_hand() == src)
user.apply_damage(30,HALLOSS,"l_hand")
user.apply_effect(20,IRRADIATE)
@@ -125,7 +125,7 @@
user.apply_effect(20,IRRADIATE)
user.apply_damage(5,BURN,"r_hand")
user.apply_damage(5,ELECTROCUTE,"r_hand")
user.visible_message("<span class='notice'>After a few attempts, [user] manages to activate the [src], they however burn themselves with the heated phoron field!</span>")
user.visible_message(span_notice("After a few attempts, [user] manages to activate the [src], they however burn themselves with the heated phoron field!"))
set_light(2)
START_PROCESSING(SSobj, src)
@@ -135,9 +135,9 @@
item_state = "[base_state]"
playsound(src, deactivation_sound, 75, 1)
if(istype(src, /obj/item/flame/lighter/supermatter/syndismzippo) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts the [src] without even looking at what they're doing.</span>")
user.visible_message(span_rose("You hear a quiet click, as [user] shuts the [src] without even looking at what they're doing."))
else
user.visible_message("<span class='notice'>[user] quietly shuts the [src].</span>")
user.visible_message(span_notice("[user] quietly shuts the [src]."))
set_light(0)
STOP_PROCESSING(SSobj, src)
@@ -158,9 +158,9 @@
cig.attackby(src, user)
else
if(istype(src, /obj/item/flame/lighter/supermatter/syndismzippo))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M].</span>")
cig.light(span_rose("[user] whips the [name] out and holds it for [M]."))
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
cig.light(span_notice("[user] holds the [name] out for [M], and lights the [cig.name]."))
else
..()
@@ -182,15 +182,15 @@
var/i = rand(1, 100)
switch(i)
if(1 to 22)
to_chat(user, "<span class='rose'>[user] safely reveals the supermatter shard within the [src]!</span>")
user.visible_message("<span class='rose'>You safely revealed the supermatter shard within the [src]!</span>")
to_chat(user, span_rose("[user] safely reveals the supermatter shard within the [src]!"))
user.visible_message(span_rose("You safely revealed the supermatter shard within the [src]!"))
if (user.get_left_hand() == src)
user.apply_damage(1, IRRADIATE, "l_hand")
else // Even using this safely will irradiate you a tiny tiny bit.
user.apply_damage(1, IRRADIATE, "r_hand")
if(23 to 33)
to_chat(user, "<span class='warning'>[user]'s hand slipped and they brush against the supermatter within [src]!</span>")
user.visible_message("<span class='notice'>You accidentally grazed your hand across the supermatter!</span>")
to_chat(user, span_warning("[user]'s hand slipped and they brush against the supermatter within [src]!"))
user.visible_message(span_notice("You accidentally grazed your hand across the supermatter!"))
if (user.get_left_hand() == src)
user.apply_damage(10, IRRADIATE, "l_hand")
user.apply_damage(20, BURN, "l_hand")
@@ -202,8 +202,8 @@
user.apply_damage(20, ELECTROCUTE, "r_hand")
user.apply_damage(50, AGONY, "r_hand")
if(34 to 44)
to_chat(user, "<span class='warning'>[user] burned themselves on the [src]!</span>")
user.visible_message("<span class='notice'>You accidentally burn yourself on the [src]!</span>")
to_chat(user, span_warning("[user] burned themselves on the [src]!"))
user.visible_message(span_notice("You accidentally burn yourself on the [src]!"))
if (user.get_left_hand() == src)
user.apply_damage(30, IRRADIATE, "l_hand")
user.apply_damage(20, SEARING, "l_hand")
@@ -213,8 +213,8 @@
user.apply_damage(20, SEARING, "r_hand")
user.apply_damage(15, BURN, "r_hand")
if(45 to 55)
to_chat(user, "<span class='warning'>[user] fumbled the [src] and the supermatter let out sparks!</span>")
user.visible_message("<span class='notice'>You fumble the [src], letting the supermatter spark as the case opens!</span>")
to_chat(user, span_warning("[user] fumbled the [src] and the supermatter let out sparks!"))
user.visible_message(span_notice("You fumble the [src], letting the supermatter spark as the case opens!"))
if (user.get_left_hand() == src)
user.apply_damage(1, ELECTROCUTE, "l_hand")
user.apply_damage(100, ELECTROMAG, "l_hand")
@@ -222,8 +222,8 @@
user.apply_damage(1, ELECTROCUTE, "r_hand")
user.apply_damage(100, ELECTROMAG, "r_hand")
if(56 to 66)
to_chat(user, "<span class='warning'>[user] struggles to open their [src], but when they do they get burned by the extreme heat within!</span>")
user.visible_message("<span class='notice'>You struggle to get the case to open, and when it does the heat that pours out of the [src] burns!</span>")
to_chat(user, span_warning("[user] struggles to open their [src], but when they do they get burned by the extreme heat within!"))
user.visible_message(span_notice("You struggle to get the case to open, and when it does the heat that pours out of the [src] burns!"))
if (user.get_left_hand() == src)
user.apply_damage(1, IRRADIATE, "l_hand")
user.apply_damage(1, BRUISE, "l_hand")
@@ -235,8 +235,8 @@
user.apply_damage(200, BURN, "r_hand")
user.drop_r_hand()
if(67 to 77)
to_chat(user, "<span class='warning'>Ouch! While pushing on the release to open the [src], [user]'s finger slipped right as the case opened, pressing their finger firm against the supermatter!</span>")
user.visible_message("<span class='notice'>You accidentally pushed your finger against the supermatter!</span>")
to_chat(user, span_warning("Ouch! While pushing on the release to open the [src], [user]'s finger slipped right as the case opened, pressing their finger firm against the supermatter!"))
user.visible_message(span_notice("You accidentally pushed your finger against the supermatter!"))
if (user.get_left_hand() == src)
user.apply_damage(50, HALLOSS, "l_hand")
user.apply_damage(40, IRRADIATE, "l_hand")
@@ -256,8 +256,8 @@
user.apply_effect(15, SLUR)
user.apply_effect(5, STUN)
if(78 to 88)
to_chat(user, "<span class='notice'>[user] managed to pinch themselves on the case of their [src]... it could have been worse.</span>")
user.visible_message("<span class='notice'>You manage to pinch yourself on the case!</span>")
to_chat(user, span_notice("[user] managed to pinch themselves on the case of their [src]... it could have been worse."))
user.visible_message(span_notice("You manage to pinch yourself on the case!"))
if (user.get_left_hand() == src)
user.apply_damage(1, CLONE, "l_hand")
user.apply_damage(1, HALLOSS, "l_hand")
@@ -265,8 +265,8 @@
user.apply_damage(1, CLONE, "r_hand")
user.apply_damage(1, HALLOSS, "r_hand")
if(89 to 99)
to_chat(user, "<span class='notice'>[user] opened the [src] but forgot that you aren't supposed to look at supermatter!</span>")
user.visible_message("<span class='notice'>You find yourself looking at the supermatter for longer than you should...</span>")
to_chat(user, span_notice("[user] opened the [src] but forgot that you aren't supposed to look at supermatter!"))
user.visible_message(span_notice("You find yourself looking at the supermatter for longer than you should..."))
if (user.get_left_hand() == src)
user.apply_damage(15, HALLOSS, "l_hand")
user.apply_effect(5, WEAKEN)
@@ -284,8 +284,8 @@
user.apply_damage(15, OXY)
user.eye_blurry = 10
if(100) // This is the part that makes it admin only for the moment, it spawns 500 rads from the carbon's position, and dusts the carbon instantly. It does also drop everything unlike the supermatter crystal though, so hopefully you won't lose any items if you fumble this badly!
to_chat(user, "<span class='warning'>OH NO! [user] almost dropped their live [src]! Thank goodness they caught it... by the glowing yellow crystal... oh.</span>")
user.visible_message("<span class='danger'>You almost dropped your [src], thank goodness you caught it! By the glowing crystal within. You find your ears filled with unearthly ringing and your last thought is \"Oh, fuck.\"</span>")
to_chat(user, span_warning("OH NO! [user] almost dropped their live [src]! Thank goodness they caught it... by the glowing yellow crystal... oh."))
user.visible_message(span_danger("You almost dropped your [src], thank goodness you caught it! By the glowing crystal within. You find your ears filled with unearthly ringing and your last thought is \"Oh, fuck.\""))
user.drop_r_hand() // To ensure the lighter is dropped <3
user.drop_l_hand() // To ensure the lighter is dropped <3
for(var/obj/item/e in user)
@@ -303,9 +303,9 @@
item_state = "[base_state]"
playsound(src, deactivation_sound, 75, 1)
if (istype(src, /obj/item/flame/lighter/supermatter/expsmzippo))
user.visible_message("<span class='rose'>You hear a quiet click, as [user] closes the [src].</span>")
user.visible_message(span_rose("You hear a quiet click, as [user] closes the [src]."))
else
user.visible_message("<span class='notice'>[user] quietly shuts the [src].</span>")
user.visible_message(span_notice("[user] quietly shuts the [src]."))
set_light(0)
STOP_PROCESSING(SSobj, src)
@@ -324,9 +324,9 @@
cig.attackby(src, user)
else
if (istype(src, /obj/item/flame/lighter/supermatter/expsmzippo))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M].</span>")
cig.light(span_rose("[user] whips the [name] out and holds it for [M]."))
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
cig.light(span_notice("[user] holds the [name] out for [M], and lights the [cig.name]."))
else
..()