Daedalus Dock - Modules - TypesVar Details - Proc Details

id_access

Vars

access_flag_string_by_flagDictionary of access flag string representations. Keys are bitflags. Values are their associated names.
accesses_by_flagDictionary of access lists. Keys are access flag names. Values are lists of all accesses as part of that access.
accesses_by_regionDictionary of accesses based on station region. Keys are region strings. Values are lists of accesses.
all_region_access_tguiSpecially formatted list for sending access levels to tgui interfaces.
centcom_job_templatesHelper list containing all trim paths that can be used as Centcom templates.
desc_by_accessDictionary of access names. Keys are access levels. Values are their associated names.
flags_by_accessDictionary of access flags. Keys are accesses. Values are their associated bitflags.
spare_id_safe_codeThe 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_job_templatesHelper list containing all trim 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_templatesHelper 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.
station_regionsHelper list containing all station regions.
sub_department_managers_tguiList of accesses for the Heads of each sub-department alongside the regions they control and their job name.
trim_singletons_by_pathDictionary of trim singletons. Keys are paths. Values are their associated singletons.
wildcard_flags_by_wildcardDictionary of wildcard compatibility flags. Keys are strings for the wildcards. Values are their associated flags.

Procs

add_trim_access_to_cardAdds the accesses associated with a trim to an ID card.
apply_trim_to_cardApplies a trim singleton to a card.
apply_trim_to_chameleon_card
get_access_descReturns the access description associated with any given access level.
get_access_flagReturns the access bitflags associated with any given access level.
get_flag_access_listReturns the list of all accesses associated with any given access flag.
get_region_access_listBuilds and returns a list of accesses from a list of regions.
refresh_job_trim_singletonsCalled by [/datum/controller/subsystem/ticker/proc/setup]
remove_trim_from_cardRemoves a trim from an ID card. Also removes all accesses from it too.
remove_trim_from_chameleon_cardRemoves a trim from a chameleon ID card.
setup_access_descriptionsSetup dictionary that converts access levels to text descriptions.
setup_access_flagsBuild access flag lists.
setup_region_listsPopulates the region lists with data about which accesses correspond to which regions.
setup_tgui_listsCreates various data structures that primarily get fed to tgui interfaces, although these lists are used in other places.
setup_trim_singletonsInstantiate trim singletons and add them to a list.
setup_wildcard_dictSet up dictionary to convert wildcard names to flags.
tally_accessTallies up all accesses the card has that have flags greater than or equal to the access_flag supplied.

Var Details

access_flag_string_by_flag

Dictionary of access flag string representations. Keys are bitflags. Values are their associated names.

accesses_by_flag

Dictionary of access lists. Keys are access flag names. Values are lists of all accesses as part of that access.

accesses_by_region

Dictionary of accesses based on station region. Keys are region strings. Values are lists of accesses.

all_region_access_tgui

Specially formatted list for sending access levels to tgui interfaces.

centcom_job_templates

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

desc_by_access

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

flags_by_access

Dictionary of access flags. Keys are accesses. Values are their associated bitflags.

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_job_templates

Helper list containing all trim 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.

station_regions

Helper list containing all station regions.

sub_department_managers_tgui

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

trim_singletons_by_path

Dictionary of trim singletons. Keys are paths. Values are their associated singletons.

wildcard_flags_by_wildcard

Dictionary of wildcard compatibility flags. Keys are strings for the wildcards. Values are their associated flags.

Proc Details

add_trim_access_to_card

Adds the accesses associated with a trim to an ID card.

Clears the card's existing access levels first. Primarily intended for applying trim templates to cards. Will attempt to add as many ordinary access levels as it can, without consuming any wildcards. Will then attempt to apply the trim-specific wildcards after.

Arguments:

apply_trim_to_card

Applies a trim singleton to a card.

Returns FALSE if the trim could not be applied due to being incompatible with the card. Incompatibility is defined as a card not being able to hold all the trim's required wildcards. Returns TRUE otherwise. Arguments:

apply_trim_to_chameleon_card

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:

get_access_flag

Returns the access bitflags associated with any given access level.

In proc form due to accesses being stored in the list as text instead of numbers. Arguments:

get_flag_access_list

Returns the list of all accesses associated with any given access flag.

In proc form due to accesses being stored in the list as text instead of numbers. Arguments:

get_region_access_list

Builds and returns a list of accesses from a list of regions.

Arguments:

refresh_job_trim_singletons

Called by [/datum/controller/subsystem/ticker/proc/setup]

This runs through every /datum/id_trim/job singleton and ensures that its access is setup according to appropriate config entries.

remove_trim_from_card

Removes a trim from an ID card. Also removes all accesses from it too.

Arguments:

remove_trim_from_chameleon_card

Removes a trim from a chameleon ID card.

Arguments:

setup_access_descriptions

Setup dictionary that converts access levels to text descriptions.

setup_access_flags

Build access flag lists.

setup_region_lists

Populates the region lists with data about which accesses correspond to which regions.

setup_tgui_lists

Creates various data structures that primarily get fed to tgui interfaces, although these lists are used in other places.

setup_trim_singletons

Instantiate trim singletons and add them to a list.

setup_wildcard_dict

Set up dictionary to convert wildcard names to flags.

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 have flags matching access_flag or a higher tier access. Arguments: