[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

@@ -61,7 +61,7 @@
/obj/item/assembly/proc/attach_assembly(var/obj/item/assembly/A, var/mob/user)
holder = new/obj/item/assembly_holder(get_turf(src))
if(holder.attach(A,src,user))
to_chat(user, "<span class='notice'>You attach \the [A] to \the [src]!</span>")
to_chat(user, span_notice("You attach \the [A] to \the [src]!"))
return TRUE
/obj/item/assembly/attackby(obj/item/W as obj, mob/user as mob)
@@ -72,9 +72,9 @@
return
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(toggle_secure())
to_chat(user, "<span class='notice'>\The [src] is ready!</span>")
to_chat(user, span_notice("\The [src] is ready!"))
else
to_chat(user, "<span class='notice'>\The [src] can now be attached!</span>")
to_chat(user, span_notice("\The [src] can now be attached!"))
return
return ..()

View File

@@ -114,15 +114,15 @@
/obj/item/assembly_holder/attackby(var/obj/item/W, var/mob/user)
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(!a_left || !a_right)
to_chat(user, "<span class='warning'> BUG:Assembly part missing, please report this!</span>")
to_chat(user, span_warning(" BUG:Assembly part missing, please report this!"))
return
a_left.toggle_secure()
a_right.toggle_secure()
secured = !secured
if(secured)
to_chat(user, "<span class='notice'>\The [src] is ready!</span>")
to_chat(user, span_notice("\The [src] is ready!"))
else
to_chat(user, "<span class='notice'>\The [src] can now be taken apart!</span>")
to_chat(user, span_notice("\The [src] can now be taken apart!"))
update_icon()
return
else
@@ -132,7 +132,7 @@
src.add_fingerprint(user)
if(src.secured)
if(!a_left || !a_right)
to_chat(user, "<span class='warning'> BUG:Assembly part missing, please report this!</span>")
to_chat(user, span_warning(" BUG:Assembly part missing, please report this!"))
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
switch(tgui_alert(usr, "Which side would you like to use?","Side",list("Left","Right")))
@@ -217,18 +217,18 @@
if(!istype(tmr,/obj/item/assembly/timer))
tmr = holder.a_right
if(!istype(tmr,/obj/item/assembly/timer))
to_chat(usr, "<span class='notice'>This detonator has no timer.</span>")
to_chat(usr, span_notice("This detonator has no timer."))
return
if(tmr.timing)
to_chat(usr, "<span class='notice'>Clock is ticking already.</span>")
to_chat(usr, span_notice("Clock is ticking already."))
else
var/ntime = tgui_input_number(usr, "Enter desired time in seconds", "Time", "5", 1000, 0)
if (ntime>0 && ntime<1000)
tmr.time = ntime
name = initial(name) + "([tmr.time] secs)"
to_chat(usr, "<span class='notice'>Timer set to [tmr.time] seconds.</span>")
to_chat(usr, span_notice("Timer set to [tmr.time] seconds."))
else
to_chat(usr, "<span class='notice'>Timer can't be [ntime<=0?"negative":"more than 1000 seconds"].</span>")
to_chat(usr, span_notice("Timer can't be [ntime<=0?"negative":"more than 1000 seconds"]."))
else
to_chat(usr, "<span class='notice'>You cannot do this while [usr.stat?"unconscious/dead":"restrained"].</span>")
to_chat(usr, span_notice("You cannot do this while [usr.stat?"unconscious/dead":"restrained"]."))

View File

@@ -102,7 +102,7 @@
/obj/item/assembly/infra/tgui_interact(mob/user, datum/tgui/ui)
if(!secured)
to_chat(user, "<span class='warning'>[src] is unsecured!</span>")
to_chat(user, span_warning("[src] is unsecured!"))
return FALSE
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)

View File

@@ -51,18 +51,18 @@
/obj/item/assembly/mousetrap/attack_self(var/mob/living/user)
if(!armed)
to_chat(user, "<span class='notice'>You arm [src].</span>")
to_chat(user, span_notice("You arm [src]."))
else
if((CLUMSY in user.mutations) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
user.visible_message(span_warning("[user] accidentally sets off [src], breaking their fingers."), \
span_warning("You accidentally trigger [src]!"))
return
to_chat(user, "<span class='notice'>You disarm [src].</span>")
to_chat(user, span_notice("You disarm [src]."))
armed = !armed
update_icon()
playsound(user, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
@@ -74,8 +74,8 @@
if(!user.hand)
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
user.visible_message(span_warning("[user] accidentally sets off [src], breaking their fingers."), \
span_warning("You accidentally trigger [src]!"))
return
..()
@@ -87,16 +87,16 @@
var/mob/living/carbon/H = AM
if(H.m_intent == "run")
triggered(H)
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
"<span class='warning'>You accidentally step on [src]</span>")
H.visible_message(span_warning("[H] accidentally steps on [src]."), \
span_warning("You accidentally step on [src]"))
if(ismouse(AM))
triggered(AM)
..()
/obj/item/assembly/mousetrap/on_found(var/mob/living/finder)
if(armed)
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
finder.visible_message(span_warning("[finder] accidentally sets off [src], breaking their fingers."), \
span_warning("You accidentally trigger [src]!"))
triggered(finder, finder.hand ? "l_hand" : "r_hand")
return 1 //end the search!
return 0
@@ -104,7 +104,7 @@
/obj/item/assembly/mousetrap/hitby(var/atom/movable/A)
if(!armed)
return ..()
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
visible_message(span_warning("[src] is triggered by [A]."))
triggered(null)
/obj/item/assembly/mousetrap/armed
@@ -120,4 +120,4 @@
return
layer = HIDING_LAYER
to_chat(usr, "<span class='notice'>You hide [src].</span>")
to_chat(usr, span_notice("You hide [src]."))

View File

@@ -103,7 +103,7 @@
/obj/item/assembly/prox_sensor/tgui_interact(mob/user, datum/tgui/ui)
if(!secured)
to_chat(user, "<span class='warning'>[src] is unsecured!</span>")
to_chat(user, span_warning("[src] is unsecured!"))
return FALSE
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)

View File

@@ -28,7 +28,7 @@
return
if(W.has_tool_quality(TOOL_SCREWDRIVER))
status = !status
to_chat(user, "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>")
to_chat(user, span_notice("[src] is now [status ? "secured" : "unsecured"]!"))
playsound(src, W.usesound, 50, 1)
add_fingerprint(user)
return

View File

@@ -64,7 +64,7 @@
/obj/item/assembly/timer/tgui_interact(mob/user, datum/tgui/ui)
if(!secured)
to_chat(user, "<span class='warning'>[src] is unsecured!</span>")
to_chat(user, span_warning("[src] is unsecured!"))
return FALSE
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)