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

modular_computer

Vars

active_programThe program currently active on the tablet.
allow_chunkyAllow people with chunky fingers to use?
base_active_power_usagePower usage when the computer is open (screen is active) and can be interacted with.
base_idle_power_usagePower usage when the computer is idle and screen is off.
comp_light_colorThe built-in light's color, editable by players.
comp_light_luminosityHow far the computer's light can reach, is not editable by players.
computer_id_slotThe ID currently stored in the computer.
crew_manifest_updateDoes the console update the crew manifest when the ID is removed?
default_programsStatic list of default programs that come with ALL computers, here so computers don't have to repeat this.
device_themeThe theme, used for the main menu and file browser apps.
disabled_timeIf the computer's flashlight/LED light has forcibly disabled for a temporary amount of time.
enabledBool on whether the computer is currently active or not.
hardware_flagFlag of the type of device the modular computer is, deciding what types of apps it can run.
has_lightIf the computer has a flashlight/LED light built-in.
honkvirus_amountIf hit by a Clown virus, remaining honks left until it stops.
icon_state_menuIcon state overlay when the computer is turned on, but no program is loaded (programs override this).
icon_state_poweredIf set, what the icon_state will be if the computer is powered.
icon_state_unpoweredIf set, what the icon_state will be if the computer is unpowered.
idle_threadsIdle programs on background. They still receive process calls but can't be interacted with.
inserted_diskThe disk in this PDA. If set, this will be inserted on Initialize.
inserted_paiA pAI currently loaded into the modular computer.
internal_cellThe power cell the computer uses to run on.
long_rangedWhether the PDA can still use NTNet while out of NTNet's reach.
looping_soundWhether or not this modular computer uses the looping sound
max_capacityThe amount of storage space the computer starts with.
max_idle_programsAmount of programs that can be ran at once
max_paperThe max amount of paper that can be held at once.
physicalThe 'computer' itself, as an obj. Primarily used for Adjacent() and UI visibility checks, especially for computers.
saved_identificationThe full name of the stored ID card's identity. These vars should probably be on the PDA.
saved_jobThe job title of the stored ID card
screen_onIf the screen is open, only used by laptops.
shellReference to the circuit shell component, because we're special and do special things with it, such as creating and deleting unremovable circuit comps based on the programs installed.
shell_capacityThe capacity of the circuit shell component of this item
soundloopLooping sound for when the computer is on.
starting_programsNon-static list of programs the computer should receive on Initialize.
steel_sheet_costAmount of steel sheets refunded when disassembling an empty frame of this computer.
stored_filesList of stored files on this drive. Use store_file and remove_file instead of modifying directly!
stored_paperThe amount of paper currently stored in the PDA
used_capacityThe amount of storage space we've got filled

Procs

InsertIDInsertID Attempt to insert the ID in either card slot, if ID is present - attempts swap Args: inserting_id - the ID being inserted user - The person inserting the ID
RemoveIDRemoves 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 silent - Boolean, determines whether fluff text would be printed
add_shell_componentInitialize the shell for this item, or the physical machinery it belongs to.
alert_callDisplays notification text alongside a soundbeep when requested to by a program.
can_store_filecan_store_file
check_power_overrideReturns TRUE if the PC should not be using any power, FALSE otherwise. Checks to see if the current app allows to be ran without power, if so we'll run with it.
find_file_by_namefind_file_by_name
find_file_by_uidfind_file_by_uid
get_messenger_endingReturns a string of what to send at the end of messenger's messages.
handle_powerTakes 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_idImprints 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_saboteurDisables the computer's flashlight/LED light, if it has one, for a given disrupt_duration.
play_pingPlays a ping sound.
power_failureShuts down the computer from powerloss.
remove_fileremove_file
reset_imprintResets the imprinted name and job back to null.
set_flashlight_colorSets the computer's light color, if it has a light.
store_filestore_file
toggle_flashlightToggles the computer's flashlight, if it has one.
update_tablet_open_uisupdate_tablet_open_uis
use_energyDraws power from its rightful source (area if its a computer, the cell otherwise) Takes into account special cases, like silicon PDAs through override, and nopower apps.
use_energy_for_circuitsTry to draw power from our internal cell first, before switching to that of the circuit.

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.

shell

Reference to the circuit shell component, because we're special and do special things with it, such as creating and deleting unremovable circuit comps based on the programs installed.

shell_capacity

The capacity of the circuit shell component of this item

soundloop

Looping sound for when the computer is on.

starting_programs

Non-static list of programs the computer should receive 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, if ID is present - attempts swap 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 silent - Boolean, determines whether fluff text would be printed

add_shell_component

Initialize the shell for this item, or the physical machinery it belongs to.

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

Returns TRUE if the PC should not be using any power, FALSE otherwise. Checks to see if the current app allows to be ran without power, if so we'll run with it.

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.

power_failure

Shuts down the computer from powerloss.

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:

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. Only necessary if we're opening the UI for the first time.

use_energy

Draws power from its rightful source (area if its a computer, the cell otherwise) Takes into account special cases, like silicon PDAs through override, and nopower apps.

use_energy_for_circuits

Try to draw power from our internal cell first, before switching to that of the circuit.