mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-22 01:46:55 +01:00
PCUs and SR Connected Computers (#4040)
* PCU and Connected Consoles * Clean this up
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
// /data/ files store data in string format.
|
||||
// They don't contain other logic for now.
|
||||
/**
|
||||
* /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"
|
||||
/// Whether the user will be reminded that the file probably shouldn't be edited.
|
||||
var/do_not_edit = 0
|
||||
/// Stored data in string format.
|
||||
var/stored_data = ""
|
||||
/// The file size of this bit of data.
|
||||
var/block_size = 250
|
||||
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
|
||||
/// 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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user