Updates modular computers, begins work on shuttle stuff.

This commit is contained in:
Artur
2020-04-23 15:06:35 +03:00
parent 0b34e20f56
commit a8aa2e2014
29 changed files with 535 additions and 1091 deletions
@@ -115,49 +115,50 @@
var/list/data = get_header_data()
// This IF cuts on data transferred to client, so i guess it's worth it.
if(downloaderror) // Download errored. Wait until user resets the program.
data["error"] = downloaderror
else if(downloaded_file) // Download running. Wait please..
data["downloading"] = !!downloaded_file
data["error"] = downloaderror || FALSE
// Download running. Wait please..
if(downloaded_file)
data["downloadname"] = downloaded_file.filename
data["downloaddesc"] = downloaded_file.filedesc
data["downloadsize"] = downloaded_file.size
data["downloadspeed"] = download_netspeed
data["downloadcompletion"] = round(download_completion, 0.1)
else // No download running, pick file.
var/obj/item/computer_hardware/hard_drive/hard_drive = my_computer.all_components[MC_HDD]
data["disk_size"] = hard_drive.max_capacity
data["disk_used"] = hard_drive.used_capacity
var/list/all_entries[0]
for(var/A in SSnetworks.station_network.available_station_software)
var/datum/computer_file/program/P = A
// Only those programs our user can run will show in the list
if(!P.can_run(user,transfer = 1) || hard_drive.find_file_by_name(P.filename))
continue
all_entries.Add(list(list(
var/obj/item/computer_hardware/hard_drive/hard_drive = my_computer.all_components[MC_HDD]
data["disk_size"] = hard_drive.max_capacity
data["disk_used"] = hard_drive.used_capacity
var/list/all_entries[0]
for(var/A in SSnetworks.station_network.available_station_software)
var/datum/computer_file/program/P = A
// Only those programs our user can run will show in the list
if(!P.can_run(user,transfer = 1) || hard_drive.find_file_by_name(P.filename))
continue
all_entries.Add(list(list(
"filename" = P.filename,
"filedesc" = P.filedesc,
"fileinfo" = P.extended_desc,
"compatibility" = check_compatibility(P),
"size" = P.size
)))
data["hackedavailable"] = 0
if(computer.obj_flags & EMAGGED) // If we are running on emagged computer we have access to some "bonus" software
var/list/hacked_programs[0]
for(var/S in SSnetworks.station_network.available_antag_software)
var/datum/computer_file/program/P = S
if(hard_drive.find_file_by_name(P.filename))
continue
data["hackedavailable"] = 1
hacked_programs.Add(list(list(
"size" = P.size,
)))
data["hackedavailable"] = FALSE
if(computer.obj_flags & EMAGGED) // If we are running on emagged computer we have access to some "bonus" software
var/list/hacked_programs[0]
for(var/S in SSnetworks.station_network.available_antag_software)
var/datum/computer_file/program/P = S
if(hard_drive.find_file_by_name(P.filename))
continue
data["hackedavailable"] = TRUE
hacked_programs.Add(list(list(
"filename" = P.filename,
"filedesc" = P.filedesc,
"fileinfo" = P.extended_desc,
"size" = P.size
)))
data["hacked_programs"] = hacked_programs
"size" = P.size,
)))
data["hacked_programs"] = hacked_programs
data["downloadable_programs"] = all_entries
data["downloadable_programs"] = all_entries
return data