Space Station 13 - Modules - TypesVar Details - Proc Details

pAI Software

Datum module for pAI software

Very similar to the PDA app datum, this determines what UI sub-template to use, as well as the RAM cost, and if it is toggle software (not a UI app)

Vars

defaultDo we have this software installed by default
idID for the software. This must be unique
nameName for the software. This is used as the button text when buying or opening/toggling the software
pai_holderpAI which holds this software
ram_costRAM cost; pAIs start with 100 RAM, spending it on programs
template_fileTemplate for the TGUI file
toggle_softwareWhether this software is a toggle or not
ui_iconIcon for inside the UI

Procs

NewNew handler
get_app_dataHandler for the app's UI data
get_holding_mobHelper proc so that pAIs can get the mob holding them
is_activeHelper for checking if a toggle is enabled or not
toggleHandler for toggling toggle apps on and off
ui_actui_act sanity check helper

Var Details

default

Do we have this software installed by default

id

ID for the software. This must be unique

name

Name for the software. This is used as the button text when buying or opening/toggling the software

pai_holder

pAI which holds this software

ram_cost

RAM cost; pAIs start with 100 RAM, spending it on programs

template_file

Template for the TGUI file

toggle_software

Whether this software is a toggle or not

ui_icon

Icon for inside the UI

Proc Details

New

New handler

Ensures that the pai_holder var is set to the pAI itself Arguments:

get_app_data

Handler for the app's UI data

This returns the list of the current app's data for the UI This will then be injected as a variable on the TGUI data called "app_data"

Arguments:

get_holding_mob

Helper proc so that pAIs can get the mob holding them

This needs to exist because pAIs have many different locs (Held card, mob itself, in pocket, etc)

Arguments:

is_active

Helper for checking if a toggle is enabled or not

Returns TRUE if the toggle software is active, FALSE if not

Its like this instead of a simple is_toggled var because some toggles override eachother and this is easier

Arguments:

toggle

Handler for toggling toggle apps on and off

This is invoked whenever you toggle a toggleable function Put your toggleable work in here

Arguments:

ui_act

ui_act sanity check helper

Basically checks the existing href exploit stuff, as well as making sure the user using the UI is the pAI itself