Modular computers now use list of components (#20557)

* Bringing computers to the light side

Bringing computers to the light side

* Lighter and lighter

Lighter and lighter

* Missed some lists

Missed some lists

* Text to defines

Text to defines

* Last commit

Last commit

* How did this even get here

How did this even get here

* Removing bad stuff

Removing bad stuff

* Fixes verb adding and idle check

Fixes verb adding and idle check
This commit is contained in:
Razharas
2016-09-18 00:40:21 +02:00
committed by phil235
parent 6b3e788ee9
commit 186d852bc5
30 changed files with 269 additions and 217 deletions
@@ -66,7 +66,8 @@ var/global/nttransfer_uid = 0
// Finishes download and attempts to store the file on HDD
/datum/computer_file/program/nttransfer/proc/finish_download()
if(!computer || !computer.hard_drive || !computer.hard_drive.store_file(downloaded_file))
var/obj/item/weapon/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD]
if(!computer || !hard_drive || !hard_drive.store_file(downloaded_file))
error = "I/O Error: Unable to save file. Check your hard drive and try again."
finalize_download()
@@ -136,7 +137,8 @@ var/global/nttransfer_uid = 0
server_password = pass
return 1
if("PRG_uploadfile")
for(var/datum/computer_file/F in computer.hard_drive.stored_files)
var/obj/item/weapon/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD]
for(var/datum/computer_file/F in hard_drive.stored_files)
if("[F.uid]" == params["id"])
if(F.unsendable)
error = "I/O Error: File locked."
@@ -174,7 +176,8 @@ var/global/nttransfer_uid = 0
data["upload_filename"] = "[provided_file.filename].[provided_file.filetype]"
else if (upload_menu)
var/list/all_files[0]
for(var/datum/computer_file/F in computer.hard_drive.stored_files)
var/obj/item/weapon/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD]
for(var/datum/computer_file/F in hard_drive.stored_files)
all_files.Add(list(list(
"uid" = F.uid,
"filename" = "[F.filename].[F.filetype]",