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

View File

@@ -86,9 +86,9 @@
. += emissive_appearance(overlay_icon, icon_state_screensaver)
set_light(0)
return add_overlay(.)
set_light(light_strength)
if(active_program)
var/program_state = active_program.program_icon_state ? active_program.program_icon_state : icon_state_menu
. += mutable_appearance(overlay_icon, program_state)
@@ -98,7 +98,7 @@
else
. += mutable_appearance(overlay_icon, icon_state_menu)
. += emissive_appearance(overlay_icon, icon_state_menu)
return add_overlay(.)
/obj/item/modular_computer/proc/turn_on(var/mob/user)
@@ -190,7 +190,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
@@ -205,11 +205,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)
@@ -297,4 +297,4 @@
if(hard_drive)
. = hard_drive.find_file_by_uid(uid)
if(portable_drive && !.)
. = portable_drive.find_file_by_uid(uid)
. = portable_drive.find_file_by_uid(uid)

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))
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))
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))
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"])