From 6473d0c79fa9c831ce2a04beb63b2cb7ebf61070 Mon Sep 17 00:00:00 2001 From: davipatury Date: Sat, 4 Mar 2017 21:29:24 -0300 Subject: [PATCH] Crazylemons's ntnet downloader suggestion. --- code/modules/modular_computers/file_system/program.dm | 1 + .../file_system/programs/generic/ntdownloader.dm | 3 ++- nano/templates/ntnet_downloader.tmpl | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index b2158304d36..8d917e4cb81 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -138,6 +138,7 @@ // Use this proc to kill the program. Designed to be implemented by each program if it requires on-quit logic, such as the NTNRC client. /datum/computer_file/program/proc/kill_program(forced = FALSE) program_state = PROGRAM_STATE_KILLED + computer.update_icon() if(network_destination) generate_network_log("Connection to [network_destination] closed.") return 1 diff --git a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm index ca4ea4eace0..d71f744d694 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm @@ -144,7 +144,8 @@ "filedesc" = P.filedesc, "fileinfo" = P.extended_desc, "compatibility" = check_compatibility(P), - "size" = P.size + "size" = P.size, + "status" = !hard_drive || !hard_drive.can_store_file(P) ? "disabled" : null ))) data["hackedavailable"] = 0 if(computer.emagged) // If we are running on emagged computer we have access to some "bonus" software diff --git a/nano/templates/ntnet_downloader.tmpl b/nano/templates/ntnet_downloader.tmpl index 3582a48bf7c..3e4e90569f5 100644 --- a/nano/templates/ntnet_downloader.tmpl +++ b/nano/templates/ntnet_downloader.tmpl @@ -68,7 +68,7 @@
File controls
-
{{:helper.link('DOWNLOAD', 'download', {'action' : 'PRG_downloadfile', 'filename' : value.filename})}}
+
{{:helper.link('DOWNLOAD', 'download', {'action' : 'PRG_downloadfile', 'filename' : value.filename, value.status})}}
{{/for}}