mail ![code/controllers/subsystem/mail.dm 1](git.png)
Vars | |
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 |
Procs | |
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 |
Var Details
all_patterns ![code/controllers/subsystem/mail.dm 62](git.png)
Assoc list: pattern_name = pattern_object with all patterns, used in admin panel. Initialized in SSmail init.
all_patterns_by_category ![code/controllers/subsystem/mail.dm 56](git.png)
Assoc list of all patterns by categories, initialized in SSmail/Initialize() proc
all_patterns_info ![code/controllers/subsystem/mail.dm 59](git.png)
Assoc list: pattern_name = pattern_info_list with info about all patterns, used in admin panel. Initialized in SSmail init.
mail_categories_with_colors ![code/controllers/subsystem/mail.dm 33](git.png)
Assoc list 'mail category' = 'mail category color'
mail_categories_with_names ![code/controllers/subsystem/mail.dm 44](git.png)
Assoc list 'mail category' = 'mail category name'. Used in admin panel
mail_categories_with_weights ![code/controllers/subsystem/mail.dm 22](git.png)
Assoc list 'mail category' = 'mail category weight'
mail_waiting ![code/controllers/subsystem/mail.dm 14](git.png)
Count of mails, created by SSmail in main storage, waiting to be sent to station. Nullifies when storage was sent.
main_storage ![code/controllers/subsystem/mail.dm 16](git.png)
Main storage of SSmail, where mails are created
main_storage_spawnpoint ![code/controllers/subsystem/mail.dm 18](git.png)
Turf, where main mail storage of SSmail will be spawned
sealed_mails ![code/controllers/subsystem/mail.dm 9](git.png)
Mails on station, which was not opened yet
total_mails_count ![code/controllers/subsystem/mail.dm 11](git.png)
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