mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-28 02:52:01 +00:00
Initial (buggy) implementation
- Implements modular computers, starting with single program (power monitoring console) - Implements most hardware. Some is still TBD, but the important stuff is in place - Implements file-based system. Currently two file types exist, programs, which have NanoUI/Topic() interaction with user and data files, which may be used to store string of data.
This commit is contained in:
18
code/modules/modular_computers/file_system/computer_file.dm
Normal file
18
code/modules/modular_computers/file_system/computer_file.dm
Normal file
@@ -0,0 +1,18 @@
|
||||
/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
|
||||
var/size = 1 // File size in GQ (default 1, do not change unless you really have to). Non-1 values are currently unused but they should be supported.
|
||||
var/datum/computer_hardware/hard_drive/holder // Holder that contains this file.
|
||||
var/icon_path = null // !!32x32!! icon of this program
|
||||
|
||||
|
||||
/datum/computer_file/Destroy()
|
||||
if(!holder)
|
||||
return ..()
|
||||
|
||||
holder.stored_files -= 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)
|
||||
holder = null
|
||||
..()
|
||||
Reference in New Issue
Block a user