id_access

Vars | |
access_groups | Dictionary of access groups. Keys are typepaths. Values are instances. |
---|---|
centcom_job_templates | Helper list containing all template paths that can be used as Centcom templates. |
desc_by_access | Dictionary of access names. Keys are access levels. Values are their associated names. |
spare_id_safe_code | The roundstart generated code for the spare ID safe. This is given to the Captain on shift start. If there's no Captain, it's given to the HoP. If there's no HoP |
station_groups | Helper list containing all station groups. |
station_job_templates | Helper list containing all template paths that can be used as job templates. Intended to be used alongside logic for ACCESS_CHANGE_IDS. Grab templates from sub_department_managers_tgui for Head of Staff restrictions. |
station_pda_templates | Helper list containing all PDA paths that can be painted by station machines. Intended to be used alongside logic for ACCESS_CHANGE_IDS. Grab templates from sub_department_managers_tgui for Head of Staff restrictions. |
sub_department_managers_tgui | List of accesses for the Heads of each sub-department alongside the regions they control and their job name. |
template_singletons_by_path | Dictionary of template singletons. Keys are paths. Values are their associated singletons. |
tgui_access_groups | Specially formatted list for sending access levels to tgui interfaces. |
Procs | |
apply_template_access_to_card | Adds the accesses associated with a template to an ID card. |
apply_template_to_card | Applies a template singleton to a card. |
apply_template_to_chameleon_card | |
get_access_desc | Returns the access description associated with any given access level. |
get_access_for_group | Returns the list of all accesses associated with any given access group. |
refresh_job_template_singletons | Called by [/datum/controller/subsystem/ticker/proc/setup] |
remove_template_from_card | Removes a template from an ID card. Also removes all accesses from it too. |
remove_template_from_chameleon_card | Removes a template from a chameleon ID card. |
setup_access_descriptions | Setup dictionary that converts access levels to text descriptions. |
setup_access_groups | Initialize access groups. |
setup_template_singletons | Instantiate template singletons and add them to a list. |
setup_tgui_lists | Creates various data structures that primarily get fed to tgui interfaces, although these lists are used in other places. |
tally_access | Tallies up all accesses the card has that have flags greater than or equal to the access_flag supplied. |
Var Details
access_groups

Dictionary of access groups. Keys are typepaths. Values are instances.
centcom_job_templates

Helper list containing all template paths that can be used as Centcom templates.
desc_by_access

Dictionary of access names. Keys are access levels. Values are their associated names.
spare_id_safe_code

The roundstart generated code for the spare ID safe. This is given to the Captain on shift start. If there's no Captain, it's given to the HoP. If there's no HoP
station_groups

Helper list containing all station groups.
station_job_templates

Helper list containing all template paths that can be used as job templates. Intended to be used alongside logic for ACCESS_CHANGE_IDS. Grab templates from sub_department_managers_tgui for Head of Staff restrictions.
station_pda_templates

Helper list containing all PDA paths that can be painted by station machines. Intended to be used alongside logic for ACCESS_CHANGE_IDS. Grab templates from sub_department_managers_tgui for Head of Staff restrictions.
sub_department_managers_tgui

List of accesses for the Heads of each sub-department alongside the regions they control and their job name.
template_singletons_by_path

Dictionary of template singletons. Keys are paths. Values are their associated singletons.
tgui_access_groups

Specially formatted list for sending access levels to tgui interfaces.
Proc Details
apply_template_access_to_card
Adds the accesses associated with a template to an ID card.
Clears the card's existing access levels first. Primarily intended for applying template templates to cards.
Arguments:
- id_card - The ID card to remove the template from.
- template_path - Typepath of the template to use.
apply_template_to_card
Applies a template singleton to a card.
Arguments:
- id_card - ID card to apply the template_path to.
- template_path - A template path to apply to the card. Grabs the template's associated singleton and applies it.
- copy_access - Boolean value. If true, the template's access is also copied to the card.
apply_template_to_chameleon_card
-
Applies a template to a chameleon card. This is purely visual, utilising the card's override vars.
-
Arguments:
-
- id_card - The chameleon card to apply the template visuals to.
-
- template_path - A template path to apply to the card. Grabs the template's associated singleton and applies it.
-
- check_forged - Boolean value. If TRUE, will not overwrite the card's assignment if the card has been forged.
get_access_desc
Returns the access description associated with any given access level.
In proc form due to accesses being stored in the list as text instead of numbers. Arguments:
- access - Access as either pure number or as a string representation of the number.
get_access_for_group
Returns the list of all accesses associated with any given access group.
Arguments:
- group_paths - The group type to retrieve access for. Or a list of them
refresh_job_template_singletons
Called by [/datum/controller/subsystem/ticker/proc/setup]
This runs through every /datum/access_template/job singleton and ensures that its access is setup according to appropriate config entries.
remove_template_from_card
Removes a template from an ID card. Also removes all accesses from it too.
Arguments:
- id_card - The ID card to remove the template from.
remove_template_from_chameleon_card
Removes a template from a chameleon ID card.
Arguments:
- id_card - The ID card to remove the template from.
setup_access_descriptions
Setup dictionary that converts access levels to text descriptions.
setup_access_groups
Initialize access groups.
setup_template_singletons
Instantiate template singletons and add them to a list.
setup_tgui_lists
Creates various data structures that primarily get fed to tgui interfaces, although these lists are used in other places.
tally_access
Tallies up all accesses the card has that have flags greater than or equal to the access_flag supplied.
Returns the number of accesses that are in the given access group. Arguments:
- id_card - The ID card to tally up access for.
- access_group - A typepath to check access for.