computer4 
Vars | |
active_program | The current focused program. |
---|---|
default_operating_system | Default operating system to install by default. |
default_peripherals | List of peripheral typepaths to install by default. |
default_program_dir | The directory to install them in |
default_programs | List of program typepaths to install by default. |
operating_system | The operating system. |
peripherals | k:v list of peripherals where key is the peripheral type and v is a reference. |
processing_programs | All programs currently running on the machine. |
rebooting | Set to TRUE during restart, prevents inputting commands. |
soundloop | Soundloop. Self explanatory. |
text_buffer | Screen text buffer. |
tgui_input_history | k:v list of ckey to a list of past inputs. |
tgui_input_index | k:v list of ckey to a number that indexes into the input history, used to update tgui_last_accessed. |
tgui_last_accessed | k:v list of ckey to the last used command. |
Procs | |
add_peripheral | Adds a peripheral to the peripherals list. Does not handle physical location. |
add_processing_program | Setter for the processing programs list. Use execute_program() instead! |
execute_program | Run a program. |
get_history | Get the history entry at a certain index. Returns null if the index is out of bounds or the ckey is null. Will return an empty string for length+1 |
get_peripheral | Getter for retrieving peripherals in program code. |
peripheral_gone | Handles a peripheral moving. |
peripheral_input | Called by peripherals to interface with the computer |
processing_program_moved | Handles any running programs being moved in the filesystem. |
remove_peripheral | Removes a peripheral from the peripherals list. Does not handle physical location. |
remove_processing_program | Setter for the processing programs list. Use unload_program() instead! |
set_active_program | Setter for active program. Use execute_program() or unload_program() instead! |
set_operating_system | Setter for operating system. |
traverse_history | Traverse the current history by some amount. Returns true if different history was accessed, false otherwise (usually if new index OOB) |
try_background_program | Move a program to background |
unload_program | Close a program. |
Var Details
active_program 
The current focused program.
default_operating_system 
Default operating system to install by default.
default_peripherals 
List of peripheral typepaths to install by default.
default_program_dir 
The directory to install them in
default_programs 
List of program typepaths to install by default.
operating_system 
The operating system.
peripherals 
k:v list of peripherals where key is the peripheral type and v is a reference.
processing_programs 
All programs currently running on the machine.
rebooting 
Set to TRUE during restart, prevents inputting commands.
soundloop 
Soundloop. Self explanatory.
text_buffer 
Screen text buffer.
tgui_input_history 
k:v list of ckey to a list of past inputs.
tgui_input_index 
k:v list of ckey to a number that indexes into the input history, used to update tgui_last_accessed.
tgui_last_accessed 
k:v list of ckey to the last used command.
Proc Details
add_peripheral
Adds a peripheral to the peripherals list. Does not handle physical location.
add_processing_program
Setter for the processing programs list. Use execute_program() instead!
execute_program
Run a program.
get_history
Get the history entry at a certain index. Returns null if the index is out of bounds or the ckey is null. Will return an empty string for length+1
get_peripheral
Getter for retrieving peripherals in program code.
peripheral_gone
Handles a peripheral moving.
peripheral_input
Called by peripherals to interface with the computer
processing_program_moved
Handles any running programs being moved in the filesystem.
remove_peripheral
Removes a peripheral from the peripherals list. Does not handle physical location.
remove_processing_program
Setter for the processing programs list. Use unload_program() instead!
set_active_program
Setter for active program. Use execute_program() or unload_program() instead!
set_operating_system
Setter for operating system.
traverse_history
Traverse the current history by some amount. Returns true if different history was accessed, false otherwise (usually if new index OOB)
try_background_program
Move a program to background
unload_program
Close a program.