modular_computer

Vars | |
active_program | The program currently active on the tablet. |
---|---|
allow_chunky | Allow people with chunky fingers to use? |
base_active_power_usage | Power usage when the computer is open (screen is active) and can be interacted with. |
base_idle_power_usage | Power usage when the computer is idle and screen is off. |
comp_light_color | The built-in light's color, editable by players. |
comp_light_luminosity | How far the computer's light can reach, is not editable by players. |
computer_id_slot | The ID currently stored in the computer. |
crew_manifest_update | Does the console update the crew manifest when the ID is removed? |
default_programs | Static list of default programs that come with ALL computers, here so computers don't have to repeat this. |
device_theme | The theme, used for the main menu and file browser apps. |
disabled_time | If the computer's flashlight/LED light has forcibly disabled for a temporary amount of time. |
enabled | Bool on whether the computer is currently active or not. |
hardware_flag | Flag of the type of device the modular computer is, deciding what types of apps it can run. |
has_light | If the computer has a flashlight/LED light built-in. |
honkvirus_amount | If hit by a Clown virus, remaining honks left until it stops. |
icon_state_menu | Icon state overlay when the computer is turned on, but no program is loaded (programs override this). |
icon_state_powered | If set, what the icon_state will be if the computer is powered. |
icon_state_unpowered | If set, what the icon_state will be if the computer is unpowered. |
idle_threads | Idle programs on background. They still receive process calls but can't be interacted with. |
inserted_disk | The disk in this PDA. If set, this will be inserted on Initialize. |
inserted_pai | A pAI currently loaded into the modular computer. |
internal_cell | The power cell the computer uses to run on. |
long_ranged | Whether the PDA can still use NTNet while out of NTNet's reach. |
looping_sound | Whether or not this modular computer uses the looping sound |
max_capacity | The amount of storage space the computer starts with. |
max_idle_programs | Amount of programs that can be ran at once |
max_paper | The max amount of paper that can be held at once. |
physical | The 'computer' itself, as an obj. Primarily used for Adjacent() and UI visibility checks, especially for computers. |
saved_identification | The full name of the stored ID card's identity. These vars should probably be on the PDA. |
saved_job | The job title of the stored ID card |
screen_on | If the screen is open, only used by laptops. |
soundloop | Looping sound for when the computer is on. |
starting_programs | Non-static list of programs the computer should recieve on Initialize. |
steel_sheet_cost | Amount of steel sheets refunded when disassembling an empty frame of this computer. |
stored_files | List of stored files on this drive. Use store_file and remove_file instead of modifying directly! |
stored_paper | The amount of paper currently stored in the PDA |
used_capacity | The amount of storage space we've got filled |
Procs | |
InsertID | InsertID Attempt to insert the ID in either card slot. Args: inserting_id - the ID being inserted user - The person inserting the ID |
RemoveID | Removes the ID card from the computer, and puts it in loc's hand if it's a mob Args: user - The mob trying to remove the ID, if there is one |
alert_call | Displays notification text alongside a soundbeep when requested to by a program. |
can_store_file | can_store_file |
check_power_override | Used by subtypes for special cases for power usage, returns TRUE if it should stop the use_power chain. |
find_file_by_name | find_file_by_name |
find_file_by_uid | find_file_by_uid |
get_messenger_ending | Returns a string of what to send at the end of messenger's messages. |
handle_power | Takes the charge necessary from the Computer, shutting it off if it's unable to provide it. Charge depends on whether the PC is on, and what programs are running/idle on it. |
imprint_id | Imprints name and job into the modular computer, and calls back to necessary functions. Acts as a replacement to directly setting the imprints fields. All fields are optional, the proc will try to fill in missing gaps. |
on_saboteur | Disables the computer's flashlight/LED light, if it has one, for a given disrupt_duration. |
play_ping | Plays a ping sound. |
remove_file | remove_file |
reset_imprint | Resets the imprinted name and job back to null. |
set_flashlight_color | Sets the computer's light color, if it has a light. |
store_file | store_file |
toggle_flashlight | Toggles the computer's flashlight, if it has one. |
update_tablet_open_uis | update_tablet_open_uis |
Var Details
active_program

The program currently active on the tablet.
allow_chunky

Allow people with chunky fingers to use?
base_active_power_usage

Power usage when the computer is open (screen is active) and can be interacted with.
base_idle_power_usage

Power usage when the computer is idle and screen is off.
comp_light_color

The built-in light's color, editable by players.
comp_light_luminosity

How far the computer's light can reach, is not editable by players.
computer_id_slot

The ID currently stored in the computer.
crew_manifest_update

Does the console update the crew manifest when the ID is removed?
default_programs

Static list of default programs that come with ALL computers, here so computers don't have to repeat this.
device_theme

The theme, used for the main menu and file browser apps.
disabled_time

If the computer's flashlight/LED light has forcibly disabled for a temporary amount of time.
enabled

Bool on whether the computer is currently active or not.
hardware_flag

Flag of the type of device the modular computer is, deciding what types of apps it can run.
has_light

If the computer has a flashlight/LED light built-in.
honkvirus_amount

If hit by a Clown virus, remaining honks left until it stops.
icon_state_menu

Icon state overlay when the computer is turned on, but no program is loaded (programs override this).
icon_state_powered

If set, what the icon_state will be if the computer is powered.
icon_state_unpowered

If set, what the icon_state will be if the computer is unpowered.
idle_threads

Idle programs on background. They still receive process calls but can't be interacted with.
inserted_disk

The disk in this PDA. If set, this will be inserted on Initialize.
inserted_pai

A pAI currently loaded into the modular computer.
internal_cell

The power cell the computer uses to run on.
long_ranged

Whether the PDA can still use NTNet while out of NTNet's reach.
looping_sound

Whether or not this modular computer uses the looping sound
max_capacity

The amount of storage space the computer starts with.
max_idle_programs

Amount of programs that can be ran at once
max_paper

The max amount of paper that can be held at once.
physical

The 'computer' itself, as an obj. Primarily used for Adjacent() and UI visibility checks, especially for computers.
saved_identification

The full name of the stored ID card's identity. These vars should probably be on the PDA.
saved_job

The job title of the stored ID card
screen_on

If the screen is open, only used by laptops.
soundloop

Looping sound for when the computer is on.
starting_programs

Non-static list of programs the computer should recieve on Initialize.
steel_sheet_cost

Amount of steel sheets refunded when disassembling an empty frame of this computer.
stored_files

List of stored files on this drive. Use store_file
and remove_file
instead of modifying directly!
stored_paper

The amount of paper currently stored in the PDA
used_capacity

The amount of storage space we've got filled
Proc Details
InsertID
InsertID Attempt to insert the ID in either card slot. Args: inserting_id - the ID being inserted user - The person inserting the ID
RemoveID
Removes the ID card from the computer, and puts it in loc's hand if it's a mob Args: user - The mob trying to remove the ID, if there is one
alert_call
Displays notification text alongside a soundbeep when requested to by a program.
After checking that the requesting program is allowed to send an alert, creates a visible message of the requested text alongside a soundbeep. This proc adds text to indicate that the message is coming from this device and the program on it, so the supplied text should be the exact message and ending punctuation.
Arguments: The program calling this proc. The message that the program wishes to display.
can_store_file
can_store_file
Checks if a computer can store a file, as computers can only store unique files. returns TRUE if possible, FALSE otherwise.
check_power_override
Used by subtypes for special cases for power usage, returns TRUE if it should stop the use_power chain.
find_file_by_name
find_file_by_name
Will check all applications in a tablet for files and, if they have
the same filename (disregarding extension), will return it.
If a computer disk is passed instead, it will check the disk over the computer.
find_file_by_uid
find_file_by_uid
Will check all files in this computer and returns the file with the matching uid. A file's uid is always unique to them, so this proc is sometimes preferable over find_file_by_name. If a computer disk is passed instead, it will check the disk over the computer.
get_messenger_ending
Returns a string of what to send at the end of messenger's messages.
handle_power
Takes the charge necessary from the Computer, shutting it off if it's unable to provide it. Charge depends on whether the PC is on, and what programs are running/idle on it.
imprint_id
Imprints name and job into the modular computer, and calls back to necessary functions. Acts as a replacement to directly setting the imprints fields. All fields are optional, the proc will try to fill in missing gaps.
on_saboteur
Disables the computer's flashlight/LED light, if it has one, for a given disrupt_duration.
Called when sent COMSIG_HIT_BY_SABOTEUR.
play_ping
Plays a ping sound.
Timers runtime if you try to make them call playsound. Yep.
remove_file
remove_file
Removes a given file from the computer, if possible. Properly checking if the file even exists and is in the computer. Returns TRUE if successfully completed, FALSE otherwise
reset_imprint
Resets the imprinted name and job back to null.
set_flashlight_color
Sets the computer's light color, if it has a light.
Called from ui_act(), this proc takes a color string and applies it. It is separated from ui_act() to be overwritten as needed. Arguments:
- color is the string that holds the color value that we should use. Proc auto-fails if this is null.
store_file
store_file
Adds an already initialized file to the computer, checking if one already exists. Returns TRUE if successfully stored, FALSE otherwise.
toggle_flashlight
Toggles the computer's flashlight, if it has one.
Called from ui_act(), does as the name implies. It is separated from ui_act() to be overwritten as needed.
update_tablet_open_uis
update_tablet_open_uis
Will search the user to see if they have the tablet open. If they don't, we'll open a new UI depending on the tab the tablet is meant to be on. If they do, we'll update the interface and title, then update all static data and re-send assets.
This is best called when you're actually changing the app, as we don't check if we're swapping to the current UI repeatedly. Args: user - The person whose UI we're updating.