The Great Spanning (#9320)

This PR get rid of all (most of) the span("thing", spans and replaces them with the SPAN_THING( variant, which has gained more popularity recently.
This commit is contained in:
Geeves
2020-07-12 15:53:28 +03:00
committed by GitHub
parent 29cfd74770
commit 33ad8096fb
260 changed files with 1527 additions and 1525 deletions
+1 -1
View File
@@ -106,7 +106,7 @@
haspen = W
to_chat(user, "<span class='notice'>You slot the pen into \the [src].</span>")
else
to_chat(user, span("notice", "This clipboard already has a pen!"))
to_chat(user, SPAN_NOTICE("This clipboard already has a pen!"))
/obj/item/clipboard/Topic(href, href_list)
..()
+22 -22
View File
@@ -91,14 +91,14 @@
/obj/item/paper/examine(mob/user)
..()
if (old_name && icon_state == "paper_plane")
to_chat(user, span("notice", "You're going to have to unfold it before you can read it."))
to_chat(user, SPAN_NOTICE("You're going to have to unfold it before you can read it."))
return
if(name != initial(name))
to_chat(user,"It's titled '[name]'.")
if(in_range(user, src) || isobserver(user))
show_content(usr)
else
to_chat(user, span("notice", "You have to go closer if you want to read it."))
to_chat(user, SPAN_NOTICE("You have to go closer if you want to read it."))
/obj/item/paper/proc/show_content(mob/user, forceshow)
@@ -115,7 +115,7 @@
set src in usr
if((usr.is_clumsy()) && prob(50))
to_chat(usr, span("warning", "You cut yourself on the paper."))
to_chat(usr, SPAN_WARNING("You cut yourself on the paper."))
return
var/n_name = sanitizeSafe(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text, MAX_NAME_LEN)
@@ -130,7 +130,7 @@
/obj/item/paper/attack_self(mob/living/user as mob)
if(user.a_intent == I_HURT)
if(icon_state == "scrap")
user.show_message(span("warning", "\The [src] is already crumpled."))
user.show_message(SPAN_WARNING("\The [src] is already crumpled."))
return
//crumple dat paper
info = stars(info,85)
@@ -142,10 +142,10 @@
if (user.a_intent == I_GRAB && icon_state != "scrap" && !istype(src, /obj/item/paper/carbon))
if (icon_state == "paper_plane")
user.show_message(span("alert", "The paper is already folded into a plane."))
user.show_message(SPAN_ALERT("The paper is already folded into a plane."))
return
user.visible_message(span("notice", "\The [user] carefully folds \the [src] into a plane."),
span("notice", "You carefully fold \the [src] into a plane."), "\The [user] folds \the [src] into a plane.")
user.visible_message(SPAN_NOTICE("\The [user] carefully folds \the [src] into a plane."),
SPAN_NOTICE("You carefully fold \the [src] into a plane."), "\The [user] folds \the [src] into a plane.")
playsound(src, 'sound/bureaucracy/paperfold.ogg', 50, 1)
icon_state = "paper_plane"
throw_range = 8
@@ -154,7 +154,7 @@
return
if (user.a_intent == I_HELP && old_name && icon_state == "paper_plane")
user.visible_message(span("notice", "\The [user] unfolds \the [src]."), span("notice", "You unfold \the [src]."), "You hear paper rustling.")
user.visible_message(SPAN_NOTICE("\The [user] unfolds \the [src]."), SPAN_NOTICE("You unfold \the [src]."), "You hear paper rustling.")
playsound(src, 'sound/bureaucracy/paperfold.ogg', 50, 1)
icon_state = initial(icon_state)
throw_range = initial(throw_range)
@@ -175,23 +175,23 @@
/obj/item/paper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
if(target_zone == BP_EYES)
user.visible_message(span("notice", "You show the paper to [M]."), \
span("notice", "[user] holds up a paper and shows it to [M]."))
user.visible_message(SPAN_NOTICE("You show the paper to [M]."), \
SPAN_NOTICE("[user] holds up a paper and shows it to [M]."))
M.examinate(src)
else if(target_zone == BP_MOUTH) // lipstick wiping
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H == user)
to_chat(user, span("notice", "You wipe off the lipstick with [src]."))
to_chat(user, SPAN_NOTICE("You wipe off the lipstick with [src]."))
H.lip_style = null
H.update_body()
else
user.visible_message(span("warning", "[user] begins to wipe [H]'s lipstick off with \the [src]."), \
span("notice", "You begin to wipe off [H]'s lipstick."))
user.visible_message(SPAN_WARNING("[user] begins to wipe [H]'s lipstick off with \the [src]."), \
SPAN_NOTICE("You begin to wipe off [H]'s lipstick."))
if(do_after(user, 10) && do_after(H, 10, 0)) //user needs to keep their active hand, H does not.
user.visible_message(span("notice", "[user] wipes [H]'s lipstick off with \the [src]."), \
span("notice", "You wipe off [H]'s lipstick."))
user.visible_message(SPAN_NOTICE("[user] wipes [H]'s lipstick off with \the [src]."), \
SPAN_NOTICE("You wipe off [H]'s lipstick."))
H.lip_style = null
H.update_body()
@@ -334,7 +334,7 @@
qdel(src)
else
to_chat(user, span("warning", "You must hold \the [P] steady to burn \the [src]."))
to_chat(user, SPAN_WARNING("You must hold \the [P] steady to burn \the [src]."))
/obj/item/paper/Topic(href, href_list)
@@ -347,7 +347,7 @@
//var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as message
if(free_space <= 0)
to_chat(usr, span("info", "There isn't enough space left on \the [src] to write anything."))
to_chat(usr, SPAN_INFO("There isn't enough space left on \the [src] to write anything."))
return
var/t = sanitize(input("Enter what you want to write:", "Write", null, null) as message, free_space, extra = 0)
@@ -396,7 +396,7 @@
if(fields > 50)//large amount of fields creates a heavy load on the server, see updateinfolinks() and addtofield()
to_chat(usr, span("warning", "Too many fields. Sorry, you can't do this."))
to_chat(usr, SPAN_WARNING("Too many fields. Sorry, you can't do this."))
fields = last_fields_value
return
@@ -428,7 +428,7 @@
if (istype(P, /obj/item/paper/carbon))
var/obj/item/paper/carbon/C = P
if (!C.iscopy && !C.copied)
to_chat(user, span("notice", "Take off the carbon copy first."))
to_chat(user, SPAN_NOTICE("Take off the carbon copy first."))
add_fingerprint(user)
return
var/obj/item/paper_bundle/B = new(src.loc)
@@ -465,7 +465,7 @@
src.forceMove(get_turf(h_user))
if(h_user.client) h_user.client.screen -= src
h_user.put_in_hands(B)
to_chat(user, span("notice", "You clip the [P.name] to [(src.name == "paper") ? "the paper" : src.name]."))
to_chat(user, SPAN_NOTICE("You clip the [P.name] to [(src.name == "paper") ? "the paper" : src.name]."))
src.forceMove(B)
B.pages.Add(src)
@@ -475,7 +475,7 @@
else if(P.ispen())
if(icon_state == "scrap")
to_chat(user, span("warning", "The [src] is too crumpled to write on."))
to_chat(user, SPAN_WARNING("The [src] is too crumpled to write on."))
return
var/obj/item/pen/robopen/RP = P
@@ -516,7 +516,7 @@
add_overlay(stampoverlay)
playsound(src, 'sound/bureaucracy/stamp.ogg', 50, 1)
to_chat(user, span("notice", "You stamp the paper with \the [P]."))
to_chat(user, SPAN_NOTICE("You stamp the paper with \the [P]."))
else if(P.isFlameSource())
burnpaper(P, user)
+12 -12
View File
@@ -25,8 +25,8 @@
playsound(loc, W.usesound, 50, 1)
anchored = !anchored
user.visible_message(
span("notice", anchored ? "\The [user] fastens \the [src] to \the [loc]." : "\The unfastens \the [src] from \the [loc]."),
span("notice", anchored ? "You fasten \the [src] to \the [loc]." : "You unfasten \the [src] from \the [loc]."),
SPAN_NOTICE(anchored ? "\The [user] fastens \the [src] to \the [loc]." : "\The unfastens \the [src] from \the [loc]."),
SPAN_NOTICE(anchored ? "You fasten \the [src] to \the [loc]." : "You unfasten \the [src] from \the [loc]."),
"You hear a ratchet."
)
return
@@ -38,10 +38,10 @@
paper_result = shred_amounts[shred_type]
if(paper_result)
if (!anchored)
to_chat(user, span("warning", "\The [src] must be anchored to the ground to operate!"))
to_chat(user, SPAN_WARNING("\The [src] must be anchored to the ground to operate!"))
return
if(paperamount == max_paper)
to_chat(user, span("warning", "\The [src] is full; please empty it before you continue."))
to_chat(user, SPAN_WARNING("\The [src] is full; please empty it before you continue."))
return
if (paper_result > 0)
paperamount += paper_result
@@ -55,9 +55,9 @@
flick("papershredder_on", src)
qdel(W)
playsound(src.loc, 'sound/bureaucracy/papershred.ogg', 75, 1)
to_chat(user, span("notice", "You shred the paper."))
to_chat(user, SPAN_NOTICE("You shred the paper."))
if(paperamount > max_paper)
to_chat(user, span("danger", "\The [src] was too full, and shredded paper goes everywhere!"))
to_chat(user, SPAN_DANGER("\The [src] was too full, and shredded paper goes everywhere!"))
for(var/i=(paperamount-max_paper);i>0;i--)
var/obj/item/shreddedp/SP = get_shredded_paper()
SP.forceMove(get_turf(src))
@@ -76,7 +76,7 @@
return
if(!paperamount)
to_chat(usr, span("notice", "\The [src] is empty."))
to_chat(usr, SPAN_NOTICE("\The [src] is empty."))
return
empty_bin(usr)
@@ -88,7 +88,7 @@
empty_into = null
if(empty_into && empty_into.contents.len >= empty_into.storage_slots)
to_chat(user, span("notice", "\The [empty_into] is full."))
to_chat(user, SPAN_NOTICE("\The [empty_into] is full."))
return
while(paperamount)
@@ -100,12 +100,12 @@
break
if(empty_into)
if(paperamount)
to_chat(user, span("notice", "You fill \the [empty_into] with as much shredded paper as it will carry."))
to_chat(user, SPAN_NOTICE("You fill \the [empty_into] with as much shredded paper as it will carry."))
else
to_chat(user, span("notice", "You empty \the [src] into \the [empty_into]."))
to_chat(user, SPAN_NOTICE("You empty \the [src] into \the [empty_into]."))
else
to_chat(user, span("notice", "You empty \the [src]."))
to_chat(user, SPAN_NOTICE("You empty \the [src]."))
update_icon()
/obj/machinery/papershredder/proc/get_shredded_paper()
@@ -169,7 +169,7 @@
qdel(src)
else
to_chat(user, span("warning", "You must hold \the [P] steady to burn \the [src]."))
to_chat(user, SPAN_WARNING("You must hold \the [P] steady to burn \the [src]."))
/obj/item/shreddedp
name = "shredded paper"
+1 -1
View File
@@ -142,7 +142,7 @@ Pen exclusive commands
/obj/item/pen/fountain/attack_self(var/mob/user)
playsound(loc, 'sound/items/penclick.ogg', 50, 1)
to_chat(user, span("notice", "You snap the nib into position to write [cursive ? "normally" : "in cursive"]."))
to_chat(user, SPAN_NOTICE("You snap the nib into position to write [cursive ? "normally" : "in cursive"]."))
cursive = !cursive
/*
+10 -10
View File
@@ -65,7 +65,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
if(copyitem)
copyitem.forceMove(usr.loc)
usr.put_in_hands(copyitem)
to_chat(usr, span("notice", "You take \the [copyitem] out of \the [src]."))
to_chat(usr, SPAN_NOTICE("You take \the [copyitem] out of \the [src]."))
copyitem = null
SSvueui.check_uis_for_change(src)
else if(href_list["aipic"])
@@ -96,15 +96,15 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
if(!copyitem)
user.drop_from_inventory(O,src)
copyitem = O
to_chat(user, span("notice", "You insert \the [O] into \the [src]."))
to_chat(user, SPAN_NOTICE("You insert \the [O] into \the [src]."))
flick(insert_anim, src)
playsound(loc, 'sound/bureaucracy/scan.ogg', 75, 1)
SSvueui.check_uis_for_change(src)
else
to_chat(user, span("notice", "There is already something in \the [src]."))
to_chat(user, SPAN_NOTICE("There is already something in \the [src]."))
else if(istype(O, /obj/item/device/toner))
if(toner <= 10) //allow replacing when low toner is affecting the print darkness
to_chat(user, span("notice", "You insert \the [O] into \the [src]."))
to_chat(user, SPAN_NOTICE("You insert \the [O] into \the [src]."))
flick("photocopier_toner", src)
playsound(loc, "switchsounds", 50, 1)
var/obj/item/device/toner/T = O
@@ -113,13 +113,13 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
qdel(O)
SSvueui.check_uis_for_change(src)
else
to_chat(user, span("notice", "This cartridge is not yet ready for replacement! Use up the rest of the toner."))
to_chat(user, SPAN_NOTICE("This cartridge is not yet ready for replacement! Use up the rest of the toner."))
flick("photocopier_notoner", src)
playsound(loc, 'sound/machines/buzz-two.ogg', 75, 1)
else if(O.iswrench())
playsound(loc, O.usesound, 50, 1)
anchored = !anchored
to_chat(user, span("notice", "You [anchored ? "wrench" : "unwrench"] \the [src]."))
to_chat(user, SPAN_NOTICE("You [anchored ? "wrench" : "unwrench"] \the [src]."))
return
/obj/machinery/photocopier/proc/copy_type(var/c_item = copyitem) // helper proc to reduce ctrl+c ctrl+v
@@ -136,7 +136,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
sleep(15*B.pages.len)
return B
else
to_chat(usr, span("warning", "\The [c_item] can't be copied by \the [src]."))
to_chat(usr, SPAN_WARNING("\The [c_item] can't be copied by \the [src]."))
return FALSE
/obj/machinery/photocopier/ex_act(severity)
@@ -193,7 +193,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
toner--
if(toner == 0)
visible_message(span("notice", "A red light on \the [src] flashes, indicating that it is out of toner."))
visible_message(SPAN_NOTICE("A red light on \the [src] flashes, indicating that it is out of toner."))
flick("photocopier_notoner", src)
playsound(loc, 'sound/machines/buzz-two.ogg', 75, 1)
return
@@ -221,7 +221,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
toner -= 5 //photos use a lot of ink!
if(toner < 0)
toner = 0
visible_message(span("notice", "A red light on \the [src] flashes, indicating that it is out of toner."))
visible_message(SPAN_NOTICE("A red light on \the [src] flashes, indicating that it is out of toner."))
flick("photocopier_notoner", src)
playsound(loc, 'sound/machines/buzz-two.ogg', 75, 1)
return p
@@ -232,7 +232,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
for(var/obj/item/W in bundle.pages)
if(toner <= 0 && need_toner)
toner = 0
visible_message(span("notice", "A red light on \the [src] flashes, indicating that it is out of toner."))
visible_message(SPAN_NOTICE("A red light on \the [src] flashes, indicating that it is out of toner."))
flick("photocopier_notoner", src)
playsound(loc, 'sound/machines/buzz-two.ogg', 75, 1)
break