First implementation of NTNet Software Downloads, Fixes

- As usual, fixes various issues through the code, but likely creates more as this is still WIP project.
- Most importantly, NTNet software downloader program now exists and more or less works.
- Your device's connectivity has effect on how quickly you can download. Right now, things with wired connection (consoles) download at 0,5GQ/s, mobile devices on station where signal is good at 0,1GQ/s and mobile devices off station where signal is bad are limited to 0,025GQ/s. This is all controlled by three defines.
This commit is contained in:
Atlantis
2015-08-27 07:09:04 +02:00
parent 5492739805
commit 46280123ee
20 changed files with 584 additions and 213 deletions
@@ -10,19 +10,22 @@
if(!holder)
return ..()
holder.stored_files -= src
holder.remove_file(src)
// holder.holder is the computer that has drive installed. If we are Destroy()ing program that's currently running kill it.
if(holder.holder && holder.holder.active_program == src)
holder.holder.kill_program(1)
if(holder.holder2 && holder.holder2.active_program == src)
holder.holder2.kill_program(1)
holder = null
..()
// Returns independent copy of this file.
/datum/computer_file/proc/clone()
var/datum/computer_file/temp
/datum/computer_file/proc/clone(var/rename = 0)
var/datum/computer_file/temp = new type
temp.unsendable = unsendable
temp.undeletable = undeletable
temp.size = size
temp.filename = filename + "(Copy)"
if(rename)
temp.filename = filename + "(Copy)"
else
temp.filename = filename
temp.filetype = filetype
return temp