[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

@@ -52,23 +52,23 @@
if(istype(A, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/D = A
if(!D.arePowerSystemsOn())
to_chat(user, "<span class='warning'>No response from remote, check door power.</span>")
to_chat(user, span_warning("No response from remote, check door power."))
else if(D.locked == TRUE && full_override == FALSE)
to_chat(user, "<span class='warning'>Unable to override door bolts!</span>")
to_chat(user, span_warning("Unable to override door bolts!"))
else if(D.locked == TRUE && full_override == TRUE && D.arePowerSystemsOn())
to_chat(user, "<span class='notice'>Door bolts overridden.</span>")
to_chat(user, span_notice("Door bolts overridden."))
D.unlock()
else if(D.density == TRUE && D.locked == FALSE)
to_chat(user, "<span class='notice'>Overriding access. Door opening.</span>")
to_chat(user, span_notice("Overriding access. Door opening."))
D.open()
else if(D.density == FALSE && D.locked == FALSE)
to_chat(user, "<span class='notice'>Overriding access. Door closing.</span>")
to_chat(user, span_notice("Overriding access. Door closing."))
D.close()
return 1
/obj/item/multitool/hacktool/proc/attempt_hack(var/mob/user, var/atom/target)
if(is_hacking)
to_chat(user, "<span class='warning'>You are already hacking!</span>")
to_chat(user, span_warning("You are already hacking!"))
return 0
if(!is_type_in_list(target, supported_types))
to_chat(user, "[icon2html(src, user.client)] <span class='warning'>Unable to hack this target, invalid target type.</span>")
@@ -77,9 +77,9 @@
if(istype(target, /obj/structure/closet/crate/secure))
var/obj/structure/closet/crate/secure/A = target
if(A.locked)
to_chat(user, "<span class='notice'>Overriding access. Stand by.</span>")
to_chat(user, span_notice("Overriding access. Stand by."))
if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed))))
to_chat(user, "<span class='notice'>Override successful!</span>")
to_chat(user, span_notice("Override successful!"))
A.locked = FALSE
A.update_icon()
playsound(A, 'sound/machines/click.ogg', 15, 1, -3)
@@ -89,9 +89,9 @@
if(istype(target, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/A = target
if(A.locked)
to_chat(user, "<span class='notice'>Overriding access. Stand by.</span>")
to_chat(user, span_notice("Overriding access. Stand by."))
if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed))))
to_chat(user, "<span class='notice'>Override successful!</span>")
to_chat(user, span_notice("Override successful!"))
A.locked = FALSE
A.update_icon()
playsound(A, 'sound/machines/click.ogg', 15, 1, -3)
@@ -108,7 +108,7 @@
if(found)
known_targets.Swap(1, found) // Move the last hacked item first
return 1
to_chat(user, "<span class='notice'>You begin hacking \the [D]...</span>")
to_chat(user, span_notice("You begin hacking \the [D]..."))
is_hacking = 1
// On average hackin takes ~15 seconds. Fairly small random span to discourage people from simply aborting and trying again
// Reduced hack duration to compensate for the reduced functionality, multiplied by door sec level
@@ -116,10 +116,10 @@
is_hacking = 0
if(hack_result && in_hack_mode)
to_chat(user, "<span class='notice'>Your hacking attempt was succesful!</span>")
to_chat(user, span_notice("Your hacking attempt was succesful!"))
user.playsound_local(get_turf(src), 'sound/instruments/piano/An6.ogg', 50)
else
to_chat(user, "<span class='warning'>Your hacking attempt failed!</span>")
to_chat(user, span_warning("Your hacking attempt failed!"))
return 0
known_targets.Insert(1, D) // Insert the newly hacked target first,