[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

@@ -25,15 +25,15 @@
/obj/structure/closet/grave/attack_hand(mob/user as mob)
if(opened)
visible_message("<span class='notice'>[user] starts to climb into \the [src.name].</span>", \
"<span class='notice'>You start to lower yourself into \the [src.name].</span>")
visible_message(span_notice("[user] starts to climb into \the [src.name]."), \
span_notice("You start to lower yourself into \the [src.name]."))
if(do_after(user, 50))
user.forceMove(src.loc)
visible_message("<span class='notice'>[user] climbs into \the [src.name].</span>", \
"<span class='notice'>You climb into \the [src.name].</span>")
visible_message(span_notice("[user] climbs into \the [src.name]."), \
span_notice("You climb into \the [src.name]."))
else
visible_message("<span class='notice'>[user] decides not to climb into \the [src.name].</span>", \
"<span class='notice'>You stop climbing into \the [src.name].</span>")
visible_message(span_notice("[user] decides not to climb into \the [src.name]."), \
span_notice("You stop climbing into \the [src.name]."))
return
/obj/structure/closet/grave/CanPass(atom/movable/mover, turf/target)
@@ -43,19 +43,19 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.m_intent == "walk")
to_chat(H, "<span class='warning'>You stop at the edge of \the [src.name].</span>")
to_chat(H, span_warning("You stop at the edge of \the [src.name]."))
return FALSE
else
to_chat(H, "<span class='warning'>You fall into \the [src.name]!</span>")
to_chat(H, span_warning("You fall into \the [src.name]!"))
fall_in(H)
return TRUE
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.a_intent == I_HELP)
to_chat(R, "<span class='warning'>You stop at the edge of \the [src.name].</span>")
to_chat(R, span_warning("You stop at the edge of \the [src.name]."))
return FALSE
else
to_chat(R, "<span class='warning'>You enter \the [src.name].</span>")
to_chat(R, span_warning("You enter \the [src.name]."))
return TRUE
return TRUE //Everything else can move over the graves
@@ -69,17 +69,17 @@
/obj/structure/closet/grave/attackby(obj/item/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/shovel))
user.visible_message("<span class='notice'>[user] piles dirt into \the [src.name].</span>", \
"<span class='notice'>You start to pile dirt into \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
user.visible_message(span_notice("[user] piles dirt into \the [src.name]."), \
span_notice("You start to pile dirt into \the [src.name]."), \
span_notice("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
user.visible_message("<span class='notice'>[user] pats down the dirt on top of \the [src.name].</span>", \
"<span class='notice'>You finish filling in \the [src.name].</span>")
user.visible_message(span_notice("[user] pats down the dirt on top of \the [src.name]."), \
span_notice("You finish filling in \the [src.name]."))
close()
return
else
user.visible_message("<span class='notice'>[user] stops filling in \the [src.name].</span>", \
"<span class='notice'>You change your mind and stop filling in \the [src.name].</span>")
user.visible_message(span_notice("[user] stops filling in \the [src.name]."), \
span_notice("You change your mind and stop filling in \the [src.name]."))
return
if(istype(W, /obj/item/grab))
var/obj/item/grab/G = W
@@ -92,9 +92,9 @@
var/turf/T = get_turf(src)
for(var/obj/item/I in LB.contents)
LB.remove_from_storage(I, T)
user.visible_message("<span class='notice'>[user] empties \the [LB] into \the [src].</span>", \
"<span class='notice'>You empty \the [LB] into \the [src].</span>", \
"<span class='notice'>You hear rustling of clothes.</span>")
user.visible_message(span_notice("[user] empties \the [LB] into \the [src]."), \
span_notice("You empty \the [LB] into \the [src]."), \
span_notice("You hear rustling of clothes."))
return
if(isrobot(user))
return
@@ -106,33 +106,33 @@
else
if(istype(W, /obj/item/shovel))
if(user.a_intent == I_HURT) // Hurt intent means you're trying to kill someone, or just get rid of the grave
user.visible_message("<span class='notice'>[user] begins to smoothe out the dirt of \the [src.name].</span>", \
"<span class='notice'>You start to smoothe out the dirt of \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
user.visible_message(span_notice("[user] begins to smoothe out the dirt of \the [src.name]."), \
span_notice("You start to smoothe out the dirt of \the [src.name]."), \
span_notice("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
user.visible_message("<span class='notice'>[user] finishes smoothing out \the [src.name].</span>", \
"<span class='notice'>You finish smoothing out \the [src.name].</span>")
user.visible_message(span_notice("[user] finishes smoothing out \the [src.name]."), \
span_notice("You finish smoothing out \the [src.name]."))
if(LAZYLEN(contents))
alpha = 40 // If we've got stuff inside, like maybe a person, just make it hard to see us
else
qdel(src) // Else, go away
return
else
user.visible_message("<span class='notice'>[user] stops concealing \the [src.name].</span>", \
"<span class='notice'>You stop concealing \the [src.name].</span>")
user.visible_message(span_notice("[user] stops concealing \the [src.name]."), \
span_notice("You stop concealing \the [src.name]."))
return
else
user.visible_message("<span class='notice'>[user] begins to unearth \the [src.name].</span>", \
"<span class='notice'>You start to unearth \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
user.visible_message(span_notice("[user] begins to unearth \the [src.name]."), \
span_notice("You start to unearth \the [src.name]."), \
span_notice("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
user.visible_message("<span class='notice'>[user] reaches the bottom of \the [src.name].</span>", \
"<span class='notice'>You finish digging out \the [src.name].</span>")
user.visible_message(span_notice("[user] reaches the bottom of \the [src.name]."), \
span_notice("You finish digging out \the [src.name]."))
break_open()
return
else
user.visible_message("<span class='notice'>[user] stops digging out \the [src.name].</span>", \
"<span class='notice'>You stop digging out \the [src.name].</span>")
user.visible_message(span_notice("[user] stops digging out \the [src.name]."), \
span_notice("You stop digging out \the [src.name]."))
return
return

View File

@@ -48,7 +48,7 @@
if(large)
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>")
to_chat(user, span_notice("The locker is too small to stuff [G.affecting] into!"))
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
@@ -60,7 +60,7 @@
var/obj/item/card/id/I = W.GetID()
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
to_chat(user, span_warning("It appears to be broken."))
return
if(!I || !I.registered_name) return
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
@@ -71,7 +71,7 @@
src.registered_name = I.registered_name
src.desc = "Owned by [I.registered_name]."
else
to_chat(user, "<span class='warning'>Access Denied</span>")
to_chat(user, span_warning("Access Denied"))
else if(istype(W, /obj/item/melee/energy/blade))
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
@@ -80,7 +80,7 @@
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
else
to_chat(user, "<span class='warning'>Access Denied</span>")
to_chat(user, span_warning("Access Denied"))
update_icon()
/obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
@@ -90,7 +90,7 @@
desc = "It appears to be broken."
update_icon()
if(visual_feedback)
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
visible_message(span_warning("[visual_feedback]"), span_warning("[audible_feedback]"))
return 1
/obj/structure/closet/secure_closet/personal/verb/reset()
@@ -102,9 +102,9 @@
if(ishuman(usr))
src.add_fingerprint(usr)
if (src.locked || !src.registered_name)
to_chat(usr, "<span class='warning'>You need to unlock it first.</span>")
to_chat(usr, span_warning("You need to unlock it first."))
else if (src.broken)
to_chat(usr, "<span class='warning'>It appears to be broken.</span>")
to_chat(usr, span_warning("It appears to be broken."))
else
if (src.opened)
if(!src.close())

View File

@@ -36,23 +36,23 @@
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
if(opened)
to_chat(user, "<span class='notice'>Close the locker first.</span>")
to_chat(user, span_notice("Close the locker first."))
return
if(broken)
to_chat(user, "<span class='warning'>The locker appears to be broken.</span>")
to_chat(user, span_warning("The locker appears to be broken."))
return
if(user.loc == src)
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
to_chat(user, span_notice("You can't reach the lock from inside."))
return
if(allowed(user))
locked = !locked
playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
for(var/mob/O in viewers(user, 3))
if((O.client && !( O.blinded )))
to_chat(O, "<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
to_chat(O, span_notice("The locker has been [locked ? null : "un"]locked by [user]."))
update_icon()
else
to_chat(user, "<span class='notice'>Access Denied</span>")
to_chat(user, span_notice("Access Denied"))
/obj/structure/closet/secure_closet/attackby(obj/item/W as obj, mob/user as mob)
if(W.has_tool_quality(TOOL_WRENCH))
@@ -63,11 +63,11 @@
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
return
else
to_chat(user, "<span class='notice'>You can't reach the anchoring bolts when the door is closed!</span>")
to_chat(user, span_notice("You can't reach the anchoring bolts when the door is closed!"))
else if(opened)
if(istype(W, /obj/item/storage/laundry_basket))
return ..(W,user)
@@ -76,7 +76,7 @@
if(large)
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>")
to_chat(user, span_notice("The locker is too small to stuff [G.affecting] into!"))
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
@@ -85,7 +85,7 @@
if(W)
W.forceMove(loc)
else if(istype(W, /obj/item/melee/energy/blade))
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
if(emag_act(INFINITY, user, span_danger("The locker has been sliced open by [user] with \an [W]!"), span_danger("You hear metal being sliced and sparks flying.")))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, loc)
spark_system.start()
@@ -105,9 +105,9 @@
if(visual_feedback)
visible_message(visual_feedback, audible_feedback)
else if(user && emag_source)
visible_message("<span class='warning'>\The [src] has been broken by \the [user] with \an [emag_source]!</span>", "You hear a faint electrical spark.")
visible_message(span_warning("\The [src] has been broken by \the [user] with \an [emag_source]!"), "You hear a faint electrical spark.")
else
visible_message("<span class='warning'>\The [src] sparks and breaks open!</span>", "You hear a faint electrical spark.")
visible_message(span_warning("\The [src] sparks and breaks open!"), "You hear a faint electrical spark.")
update_icon()
return 1
@@ -134,7 +134,7 @@
add_fingerprint(usr)
togglelock(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
to_chat(usr, span_warning("This mob type can't use this verb."))
/obj/structure/closet/secure_closet/update_icon()
if(opened)

View File

@@ -106,7 +106,7 @@
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
health -= I.force
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
visible_message(span_danger("[user] strikes [src] with [I]."))
check_health()
/obj/structure/closet/statue/MouseDrop_T()
@@ -128,5 +128,5 @@
if (user)
user.dust()
dump_contents()
visible_message("<span class='warning'>[src] shatters!.</span>")
visible_message(span_warning("[src] shatters!."))
qdel(src)