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

Scanning Experiment

This is the base implementation of scanning experiments.

This class should be subclassed for producing actual experiments. The procs should be extended where necessary.

Vars

required_atomsThe typepaths and number of atoms that must be scanned
scan_messageIf set, it'll be used in place of the generic "Scan samples of \a [initial(target.name)]" in serialize_progress_stage()
scannedThe list of atoms with sub-lists of atom references for scanned atoms contributing to the experiment (Or a count of atoms destoryed for destructive expiriments)

Procs

NewInitializes the scanned atoms lists
check_progressGets the number of atoms that have been scanned and the goal
do_after_experimentPerforms actions following a successful experiment action
experiment_requirementsAttempts to get the typepath for an atom that would contribute to the experiment
final_contributing_index_checksPerforms any additional checks against the atom being considered for selection as a contributing index
is_completeChecks if the scanning experiment is complete
perform_experiment_actionsAttempts to scan an atom towards the experiment's goal
serialize_progress_stageSerializes a progress stage into a list to be sent to the UI

Var Details

required_atoms

The typepaths and number of atoms that must be scanned

scan_message

If set, it'll be used in place of the generic "Scan samples of \a [initial(target.name)]" in serialize_progress_stage()

scanned

The list of atoms with sub-lists of atom references for scanned atoms contributing to the experiment (Or a count of atoms destoryed for destructive expiriments)

Proc Details

New

Initializes the scanned atoms lists

Initializes the internal scanned atoms list to keep track of which atoms have already been scanned

check_progress

Gets the number of atoms that have been scanned and the goal

This proc returns a string describing the number of atoms that have been scanned as well as the target number of atoms.

do_after_experiment

Performs actions following a successful experiment action

This proc is intended to be used to add additional functionality to follow experiment actions without having to change the perform_experiment_actions proc to get access to the selected typepath index Arguments:

experiment_requirements

Attempts to get the typepath for an atom that would contribute to the experiment

This proc checks the required atoms for a typepath that this target atom can contribute to and if found returns that typepath, otherwise returns null Arguments:

final_contributing_index_checks

Performs any additional checks against the atom being considered for selection as a contributing index

This proc is intended to be used to add additional functionality to contributing index checks without having to duplicate the iteration structure of experiment_requirements() Arguments:

is_complete

Checks if the scanning experiment is complete

Returns TRUE/FALSE as to if the necessary number of atoms have been scanned.

perform_experiment_actions

Attempts to scan an atom towards the experiment's goal

This proc attempts to scan an atom towards the experiment's goal, and returns TRUE/FALSE based on success. Arguments:

serialize_progress_stage

Serializes a progress stage into a list to be sent to the UI

Arguments: