[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

@@ -270,7 +270,7 @@
// attack with hand, switch position
/obj/machinery/conveyor_switch/attack_hand(mob/user)
if(!allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
to_chat(user, span_warning("Access denied."))
return
if(position == 0)
@@ -308,7 +308,7 @@
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/steel( src.loc, 2 )
qdel(src)
return

View File

@@ -270,11 +270,11 @@
return
if(usr.loc == src)
to_chat(usr, "<span class='warning'>You cannot reach the controls from inside.</span>")
to_chat(usr, span_warning("You cannot reach the controls from inside."))
return TRUE
if(mode==-1 && action != "eject") // If the mode is -1, only allow ejection
to_chat(usr, "<span class='warning'>The disposal units power is disabled.</span>")
to_chat(usr, span_warning("The disposal units power is disabled."))
return
if(stat & BROKEN)

View File

@@ -29,7 +29,7 @@
return
if(working)
to_chat(user, "<span class='warning'>\The [src] is busy! Wait until it's idle.</span>")
to_chat(user, span_warning("\The [src] is busy! Wait until it's idle."))
return
if(default_deconstruction_screwdriver(user, O))
@@ -46,7 +46,7 @@
take_item(O)
M.visible_message("<b>[M]</b> inserts [O] into [src].", "You insert [O] into [src].")
else
to_chat(user, "<span class='warning'>\The [src] can't accept [O] for recycling.</span>")
to_chat(user, span_warning("\The [src] can't accept [O] for recycling."))
// Conveyors etc
/obj/machinery/recycling/Bumped(atom/A)

View File

@@ -27,7 +27,7 @@
var/obj/item/destTagger/O = W
if(O.currTag)
if(src.sortTag != O.currTag)
to_chat(user, "<span class='notice'>You have labeled the destination as [O.currTag].</span>")
to_chat(user, span_notice("You have labeled the destination as [O.currTag]."))
if(!src.sortTag)
src.sortTag = O.currTag
update_icon()
@@ -35,19 +35,19 @@
src.sortTag = O.currTag
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
else
to_chat(user, "<span class='warning'>The package is already labeled for [O.currTag].</span>")
to_chat(user, span_warning("The package is already labeled for [O.currTag]."))
else
to_chat(user, "<span class='warning'>You need to set a destination first!</span>")
to_chat(user, span_warning("You need to set a destination first!"))
else if(istype(W, /obj/item/pen))
switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel")))
if("Title")
var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(user, "<span class='warning'> Invalid text.</span>")
to_chat(user, span_warning(" Invalid text."))
return
user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[str]\"",\
"<span class='notice'>You title \the [src]: \"[str]\"</span>",\
span_notice("You title \the [src]: \"[str]\""),\
"You hear someone scribbling a note.")
playsound(src, pick('sound/bureaucracy/pen1.ogg','sound/bureaucracy/pen2.ogg'), 20)
name = "[name] ([str])"
@@ -67,7 +67,7 @@
else
examtext = str
user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\
"<span class='notice'>You label \the [src]: \"[examtext]\"</span>",\
span_notice("You label \the [src]: \"[examtext]\""),\
"You hear someone scribbling a note.")
playsound(src, pick('sound/bureaucracy/pen1.ogg','sound/bureaucracy/pen2.ogg'), 20)
return
@@ -105,9 +105,9 @@
. = ..()
if(get_dist(user, src) <= 4)
if(sortTag)
. += "<span class='notice'>It is labeled \"[sortTag]\"</span>"
. += span_notice("It is labeled \"[sortTag]\"")
if(examtext)
. += "<span class='notice'>It has a note attached which reads, \"[examtext]\"</span>"
. += span_notice("It has a note attached which reads, \"[examtext]\"")
/obj/item/smallDelivery
desc = "A small wrapped package."
@@ -138,7 +138,7 @@
var/obj/item/destTagger/O = W
if(O.currTag)
if(src.sortTag != O.currTag)
to_chat(user, "<span class='notice'>You have labeled the destination as [O.currTag].</span>")
to_chat(user, span_notice("You have labeled the destination as [O.currTag]."))
if(!src.sortTag)
src.sortTag = O.currTag
update_icon()
@@ -146,19 +146,19 @@
src.sortTag = O.currTag
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
else
to_chat(user, "<span class='warning'>The package is already labeled for [O.currTag].</span>")
to_chat(user, span_warning("The package is already labeled for [O.currTag]."))
else
to_chat(user, "<span class='warning'>You need to set a destination first!</span>")
to_chat(user, span_warning("You need to set a destination first!"))
else if(istype(W, /obj/item/pen))
switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel")))
if("Title")
var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(user, "<span class='warning'> Invalid text.</span>")
to_chat(user, span_warning(" Invalid text."))
return
user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[str]\"",\
"<span class='notice'>You title \the [src]: \"[str]\"</span>",\
span_notice("You title \the [src]: \"[str]\""),\
"You hear someone scribbling a note.")
playsound(src, pick('sound/bureaucracy/pen1.ogg','sound/bureaucracy/pen2.ogg'), 20)
name = "[name] ([str])"
@@ -179,7 +179,7 @@
else
examtext = str
user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\
"<span class='notice'>You label \the [src]: \"[examtext]\"</span>",\
span_notice("You label \the [src]: \"[examtext]\""),\
"You hear someone scribbling a note.")
playsound(src, pick('sound/bureaucracy/pen1.ogg','sound/bureaucracy/pen2.ogg'), 20)
return
@@ -213,9 +213,9 @@
. = ..()
if(get_dist(user, src) <= 4)
if(sortTag)
. += "<span class='notice'>It is labeled \"[sortTag]\"</span>"
. += span_notice("It is labeled \"[sortTag]\"")
if(examtext)
. += "<span class='notice'>It has a note attached which reads, \"[examtext]\"</span>"
. += span_notice("It has a note attached which reads, \"[examtext]\"")
/obj/item/packageWrap
name = "package wrapper"
@@ -273,7 +273,7 @@
src.add_fingerprint(usr)
src.amount -= 1
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
"<span class='notice'>You wrap \the [target], leaving [amount] units of paper on \the [src].</span>",\
span_notice("You wrap \the [target], leaving [amount] units of paper on \the [src]."),\
"You hear someone taping paper around a small object.")
playsound(src, 'sound/items/package_wrap.ogg', 50, 1)
else if (istype(target, /obj/structure/closet/crate))
@@ -285,11 +285,11 @@
O.loc = P
src.amount -= 3
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
"<span class='notice'>You wrap \the [target], leaving [amount] units of paper on \the [src].</span>",\
span_notice("You wrap \the [target], leaving [amount] units of paper on \the [src]."),\
"You hear someone taping paper around a large object.")
playsound(src, 'sound/items/package_wrap.ogg', 50, 1)
else if(src.amount < 3)
to_chat(user, "<span class='warning'>You need more paper.</span>")
to_chat(user, span_warning("You need more paper."))
else if (istype (target, /obj/structure/closet))
var/obj/structure/closet/O = target
if (src.amount > 3 && !O.opened)
@@ -299,11 +299,11 @@
O.loc = P
src.amount -= 3
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
"<span class='notice'>You wrap \the [target], leaving [amount] units of paper on \the [src].</span>",\
span_notice("You wrap \the [target], leaving [amount] units of paper on \the [src]."),\
"You hear someone taping paper around a large object.")
playsound(src, 'sound/items/package_wrap.ogg', 50, 1)
else if(src.amount < 3)
to_chat(user, "<span class='warning'>You need more paper.</span>")
to_chat(user, span_warning("You need more paper."))
else
to_chat(user, span_blue("The object you are trying to wrap is unsuitable for the sorting machinery!"))
if (src.amount <= 0)