refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
@@ -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())
@@ -35,23 +35,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))
@@ -62,11 +62,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)
@@ -75,7 +75,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.
@@ -84,7 +84,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()
@@ -104,9 +104,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
@@ -133,7 +133,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)