/tg/ Station 13 - Modules - TypesVar Details - Proc Details

dcs

Vars

arguments_that_are_lists_by_elementA nested assoc list of bespoke element types (keys) and superlists containing all lists used as arguments (values). Inside the superlists, lists that've been sorted alphabetically are keys, while the original unsorted lists are values.
sorted_arguments_that_are_listsAn assoc list of list instances and their sorted counterparts.

Procs

GetIdFromArgumentsGenerates an id for bespoke elements when given the argument list Generating the id here is a bit complex because we need to support named arguments Named arguments can appear in any order and we need them to appear after ordered arguments We assume that no one will pass in a named argument with a value of null
add_to_arguments_that_are_listsOffloading the first half of the dcs_check_list_arguments here, which is populating the superlist with sublists that will be later compared with each other by the dcs_check_list_arguments unit test.
rotate_decalsRemove old decals and apply new decals after rotation as necessary

Var Details

arguments_that_are_lists_by_element

A nested assoc list of bespoke element types (keys) and superlists containing all lists used as arguments (values). Inside the superlists, lists that've been sorted alphabetically are keys, while the original unsorted lists are values.

e.g. list( /datum/element/first = list(list(A, B, C) = list(B, A, C), list(A, B) = list(A, B)), /datum/element/second = list(list(B, C) = list(C, B), list(D) = list(D)), )

Used by the dcs_check_list_arguments unit test.

sorted_arguments_that_are_lists

An assoc list of list instances and their sorted counterparts.

e.g. list( list(B, A, C) = list(A, B, C), list(C, B) = list(B, C), )

Used to make sure each list instance is sorted no more than once, or the unit test won't work.

Proc Details

GetIdFromArguments

Generates an id for bespoke elements when given the argument list Generating the id here is a bit complex because we need to support named arguments Named arguments can appear in any order and we need them to appear after ordered arguments We assume that no one will pass in a named argument with a value of null

add_to_arguments_that_are_lists

Offloading the first half of the dcs_check_list_arguments here, which is populating the superlist with sublists that will be later compared with each other by the dcs_check_list_arguments unit test.

rotate_decals

Remove old decals and apply new decals after rotation as necessary