Space Station 13 - Modules - TypesVar Details - Proc Details

program

Vars

NMIf the program uses NanoModule, put it here and it will be automagically opened. Otherwise implement ui_interact.
available_on_ntnetWhether the program can be downloaded from NTNet. Set to FALSE to disable.
available_on_syndinetWhether the program can be downloaded from SyndiNet (accessible via emagging the computer). Set to TRUE to enable.
categoryCategory that this program belongs to.
computerOS that this program is running on.
extended_descShort description of this program's function.
filedescUser-friendly name of this program.
nanomodule_pathPath to nanomodule, make sure to set this if implementing new program.
network_destinationOptional string that describes what NTNet server/system this program connects to. Used in default logging.
operator_skillHolder for skill value of current/recent operator for programs that tick.
processing_sizeHow much processing size the program should take up.
program_icon_stateProgram-specific screen icon state.
program_key_stateProgram-specific keyboard icon state.
program_menu_iconIcon to use for program's link in main menu.
program_stateOne of PROGRAM_STATE_* - specifies whether this program is running.
required_accessList of required accesses to run/download the program.
requires_access_to_downloadWhether the program checks for required_access when downloading.
requires_access_to_runWhether the program checks for required_access when run.
requires_ntnetSet to TRUE for program to require nonstop NTNet connection to run. If NTNet connection is lost program crashes.
requires_ntnet_featureOptional, if above is set to TRUE, checks for specific function of NTNet (One of NTNET_*).
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 /nano/images/status_icons.
usage_flagsBitflags (Any of PROGRAM_*) or PROGRAM_ALL

Procs

TopicCONVENTIONS, READ THIS WHEN CREATING NEW PROGRAM AND OVERRIDING THIS PROC: Topic calls are automatically forwarded from NanoModule this program contains. Calls beginning with "PRG_" are reserved for programs handling. Calls beginning with "PC_" are reserved for computer handling (by whatever runs the program) ALWAYS INCLUDE PARENT CALL ..() AT THE TOP OF THE PROC OR DIE IN FIRE. Return values should be one of TOPIC_*
can_runCheck if the user can run program. Only humans can operate computer. Automatically called in run_program(). User has to wear their ID or have it inhand for ID Scan to work. Can also be called manually, with optional parameter being access_to_check to scan the user's ID
check_eyeRelays the call to nano module, if we have one
event_idremovedCalled when the ID card is removed from computer. ID is removed AFTER this proc.
event_networkfailureCalled when the network connectivity fails. Computer does necessary checks and only calls this when requires_ntnet_feature and similar variables are not met.
event_powerfailureCalled when the computer fails due to power loss. Override when program wants to specifically react to power loss.
generate_network_logAttempts to create a log in global ntnet datum. Returns TRUE on success, FALSE on fail.
get_header_dataThis attempts to retrieve header data for NanoUIs. If implementing completely new device of different type than existing ones, always include the device here in this proc. This proc basically relays the request to whatever is running the program.
on_shutdownUse this proc to kill the program. Designed to be implemented by each program if it requires on-quit logic, such as the NTNRC client.
on_startupWhen implementing new program based device, use this to run the program. May be overriden to add extra logic. Remember to include ..() call.
process_tickCalled by Process() on device that runs us, once every tick. Remember to call ..() if overriding
ui_interactThis is called every tick when the program is enabled. Ensure you do parent call if you override it. If parent returns TRUE continue with UI initialisation. It returns FALSE if it can't run or if NanoModule was used instead. I suggest using NanoModules where applicable.
update_computer_iconRelays icon update to the computer.

Var Details

NM

If the program uses NanoModule, put it here and it will be automagically opened. Otherwise implement ui_interact.

available_on_ntnet

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

available_on_syndinet

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

category

Category that this program belongs to.

computer

OS that this program is running on.

extended_desc

Short description of this program's function.

filedesc

User-friendly name of this program.

nanomodule_path

Path to nanomodule, make sure to set this if implementing new program.

network_destination

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

operator_skill

Holder for skill value of current/recent operator for programs that tick.

processing_size

How much processing size the program should take up.

program_icon_state

Program-specific screen icon state.

program_key_state

Program-specific keyboard icon state.

program_menu_icon

Icon to use for program's link in main menu.

program_state

One of PROGRAM_STATE_* - specifies whether this program is running.

required_access

List of required accesses to run/download the program.

requires_access_to_download

Whether the program checks for required_access when downloading.

requires_access_to_run

Whether the program checks for required_access when run.

requires_ntnet

Set to TRUE 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 TRUE, checks for specific function of NTNet (One of NTNET_*).

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 /nano/images/status_icons.

usage_flags

Bitflags (Any of PROGRAM_*) or PROGRAM_ALL

Proc Details

Topic

CONVENTIONS, READ THIS WHEN CREATING NEW PROGRAM AND OVERRIDING THIS PROC: Topic calls are automatically forwarded from NanoModule this program contains. Calls beginning with "PRG_" are reserved for programs handling. Calls beginning with "PC_" are reserved for computer handling (by whatever runs the program) ALWAYS INCLUDE PARENT CALL ..() AT THE TOP OF THE PROC OR DIE IN FIRE. Return values should be one of TOPIC_*

can_run

Check if the user can run program. Only humans can operate computer. Automatically called in run_program(). User has to wear their ID or have it inhand for ID Scan to work. Can also be called manually, with optional parameter being access_to_check to scan the user's ID

check_eye

Relays the call to nano module, if we have one

event_idremoved

Called when the ID card is removed from computer. ID is removed AFTER this proc.

event_networkfailure

Called when the network connectivity fails. Computer does necessary checks and only calls this when requires_ntnet_feature and similar variables are not met.

event_powerfailure

Called when the computer fails due to power loss. Override when program wants to specifically react to power loss.

generate_network_log

Attempts to create a log in global ntnet datum. Returns TRUE on success, FALSE on fail.

get_header_data

This attempts to retrieve header data for NanoUIs. If implementing completely new device of different type than existing ones, always include the device here in this proc. This proc basically relays the request to whatever is running the program.

on_shutdown

Use this proc to kill the program. Designed to be implemented by each program if it requires on-quit logic, such as the NTNRC client.

on_startup

When implementing new program based device, use this to run the program. May be overriden to add extra logic. Remember to include ..() call.

process_tick

Called by Process() on device that runs us, once every tick. Remember to call ..() if overriding

ui_interact

This is called every tick when the program is enabled. Ensure you do parent call if you override it. If parent returns TRUE continue with UI initialisation. It returns FALSE if it can't run or if NanoModule was used instead. I suggest using NanoModules where applicable.

update_computer_icon

Relays icon update to the computer.