Space Station 13 - Modules - TypesVar Details - Proc Details

mail

Vars

all_patternsAssoc list: pattern_name = pattern_object with all patterns, used in admin panel. Initialized in SSmail init.
all_patterns_by_categoryAssoc list of all patterns by categories, initialized in SSmail/Initialize() proc
all_patterns_infoAssoc list: pattern_name = pattern_info_list with info about all patterns, used in admin panel. Initialized in SSmail init.
mail_categories_with_colorsAssoc list 'mail category' = 'mail category color'
mail_categories_with_namesAssoc list 'mail category' = 'mail category name'. Used in admin panel
mail_categories_with_weightsAssoc list 'mail category' = 'mail category weight'
mail_waitingCount of mails, created by SSmail in main storage, waiting to be sent to station. Nullifies when storage was sent.
main_storageMain storage of SSmail, where mails are created
main_storage_spawnpointTurf, where main mail storage of SSmail will be spawned
sealed_mailsMails on station, which was not opened yet
total_mails_countTotal amount of arrived letters during the round

Procs

category_colorizeConverts subsystem to color
category_to_textConverts subsystem to readable text
choose_patternChoosing mail pattern for specific recipient in accordance to all weights
create_mail_for_recipientCreates a mail for a specific recipient
create_main_storageCreates new main_storage on specific turf
delete_obsolete_mailsDeleting mails from sealed_mails list, which lifetime was expired, calling their mail/disappear() proc
generate_mailsGenerate 'mail_gen_count' number of mails for random valid recipients in main_storage
parse_weights_to_htmlCreates beatiful (maybe) HTML string from weights_assoc_list for debugging
regenerate_all_weightsReturns 'pattern type = modified weight' assoc list for specific recipient. If you want zero-chance patterns to be included in list, use include_zeros. Used in adminpanel. Filtering goes for specific categories, category or list of them passed in the 'categories' parameter. If 'MAIL_ALL_CATEGORIES' parameter was selected search goes for all categories Modification of weight for specific pattern can be specified in switch-case construction in this proc This modification can filter out incompatible (cookies for synths) patterns or take in accout recipient's prefs
register_mailRegisters mail, adding it to general list, where it will be destroyed in MAIL_DISAPPEAR_TIME if not opened
send_storageSends storage to cargo shuttle and creating new
unregister_mailUnregister mail, removing it from lists

Var Details

all_patterns

Assoc list: pattern_name = pattern_object with all patterns, used in admin panel. Initialized in SSmail init.

all_patterns_by_category

Assoc list of all patterns by categories, initialized in SSmail/Initialize() proc

all_patterns_info

Assoc list: pattern_name = pattern_info_list with info about all patterns, used in admin panel. Initialized in SSmail init.

mail_categories_with_colors

Assoc list 'mail category' = 'mail category color'

mail_categories_with_names

Assoc list 'mail category' = 'mail category name'. Used in admin panel

mail_categories_with_weights

Assoc list 'mail category' = 'mail category weight'

mail_waiting

Count of mails, created by SSmail in main storage, waiting to be sent to station. Nullifies when storage was sent.

main_storage

Main storage of SSmail, where mails are created

main_storage_spawnpoint

Turf, where main mail storage of SSmail will be spawned

sealed_mails

Mails on station, which was not opened yet

total_mails_count

Total amount of arrived letters during the round

Proc Details

category_colorize

Converts subsystem to color

category_to_text

Converts subsystem to readable text

choose_pattern

Choosing mail pattern for specific recipient in accordance to all weights

create_mail_for_recipient

Creates a mail for a specific recipient

create_main_storage

Creates new main_storage on specific turf

delete_obsolete_mails

Deleting mails from sealed_mails list, which lifetime was expired, calling their mail/disappear() proc

generate_mails

Generate 'mail_gen_count' number of mails for random valid recipients in main_storage

parse_weights_to_html

Creates beatiful (maybe) HTML string from weights_assoc_list for debugging

regenerate_all_weights

Returns 'pattern type = modified weight' assoc list for specific recipient. If you want zero-chance patterns to be included in list, use include_zeros. Used in adminpanel. Filtering goes for specific categories, category or list of them passed in the 'categories' parameter. If 'MAIL_ALL_CATEGORIES' parameter was selected search goes for all categories Modification of weight for specific pattern can be specified in switch-case construction in this proc This modification can filter out incompatible (cookies for synths) patterns or take in accout recipient's prefs

register_mail

Registers mail, adding it to general list, where it will be destroyed in MAIL_DISAPPEAR_TIME if not opened

send_storage

Sends storage to cargo shuttle and creating new

unregister_mail

Unregister mail, removing it from lists