mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
NTNet P2P Transfer client
- Adds simple NTNet P2P transfer client, that allows users to send files via NTNet. - This client can act either as actual client (downloading files), or as a server, providing one file at time. - This may (not guaranteed) be expanded in future, to allow sharing of multiple files at once, possibly even having some sort of dedicated server architecture - Transfer speed is calculated as lower value of connection speed of both devices (weakest link in the chain) - Server may be protected using rudimentary password that, if set, must be entered to download the file.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
var/global/file_uid = 0
|
||||
|
||||
/datum/computer_file/
|
||||
var/filename = "NewFile" // Placeholder. No spacebars
|
||||
var/filetype = "XXX" // File full names are [filename].[filetype] so like NewFile.XXX in this case
|
||||
@@ -5,6 +7,12 @@
|
||||
var/obj/item/weapon/computer_hardware/hard_drive/holder // Holder that contains this file.
|
||||
var/unsendable = 0 // Whether the file may be sent to someone via NTNet transfer or other means.
|
||||
var/undeletable = 0 // Whether the file may be deleted. Setting to 1 prevents deletion/renaming/etc.
|
||||
var/uid // UID of this file
|
||||
|
||||
/datum/computer_file/New()
|
||||
..()
|
||||
uid = file_uid
|
||||
file_uid++
|
||||
|
||||
/datum/computer_file/Destroy()
|
||||
if(!holder)
|
||||
|
||||
Reference in New Issue
Block a user