[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

@@ -191,7 +191,7 @@
P = hard_drive.find_file_by_name(prog)
if(!P || !istype(P)) // Program not found or it's not executable program.
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"I/O ERROR - Unable to run [prog]\" warning.</span>")
to_chat(user, span_danger("\The [src]'s screen shows \"I/O ERROR - Unable to run [prog]\" warning."))
return
P.computer = src
@@ -206,11 +206,11 @@
return
if(idle_threads.len >= processor_unit.max_idle_programs+1)
to_chat(user, "<span class='notice'>\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error</span>")
to_chat(user, span_notice("\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error"))
return
if(P.requires_ntnet && !get_ntnet_status(P.requires_ntnet_feature)) // The program requires NTNet connection, but we are not connected to NTNet.
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"NETWORK ERROR - Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning.</span>")
to_chat(user, span_danger("\The [src]'s screen shows \"NETWORK ERROR - Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning."))
return
if(active_program)

View File

@@ -1,7 +1,7 @@
/obj/item/modular_computer/examine(var/mob/user)
. = ..()
if(damage > broken_damage)
. += "<span class='danger'>It is heavily damaged!</span>"
. += span_danger("It is heavily damaged!")
else if(damage)
. += "It is damaged."
@@ -52,4 +52,4 @@
if(HALLOSS)
take_damage(Proj.damage, Proj.damage / 3, 0)
if(BURN)
take_damage(Proj.damage, Proj.damage / 1.5)
take_damage(Proj.damage, Proj.damage / 1.5)

View File

@@ -92,7 +92,7 @@
update_verbs()
if(critical && enabled)
if(user)
to_chat(user, "<span class='danger'>\The [src]'s screen freezes for few seconds and then displays an \"HARDWARE ERROR: Critical component disconnected. Please verify component connection and reboot the device. If the problem persists contact technical support for assistance.\" warning.</span>")
to_chat(user, span_danger("\The [src]'s screen freezes for few seconds and then displays an \"HARDWARE ERROR: Critical component disconnected. Please verify component connection and reboot the device. If the problem persists contact technical support for assistance.\" warning."))
shutdown_computer()
update_icon()
@@ -136,4 +136,4 @@
all_components.Add(processor_unit)
if(tesla_link)
all_components.Add(tesla_link)
return all_components
return all_components

View File

@@ -13,11 +13,11 @@
set src in view(1)
if(usr.incapacitated() || !istype(usr, /mob/living) || istype(usr, /mob/living/simple_mob)) //CHOMPEdit - Preventing simple_mobs from interacting
to_chat(usr, "<span class='warning'>You can't do that.</span>")
to_chat(usr, span_warning("You can't do that."))
return
if(!Adjacent(usr))
to_chat(usr, "<span class='warning'>You can't reach it.</span>")
to_chat(usr, span_warning("You can't reach it."))
return
if(enabled)
@@ -37,11 +37,11 @@
set src in view(1)
if(usr.incapacitated() || !istype(usr, /mob/living) || istype(usr, /mob/living/simple_mob)) //CHOMPEdit - Preventing simple_mobs from interacting
to_chat(usr, "<span class='warning'>You can't do that.</span>")
to_chat(usr, span_warning("You can't do that."))
return
if(!Adjacent(usr))
to_chat(usr, "<span class='warning'>You can't reach it.</span>")
to_chat(usr, span_warning("You can't reach it."))
return
proc_eject_id(usr)
@@ -53,11 +53,11 @@
set src in view(1)
if(usr.incapacitated() || !istype(usr, /mob/living) || istype(usr, /mob/living/simple_mob)) //CHOMPEdit - Preventing simple_mobs from interacting
to_chat(usr, "<span class='warning'>You can't do that.</span>")
to_chat(usr, span_warning("You can't do that."))
return
if(!Adjacent(usr))
to_chat(usr, "<span class='warning'>You can't reach it.</span>")
to_chat(usr, span_warning("You can't reach it."))
return
proc_eject_usb(usr)
@@ -197,4 +197,4 @@
return
..()
..()

View File

@@ -1,6 +1,6 @@
/obj/item/modular_computer/proc/power_failure(var/malfunction = 0)
if(enabled) // Shut down the computer
visible_message("<span class='danger'>\The [src]'s screen flickers briefly and then goes dark.</span>")
visible_message(span_danger("\The [src]'s screen flickers briefly and then goes dark."))
if(active_program)
active_program.event_powerfailure(0)
for(var/datum/computer_file/program/PRG in idle_threads)
@@ -54,4 +54,4 @@
return
if(battery_power(power_usage))
return
power_failure()
power_failure()

View File

@@ -102,7 +102,7 @@
return
P.kill_program(1)
to_chat(user, "<span class='notice'>Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.</span>")
to_chat(user, span_notice("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed."))
return TRUE
if("PC_runprogram")
return run_program(params["name"])