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

Experiment

This is the base datum for experiments, storing the base definition.

This class should be subclassed for producing actual experiments. The proc stubs should be implemented in whole.

Vars

allowed_experimentorsA list of types that are allowed to experiment with this dastum
completedWhether the experiment has been completed
descriptionA brief description of the experiment to be shown as details
exp_tagA descriptive tag used on UI elements to denote 'types' of experiments
nameName that distinguishes the experiment
performance_hintA textual hint shown on the UI in a tooltip to help a user determine how to perform the experiment
points_rewardIf set, these techweb points will be rewarded for completing the experiment. Useful for those loose ends not tied to any specific node discount or requirement.
traitsTraits related to the experiment

Procs

NewPerforms any necessary initialization of tags and other variables
actionableGets if the experiment is actionable provided some arguments
check_progressGets the current progress towards the goal of the experiment
finish_experimentCalled when you complete an experiment, makes sure the techwebs knows the experiment was finished, and tells everyone it happend, yay!
is_completeChecks if the experiment is complete
on_selectedCalled when the experiment is selected by an experiment handler, for specific signals and the such.
on_unselectedCalled when the opposite happens.
perform_experimentProc that tries to perform the experiment, and then checks if its completed.
perform_experiment_actionsAttempts to perform the experiment provided some arguments

Var Details

allowed_experimentors

A list of types that are allowed to experiment with this dastum

completed

Whether the experiment has been completed

description

A brief description of the experiment to be shown as details

exp_tag

A descriptive tag used on UI elements to denote 'types' of experiments

name

Name that distinguishes the experiment

performance_hint

A textual hint shown on the UI in a tooltip to help a user determine how to perform the experiment

points_reward

If set, these techweb points will be rewarded for completing the experiment. Useful for those loose ends not tied to any specific node discount or requirement.

traits

Traits related to the experiment

Proc Details

New

Performs any necessary initialization of tags and other variables

actionable

Gets if the experiment is actionable provided some arguments

This proc should be overridden such that the return value is a boolean value representing if the experiment could be actioned with the provided arguments.

check_progress

Gets the current progress towards the goal of the experiment

This proc should be overridden such that the return value is a list of lists, wherein each inner list represents a stage. Stages have types, see _DEFINES/experisci.dm. Each stage should be constructed using one of several available macros in that file.

finish_experiment

Called when you complete an experiment, makes sure the techwebs knows the experiment was finished, and tells everyone it happend, yay!

is_complete

Checks if the experiment is complete

This proc should be overridden such that it returns TRUE/FALSE to state if the experiment is complete or not.

on_selected

Called when the experiment is selected by an experiment handler, for specific signals and the such.

on_unselected

Called when the opposite happens.

perform_experiment

Proc that tries to perform the experiment, and then checks if its completed.

perform_experiment_actions

Attempts to perform the experiment provided some arguments

This proc should be overridden such that the experiment will be actioned with some defined arguments