Files
Aurora.3/code/modules/modular_computers/file_system/data.dm
Geeves 89d3c3218d Data File Tweak (#8069)
Changed block size from 250 to 1500, making size storage six times more efficient.
2020-01-25 12:15:49 +01:00

19 lines
663 B
Plaintext

// /data/ files store data in string format.
// They don't contain other logic for now.
/datum/computer_file/data
var/stored_data = "" // Stored data in string format.
filetype = "DAT"
var/block_size = 1500
var/do_not_edit = 0 // Whether the user will be reminded that the file probably shouldn't be edited.
/datum/computer_file/data/clone()
var/datum/computer_file/data/temp = ..()
temp.stored_data = stored_data
return temp
// Calculates file size from amount of characters in saved string
/datum/computer_file/data/proc/calculate_size()
size = max(1, round(length(stored_data) / block_size))
/datum/computer_file/data/logfile
filetype = "LOG"