/tg/ Station 13 - Modules - TypesVar Details - Proc Details

/datum/computer_file/program

Vars

available_on_ntnetWhether the program can be downloaded from NTNet. Set to 0 to disable.
available_on_syndinetWhether the program can be downloaded from SyndiNet (accessible via emagging the computer). Set to 1 to enable.
computerDevice that runs this program.
extended_descShort description of this program's function.
filedescUser-friendly name of this program.
filenameFile name. FILE NAME MUST BE UNIQUE IF YOU WANT THE PROGRAM TO BE DOWNLOADABLE FROM NTNET!
network_destinationOptional string that describes what NTNet server/system this program connects to. Used in default logging.
ntnet_statusNTNet status, updated every tick by computer running this program. Don't use this for checks if NTNet works, computers do that. Use this for calculations, etc.
program_icon_stateProgram-specific screen icon state
program_statePROGRAM_STATE_KILLED or PROGRAM_STATE_BACKGROUND or PROGRAM_STATE_ACTIVE - specifies whether this program is running.
required_accessList of required accesses to run the program.
requires_ntnetSet to 1 for program to require nonstop NTNet connection to run. If NTNet connection is lost program crashes.
requires_ntnet_featureOptional, if above is set to 1 checks for specific function of NTNet (currently NTNET_SOFTWAREDOWNLOAD, NTNET_PEERTOPEER, NTNET_SYSTEMCONTROL and NTNET_COMMUNICATION)
tgui_idName of the tgui interface
transfer_accessList of required access to download or file host the program
ui_headerExample: "something.gif" - a header image that will be rendered in computer's UI when this program is running at background. Images are taken from /icons/program_icons. Be careful not to use too large images!
usage_flagsBitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination) or PROGRAM_ALL

Procs

run_emagCalled by the device when it is emagged.

Var Details

available_on_ntnet

Whether the program can be downloaded from NTNet. Set to 0 to disable.

available_on_syndinet

Whether the program can be downloaded from SyndiNet (accessible via emagging the computer). Set to 1 to enable.

computer

Device that runs this program.

extended_desc

Short description of this program's function.

filedesc

User-friendly name of this program.

filename

File name. FILE NAME MUST BE UNIQUE IF YOU WANT THE PROGRAM TO BE DOWNLOADABLE FROM NTNET!

network_destination

Optional string that describes what NTNet server/system this program connects to. Used in default logging.

ntnet_status

NTNet status, updated every tick by computer running this program. Don't use this for checks if NTNet works, computers do that. Use this for calculations, etc.

program_icon_state

Program-specific screen icon state

program_state

PROGRAM_STATE_KILLED or PROGRAM_STATE_BACKGROUND or PROGRAM_STATE_ACTIVE - specifies whether this program is running.

required_access

List of required accesses to run the program.

requires_ntnet

Set to 1 for program to require nonstop NTNet connection to run. If NTNet connection is lost program crashes.

requires_ntnet_feature

Optional, if above is set to 1 checks for specific function of NTNet (currently NTNET_SOFTWAREDOWNLOAD, NTNET_PEERTOPEER, NTNET_SYSTEMCONTROL and NTNET_COMMUNICATION)

tgui_id

Name of the tgui interface

transfer_access

List of required access to download or file host the program

ui_header

Example: "something.gif" - a header image that will be rendered in computer's UI when this program is running at background. Images are taken from /icons/program_icons. Be careful not to use too large images!

usage_flags

Bitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination) or PROGRAM_ALL

Proc Details

run_emag

Called by the device when it is emagged.

Emagging the device allows certain programs to unlock new functions. However, the program will need to be downloaded first, and then handle the unlock on their own in their run_emag() proc. The device will allow an emag to be run multiple times, so the user can re-emag to run the override again, should they download something new. The run_emag() proc should return TRUE if the emagging affected anything, and FALSE if no change was made (already emagged, or has no emag functions).