Replaces the default output with the to_chat wrapper.

This commit is contained in:
Lzimann
2017-03-10 01:32:05 -03:00
parent ffbb492a43
commit 5a618297ce
1034 changed files with 7617 additions and 7680 deletions

View File

@@ -176,19 +176,19 @@
/obj/item/device/modular_computer/emag_act(mob/user)
if(emagged)
user << "<span class='warning'>\The [src] was already emagged.</span>"
to_chat(user, "<span class='warning'>\The [src] was already emagged.</span>")
return 0
else
emagged = 1
user << "<span class='notice'>You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.</span>"
to_chat(user, "<span class='notice'>You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.</span>")
return 1
/obj/item/device/modular_computer/examine(mob/user)
..()
if(obj_integrity <= integrity_failure)
user << "<span class='danger'>It is heavily damaged!</span>"
to_chat(user, "<span class='danger'>It is heavily damaged!</span>")
else if(obj_integrity < max_integrity)
user << "<span class='warning'>It is damaged.</span>"
to_chat(user, "<span class='warning'>It is damaged.</span>")
/obj/item/device/modular_computer/update_icon()
cut_overlays()
@@ -217,9 +217,9 @@
var/issynth = issilicon(user) // Robots and AIs get different activation messages.
if(obj_integrity <= integrity_failure)
if(issynth)
user << "<span class='warning'>You send an activation signal to \the [src], but it responds with an error code. It must be damaged.</span>"
to_chat(user, "<span class='warning'>You send an activation signal to \the [src], but it responds with an error code. It must be damaged.</span>")
else
user << "<span class='warning'>You press the power button, but the computer fails to boot up, displaying variety of errors before shutting down again.</span>"
to_chat(user, "<span class='warning'>You press the power button, but the computer fails to boot up, displaying variety of errors before shutting down again.</span>")
return
// If we have a recharger, enable it automatically. Lets computer without a battery work.
@@ -229,17 +229,17 @@
if(all_components[MC_CPU] && use_power()) // use_power() checks if the PC is powered
if(issynth)
user << "<span class='notice'>You send an activation signal to \the [src], turning it on.</span>"
to_chat(user, "<span class='notice'>You send an activation signal to \the [src], turning it on.</span>")
else
user << "<span class='notice'>You press the power button and start up \the [src].</span>"
to_chat(user, "<span class='notice'>You press the power button and start up \the [src].</span>")
enabled = 1
update_icon()
ui_interact(user)
else // Unpowered
if(issynth)
user << "<span class='warning'>You send an activation signal to \the [src] but it does not respond.</span>"
to_chat(user, "<span class='warning'>You send an activation signal to \the [src] but it does not respond.</span>")
else
user << "<span class='warning'>You press the power button but \the [src] does not respond.</span>"
to_chat(user, "<span class='warning'>You press the power button but \the [src] does not respond.</span>")
// Process currently calls handle_power(), may be expanded in future if more things are added.
/obj/item/device/modular_computer/process()
@@ -384,7 +384,7 @@
if(istype(W, /obj/item/weapon/wrench))
if(all_components.len)
user << "<span class='warning'>Remove all components from \the [src] before disassembling it.</span>"
to_chat(user, "<span class='warning'>Remove all components from \the [src] before disassembling it.</span>")
return
new /obj/item/stack/sheet/metal( get_turf(src.loc), steel_sheet_cost )
physical.visible_message("\The [src] has been disassembled by [user].")
@@ -395,23 +395,23 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.isOn())
user << "<span class='warning'>\The [W] is off.</span>"
to_chat(user, "<span class='warning'>\The [W] is off.</span>")
return
if(obj_integrity == max_integrity)
user << "<span class='warning'>\The [src] does not require repairs.</span>"
to_chat(user, "<span class='warning'>\The [src] does not require repairs.</span>")
return
user << "<span class='notice'>You begin repairing damage to \the [src]...</span>"
to_chat(user, "<span class='notice'>You begin repairing damage to \the [src]...</span>")
var/dmg = round(max_integrity - obj_integrity)
if(WT.remove_fuel(round(dmg/75)) && do_after(usr, dmg/10))
obj_integrity = max_integrity
user << "<span class='notice'>You repair \the [src].</span>"
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
return
if(istype(W, /obj/item/weapon/screwdriver))
if(!all_components.len)
user << "<span class='warning'>This device doesn't have any components installed.</span>"
to_chat(user, "<span class='warning'>This device doesn't have any components installed.</span>")
return
var/list/component_names = list()
for(var/h in all_components)

View File

@@ -3,11 +3,11 @@
return FALSE
if(H.w_class > max_hardware_size)
user << "<span class='warning'>This component is too large for \the [src]!</span>"
to_chat(user, "<span class='warning'>This component is too large for \the [src]!</span>")
return FALSE
if(all_components[H.device_type])
user << "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>"
to_chat(user, "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>")
return FALSE
return TRUE
@@ -22,7 +22,7 @@
all_components[H.device_type] = H
user << "<span class='notice'>You install \the [H] into \the [src].</span>"
to_chat(user, "<span class='notice'>You install \the [H] into \the [src].</span>")
H.holder = src
H.forceMove(src)
H.on_install(src, user)
@@ -35,7 +35,7 @@
all_components.Remove(H.device_type)
user << "<span class='notice'>You remove \the [H] from \the [src].</span>"
to_chat(user, "<span class='notice'>You remove \the [H] from \the [src].</span>")
H.forceMove(get_turf(src))
H.holder = null

View File

@@ -26,7 +26,7 @@
// This screen simply lists available programs and user may select them.
var/obj/item/weapon/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
if(!hard_drive || !hard_drive.stored_files || !hard_drive.stored_files.len)
user << "<span class='danger'>\The [src] beeps three times, it's screen displaying a \"DISK ERROR\" warning.</span>"
to_chat(user, "<span class='danger'>\The [src] beeps three times, it's screen displaying a \"DISK ERROR\" warning.</span>")
return // No HDD, No HDD files list or no stored files. Something is very broken.
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -89,7 +89,7 @@
return
P.kill_program(forced = TRUE)
user << "<span class='notice'>Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.</span>"
to_chat(user, "<span class='notice'>Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed.</span>")
if("PC_runprogram")
var/prog = params["name"]
@@ -99,7 +99,7 @@
P = hard_drive.find_file_by_name(prog)
if(!P || !istype(P)) // Program not found or it's not executable program.
user << "<span class='danger'>\The [src]'s screen shows \"I/O ERROR - Unable to run program\" warning.</span>"
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"I/O ERROR - Unable to run program\" warning.</span>")
return
P.computer = src
@@ -118,11 +118,11 @@
var/obj/item/weapon/computer_hardware/processor_unit/PU = all_components[MC_CPU]
if(idle_threads.len > PU.max_idle_programs)
user << "<span class='danger'>\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error.</span>"
to_chat(user, "<span class='danger'>\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error.</span>")
return
if(P.requires_ntnet && !get_ntnet_status(P.requires_ntnet_feature)) // The program requires NTNet connection, but we are not connected to NTNet.
user << "<span class='danger'>\The [src]'s screen shows \"Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning.</span>"
to_chat(user, "<span class='danger'>\The [src]'s screen shows \"Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\" warning.</span>")
return
if(P.run_program(user))
active_program = P

View File

@@ -83,11 +83,11 @@
/obj/item/device/modular_computer/laptop/proc/toggle_open(mob/living/user=null)
if(screen_on)
user << "<span class='notice'>You close \the [src].</span>"
to_chat(user, "<span class='notice'>You close \the [src].</span>")
slowdown = initial(slowdown)
w_class = initial(w_class)
else
user << "<span class='notice'>You open \the [src].</span>"
to_chat(user, "<span class='notice'>You open \the [src].</span>")
slowdown = slowdown_open
w_class = w_class_open

View File

@@ -51,7 +51,7 @@
/datum/computer_file/program/proc/is_supported_by_hardware(hardware_flag = 0, loud = 0, mob/user = null)
if(!(hardware_flag & usage_flags))
if(loud && computer && user)
user << "<span class='danger'>\The [computer] flashes an \"Hardware Error - Incompatible software\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Hardware Error - Incompatible software\" warning.</span>")
return 0
return 1
@@ -102,7 +102,7 @@
if(!I && !C && !D)
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>")
return 0
if(I)
@@ -115,7 +115,7 @@
if(access_to_check in D.GetAccess())
return 1
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
return 0
// This attempts to retrieve header data for UIs. If implementing completely new device of different type than existing ones

View File

@@ -154,7 +154,7 @@
contents += " [get_access_desc(A)]"
if(!printer.print_text(contents,"access report"))
usr << "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>"
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
return
else
computer.visible_message("<span class='notice'>\The [computer] prints out paper.</span>")
@@ -164,7 +164,7 @@
[data_core ? data_core.get_manifest(0) : ""]
"}
if(!printer.print_text(contents,text("crew manifest ([])", worldtime2text())))
usr << "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>"
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
return
else
computer.visible_message("<span class='notice'>\The [computer] prints out paper.</span>")
@@ -235,7 +235,7 @@
jobdatum = J
break
if(!jobdatum)
usr << "<span class='warning'>No log exists for this job: [t1]</span>"
to_chat(usr, "<span class='warning'>No log exists for this job: [t1]</span>")
return
access = jobdatum.get_access()

View File

@@ -34,19 +34,19 @@
/obj/item/weapon/computer_hardware/attackby(obj/item/I, mob/living/user)
// Multitool. Runs diagnostics
if(istype(I, /obj/item/device/multitool))
user << "***** DIAGNOSTICS REPORT *****"
to_chat(user, "***** DIAGNOSTICS REPORT *****")
diagnostics(user)
user << "******************************"
to_chat(user, "******************************")
return 1
// Cable coil. Works as repair method, but will probably require multiple applications and more cable.
if(istype(I, /obj/item/stack/cable_coil))
var/obj/item/stack/S = I
if(obj_integrity == max_integrity)
user << "<span class='warning'>\The [src] doesn't seem to require repairs.</span>"
to_chat(user, "<span class='warning'>\The [src] doesn't seem to require repairs.</span>")
return 1
if(S.use(1))
user << "<span class='notice'>You patch up \the [src] with a bit of \the [I].</span>"
to_chat(user, "<span class='notice'>You patch up \the [src] with a bit of \the [I].</span>")
obj_integrity = min(obj_integrity + 10, max_integrity)
return 1
@@ -57,7 +57,7 @@
// Called on multitool click, prints diagnostic information to the user.
/obj/item/weapon/computer_hardware/proc/diagnostics(var/mob/user)
user << "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]"
to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")
// Handles damage checks
/obj/item/weapon/computer_hardware/proc/check_functionality()
@@ -76,11 +76,11 @@
/obj/item/weapon/computer_hardware/examine(var/mob/user)
. = ..()
if(damage > damage_failure)
user << "<span class='danger'>It seems to be severely damaged!</span>"
to_chat(user, "<span class='danger'>It seems to be severely damaged!</span>")
else if(damage > damage_malfunction)
user << "<span class='warning'>It seems to be damaged!</span>"
to_chat(user, "<span class='warning'>It seems to be damaged!</span>")
else if(damage)
user << "<span class='notice'>It seems to be slightly damaged.</span>"
to_chat(user, "<span class='notice'>It seems to be slightly damaged.</span>")
// Component-side compatibility check.
/obj/item/weapon/computer_hardware/proc/can_install(obj/item/device/modular_computer/M, mob/living/user = null)

View File

@@ -14,7 +14,7 @@
/obj/item/weapon/computer_hardware/ai_slot/examine(mob/user)
..()
if(stored_card)
user << "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it"
to_chat(user, "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it")
/obj/item/weapon/computer_hardware/ai_slot/on_install(obj/item/device/modular_computer/M, mob/living/user = null)
M.add_verb(device_type)
@@ -30,24 +30,24 @@
return FALSE
if(stored_card)
user << "<span class='warning'>You try to insert \the [I] into \the [src], but the slot is occupied.</span>"
to_chat(user, "<span class='warning'>You try to insert \the [I] into \the [src], but the slot is occupied.</span>")
return FALSE
if(user && !user.transferItemToLoc(I, src))
return FALSE
stored_card = I
user << "<span class='notice'>You insert \the [I] into \the [src].</span>"
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
return TRUE
/obj/item/weapon/computer_hardware/ai_slot/try_eject(slot=0,mob/living/user = null,forced = 0)
if(!stored_card)
user << "<span class='warning'>There is no card in \the [src].</span>"
to_chat(user, "<span class='warning'>There is no card in \the [src].</span>")
return FALSE
if(locked && !forced)
user << "<span class='warning'>Safeties prevent you from removing the card until reconstruction is complete...</span>"
to_chat(user, "<span class='warning'>Safeties prevent you from removing the card until reconstruction is complete...</span>")
return FALSE
if(stored_card)
@@ -56,7 +56,7 @@
stored_card.verb_pickup()
stored_card = null
user << "<span class='notice'>You remove the card from \the [src].</span>"
to_chat(user, "<span class='notice'>You remove the card from \the [src].</span>")
return TRUE
return FALSE
@@ -64,6 +64,6 @@
if(..())
return
if(istype(I, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You press down on the manual eject button with \the [I].</span>"
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
try_eject(,user,1)
return

View File

@@ -21,29 +21,29 @@
return FALSE
if(battery)
user << "<span class='warning'>You try to connect \the [I] to \the [src], but its connectors are occupied.</span>"
to_chat(user, "<span class='warning'>You try to connect \the [I] to \the [src], but its connectors are occupied.</span>")
return FALSE
if(I.w_class > holder.max_hardware_size)
user << "<span class='warning'>This power cell is too large for \the [holder]!</span>"
to_chat(user, "<span class='warning'>This power cell is too large for \the [holder]!</span>")
return FALSE
if(user && !user.transferItemToLoc(I, src))
return FALSE
battery = I
user << "<span class='notice'>You connect \the [I] to \the [src].</span>"
to_chat(user, "<span class='notice'>You connect \the [I] to \the [src].</span>")
return TRUE
/obj/item/weapon/computer_hardware/battery/try_eject(slot=0, mob/living/user = null, forced = 0)
if(!battery)
user << "<span class='warning'>There is no power cell connected to \the [src].</span>"
to_chat(user, "<span class='warning'>There is no power cell connected to \the [src].</span>")
return FALSE
else
battery.forceMove(get_turf(src))
user << "<span class='notice'>You detach \the [battery] from \the [src].</span>"
to_chat(user, "<span class='notice'>You detach \the [battery] from \the [src].</span>")
battery = null
if(holder)

View File

@@ -44,7 +44,7 @@
return FALSE
if(stored_card && stored_card2)
user << "<span class='warning'>You try to insert \the [I] into \the [src], but its slots are occupied.</span>"
to_chat(user, "<span class='warning'>You try to insert \the [I] into \the [src], but its slots are occupied.</span>")
return FALSE
if(user)
if(!user.transferItemToLoc(I, src))
@@ -56,14 +56,14 @@
stored_card = I
else
stored_card2 = I
user << "<span class='notice'>You insert \the [I] into \the [src].</span>"
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
return TRUE
/obj/item/weapon/computer_hardware/card_slot/try_eject(slot=0, mob/living/user = null, forced = 0)
if(!stored_card && !stored_card2)
user << "<span class='warning'>There are no cards in \the [src].</span>"
to_chat(user, "<span class='warning'>There are no cards in \the [src].</span>")
return FALSE
var/ejected = 0
@@ -92,7 +92,7 @@
var/datum/computer_file/program/P = I
P.event_idremoved(1, slot)
user << "<span class='notice'>You remove the card[ejected>1 ? "s" : ""] from \the [src].</span>"
to_chat(user, "<span class='notice'>You remove the card[ejected>1 ? "s" : ""] from \the [src].</span>")
return TRUE
return FALSE
@@ -100,11 +100,11 @@
if(..())
return
if(istype(I, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You press down on the manual eject button with \the [I].</span>"
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
try_eject(0,user)
return
/obj/item/weapon/computer_hardware/card_slot/examine(mob/user)
..()
if(stored_card || stored_card2)
user << "There appears to be something loaded in the card slots."
to_chat(user, "There appears to be something loaded in the card slots.")

View File

@@ -21,13 +21,13 @@
/obj/item/weapon/computer_hardware/hard_drive/examine(user)
..()
user << "<span class='notice'>It has [max_capacity] GQ of storage capacity.</span>"
to_chat(user, "<span class='notice'>It has [max_capacity] GQ of storage capacity.</span>")
/obj/item/weapon/computer_hardware/hard_drive/diagnostics(var/mob/user)
..()
// 999 is a byond limit that is in place. It's unlikely someone will reach that many files anyway, since you would sooner run out of space.
user << "NT-NFS File Table Status: [stored_files.len]/999"
user << "Storage capacity: [used_capacity]/[max_capacity]GQ"
to_chat(user, "NT-NFS File Table Status: [stored_files.len]/999")
to_chat(user, "Storage capacity: [used_capacity]/[max_capacity]GQ")
// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
/obj/item/weapon/computer_hardware/hard_drive/proc/store_file(var/datum/computer_file/F)

View File

@@ -15,14 +15,14 @@ var/global/ntnet_card_uid = 1
/obj/item/weapon/computer_hardware/network_card/diagnostics(var/mob/user)
..()
user << "NIX Unique ID: [identification_id]"
user << "NIX User Tag: [identification_string]"
user << "Supported protocols:"
user << "511.m SFS (Subspace) - Standard Frequency Spread"
to_chat(user, "NIX Unique ID: [identification_id]")
to_chat(user, "NIX User Tag: [identification_string]")
to_chat(user, "Supported protocols:")
to_chat(user, "511.m SFS (Subspace) - Standard Frequency Spread")
if(long_range)
user << "511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandiwdth"
to_chat(user, "511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandiwdth")
if(ethernet)
user << "OpenEth (Physical Connection) - Physical network connection port"
to_chat(user, "OpenEth (Physical Connection) - Physical network connection port")
/obj/item/weapon/computer_hardware/network_card/New(var/l)
..(l)

View File

@@ -11,11 +11,11 @@
/obj/item/weapon/computer_hardware/printer/diagnostics(mob/living/user)
..()
user << "Paper level: [stored_paper]/[max_paper]"
to_chat(user, "Paper level: [stored_paper]/[max_paper]")
/obj/item/weapon/computer_hardware/printer/examine(mob/user)
..()
user << "<span class='notice'>Paper level: [stored_paper]/[max_paper]</span>"
to_chat(user, "<span class='notice'>Paper level: [stored_paper]/[max_paper]</span>")
/obj/item/weapon/computer_hardware/printer/proc/print_text(var/text_to_print, var/paper_title = "")
@@ -42,12 +42,12 @@
/obj/item/weapon/computer_hardware/printer/try_insert(obj/item/I, mob/living/user = null)
if(istype(I, /obj/item/weapon/paper))
if(stored_paper >= max_paper)
user << "<span class='warning'>You try to add \the [I] into [src], but its paper bin is full!</span>"
to_chat(user, "<span class='warning'>You try to add \the [I] into [src], but its paper bin is full!</span>")
return FALSE
if(user && !user.temporarilyRemoveItemFromInventory(I))
return FALSE
user << "<span class='notice'>You insert \the [I] into [src]'s paper recycler.</span>"
to_chat(user, "<span class='notice'>You insert \the [I] into [src]'s paper recycler.</span>")
qdel(I)
stored_paper++
return TRUE

View File

@@ -57,7 +57,7 @@
/obj/item/weapon/computer_hardware/recharger/wired/can_install(obj/item/device/modular_computer/M, mob/living/user = null)
if(istype(M.physical, /obj/machinery) && M.physical.anchored)
return ..()
user << "<span class='warning'>\The [src] is incompatible with portable computers!</span>"
to_chat(user, "<span class='warning'>\The [src] is incompatible with portable computers!</span>")
return 0
/obj/item/weapon/computer_hardware/recharger/wired/use_power(amount, charging=0)