converts our spans (#9185)

This commit is contained in:
Kashargul
2024-10-07 20:47:23 +02:00
committed by GitHub
parent f4155aa973
commit a92a42b85b
162 changed files with 1360 additions and 1269 deletions
@@ -12,16 +12,16 @@
/obj/structure/closet/crate/secure/lootsafe/emag_act(var/remaining_charges, var/mob/user)
if (locked)
if(prob(60 - hackguard))
to_chat(user, "<span class='notice'>The safe unlocks!</span>")
to_chat(user, span_notice("The safe unlocks!"))
locked = 0
return 1
if(prob(15 + hackguard))
to_chat(user, "<span class='notice'>The safe buzzes as a security drone is teleported in!</span>")
to_chat(user, span_notice("The safe buzzes as a security drone is teleported in!"))
new /mob/living/simple_mob/mechanical/combat_drone (src.loc) //if I ever make security stun drones remind me to replace this with those
//new /effect/system/spark_spread (src.loc) I am to tired to make this work right now
return 1
else
to_chat(user, "<span class='notice'>The safe buzzes but the security systems don't trigger.</span>")
to_chat(user, span_notice("The safe buzzes but the security systems don't trigger."))
return 1
//Loot for lootsafes
@@ -117,7 +117,7 @@
if(!locked)
return
to_chat(user, "<span class='notice'>The crate is locked with a Deca-code lock.</span>")
to_chat(user, span_notice("The crate is locked with a Deca-code lock."))
var/input = tgui_input_text(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "")
if(!Adjacent(user))
return
@@ -131,16 +131,16 @@
sanitycheck = null //if a digit is repeated, reject the input
if(input == null || sanitycheck == null || length(input) != codelen)
to_chat(user, "<span class='notice'>You leave the crate alone.</span>")
to_chat(user, span_notice("You leave the crate alone."))
else if(check_input(input))
to_chat(user, "<span class='notice'>The crate unlocks!</span>")
to_chat(user, span_notice("The crate unlocks!"))
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
set_locked(0)
else
visible_message("<span class='warning'>A red light on \the [src]'s control panel flashes briefly.</span>")
visible_message(span_warning("A red light on \the [src]'s control panel flashes briefly."))
attempts--
if (attempts == 0)
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
to_chat(user, span_danger("The crate's anti-tamper system activates!"))
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 1, 2)
qdel(src)
@@ -160,11 +160,11 @@
/obj/structure/closet/crate/secure/lootsafe/numberlock/attackby(obj/item/W as obj, mob/user as mob)
if(locked)
if (istype(W, /obj/item/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
to_chat(user, "<span class='notice'>DECA-CODE LOCK ANALYSIS:</span>")
to_chat(user, span_notice("DECA-CODE LOCK ANALYSIS:"))
if (attempts == 1)
to_chat(user, "<span class='warning'>* Anti-Tamper system will activate on the next failed access attempt.</span>")
to_chat(user, span_warning("* Anti-Tamper system will activate on the next failed access attempt."))
else
to_chat(user, "<span class='notice'>* Anti-Tamper system will activate after [src.attempts] failed access attempts.</span>")
to_chat(user, span_notice("* Anti-Tamper system will activate after [src.attempts] failed access attempts."))
if(lastattempt.len)
var/bulls = 0
var/cows = 0
@@ -179,7 +179,7 @@
var/previousattempt = null //convert back to string for readback
for(var/i in 1 to codelen)
previousattempt = addtext(previousattempt, lastattempt[i])
to_chat(user, "<span class='notice'>Last code attempt, [previousattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>")
to_chat(user, span_notice("Last code attempt, [previousattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions."))
return
..()
@@ -219,7 +219,7 @@
if(!locked)
return
to_chat(user, "<span class='notice'>The crate is locked with a Deca-code lock.</span>")
to_chat(user, span_notice("The crate is locked with a Deca-code lock."))
var/input = tgui_input_text(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "")
if(!Adjacent(user))
return
@@ -233,16 +233,16 @@
sanitycheck = null //if a digit is repeated, reject the input
if(input == null || sanitycheck == null || length(input) != codelen)
to_chat(user, "<span class='notice'>You leave the crate alone.</span>")
to_chat(user, span_notice("You leave the crate alone."))
else if(check_input(input))
to_chat(user, "<span class='notice'>The crate unlocks!</span>")
to_chat(user, span_notice("The crate unlocks!"))
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
set_locked(0)
else
visible_message("<span class='warning'>A red light on \the [src]'s control panel flashes briefly.</span>")
visible_message(span_warning("A red light on \the [src]'s control panel flashes briefly."))
attempts--
if (attempts == 0)
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
to_chat(user, span_danger("The crate's anti-tamper system activates!"))
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 1, 2)
qdel(src)
@@ -262,11 +262,11 @@
/obj/structure/closet/crate/secure/lootsafe/devillock/attackby(obj/item/W as obj, mob/user as mob)
if(locked)
if (istype(W, /obj/item/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
to_chat(user, "<span class='notice'>DECA-CODE LOCK ANALYSIS:</span>")
to_chat(user, span_notice("DECA-CODE LOCK ANALYSIS:"))
if (attempts == 1)
to_chat(user, "<span class='warning'>* Anti-Tamper system will activate on the next failed access attempt.</span>")
to_chat(user, span_warning("* Anti-Tamper system will activate on the next failed access attempt."))
else
to_chat(user, "<span class='notice'>* Anti-Tamper system will activate after [src.attempts] failed access attempts.</span>")
to_chat(user, span_notice("* Anti-Tamper system will activate after [src.attempts] failed access attempts."))
if(lastattempt.len)
var/bulls = 0
var/cows = 0
@@ -281,6 +281,6 @@
var/previousattempt = null //convert back to string for readback
for(var/i in 1 to codelen)
previousattempt = addtext(previousattempt, lastattempt[i])
to_chat(user, "<span class='notice'>Last code attempt, [previousattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>")
to_chat(user, span_notice("Last code attempt, [previousattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions."))
return
..()