computer_file
![code/modules/modular_computers/file_system/computer_file.dm 1](git.png)
Vars | |
computer | The modular computer hosting the file. |
---|---|
disk_host | The computer disk hosting the file. |
file_uid | Static ID to ensure all IDs are unique. |
filename | The name of the internal file shown in file management. |
filetype | The type of file format the file is in, placed after filename. PNG, TXT, ect. This would be NewFile.XXX |
size | How much GQ storage space the file will take to store. Integers only! |
uid | The computer file's personal ID |
undeletable | Whether the file may be deleted. Setting to TRUE prevents deletion/renaming/etc. |
Procs | |
application_attackby | Called when attacking a tablet with an item, checking if any application uses it. Return TRUE to cancel the attack chain. |
can_store_file | Used for special cases where an application Requires special circumstances to install on a PC Args: |
on_examine | Called when examining a modular computer Args: Source - The tablet that's being examined User - Person examining the computer |
on_install | Called post-installation of an application in a computer, after 'computer' var is set. |
try_eject | Implement this when your program has an object that the user can eject. |
Var Details
computer
![code/modules/modular_computers/file_system/computer_file.dm 15](git.png)
The modular computer hosting the file.
disk_host
![code/modules/modular_computers/file_system/computer_file.dm 19](git.png)
The computer disk hosting the file.
file_uid
![code/modules/modular_computers/file_system/computer_file.dm 13](git.png)
Static ID to ensure all IDs are unique.
filename
![code/modules/modular_computers/file_system/computer_file.dm 3](git.png)
The name of the internal file shown in file management.
filetype
![code/modules/modular_computers/file_system/computer_file.dm 5](git.png)
The type of file format the file is in, placed after filename. PNG, TXT, ect. This would be NewFile.XXX
size
![code/modules/modular_computers/file_system/computer_file.dm 7](git.png)
How much GQ storage space the file will take to store. Integers only!
uid
![code/modules/modular_computers/file_system/computer_file.dm 11](git.png)
The computer file's personal ID
undeletable
![code/modules/modular_computers/file_system/computer_file.dm 9](git.png)
Whether the file may be deleted. Setting to TRUE prevents deletion/renaming/etc.
Proc Details
application_attackby
Called when attacking a tablet with an item, checking if any application uses it. Return TRUE to cancel the attack chain.
can_store_file
Used for special cases where an application Requires special circumstances to install on a PC Args:
- potential_host - the ModPC that is attempting to store this file.
on_examine
Called when examining a modular computer Args: Source - The tablet that's being examined User - Person examining the computer
note: please replace this with signals when hdd's are removed and program's New() already has the tablet set.
on_install
Called post-installation of an application in a computer, after 'computer' var is set.
try_eject
Implement this when your program has an object that the user can eject.
Examples include ejecting cells AI intellicards. Arguments:
- user - The mob requesting the eject.
- forced - Whether we are forced to eject everything (usually by the app being deleted)