/tg/ Station 13 - Modules - Types — Var Details - Proc Details

cyborg_mock_preferences

Keep mock connections out of real registries and detach them on every exit path.

Vars

previous_directoryGLOB.directory from before the test, so we can put it back
previous_persistent_client_listGLOB.persistent_clients from before the test, so we can put it back
previous_persistent_clientsGLOB.persistent_clients_by_ckey from before the test, so we can put it back
previous_preferencesGLOB.preferences_datums from before the test, so we can put it back

Procs

DestroyUnlinks the mock clients and puts the globals back
NewSwaps in empty preference and client globals, so tests never meet real players
create_preferencesReturns memory-only preferences on a mock client, linked to robot when given

Var Details

previous_directory

GLOB.directory from before the test, so we can put it back

previous_persistent_client_list

GLOB.persistent_clients from before the test, so we can put it back

previous_persistent_clients

GLOB.persistent_clients_by_ckey from before the test, so we can put it back

previous_preferences

GLOB.preferences_datums from before the test, so we can put it back

Proc Details

Destroy

Unlinks the mock clients and puts the globals back

New

Swaps in empty preference and client globals, so tests never meet real players

create_preferences

Returns memory-only preferences on a mock client, linked to robot when given