Experiment Handler
This is the component for interacting with experiments from a connected techweb. It is generic and should be set-up to automatically work on any class it is attached to without outside code (Excluding potential callbacks)
Vars | |
allowed_experiments | Holds the list of types of experiments that this experiment_handler can interact with |
---|---|
blacklisted_experiments | Holds the list of types of experiments that this experimennt_handler should NOT interact with |
config_flags | Additional configuration flags for how the experiment_handler operates |
disallowed_traits | A set of optional experiment traits (see defines) that are disallowed for any experiments |
linked_web | Holds the currently linked techweb to get experiments from |
selected_experiment | Holds the currently selected experiment |
start_experiment_callback | Callback that, when supplied, can be called from the UI |
Procs | |
Initialize | Initializes a new instance of the experiment_handler component |
action_experiment | Attempts to perform the selected experiment given some arguments |
announce_message | Announces a message to this experiment handler |
announce_message_to_all | Announces a message to all experiment handlers |
can_select_experiment | Checks if an experiment is valid to be selected by this handler |
configure_experiment | Attempts to show the user the experiment configuration panel |
configure_experiment_click | Attempts to show the user the experiment configuration panel |
ignored_handheld_experiment_attempt | Provides feedback when an item isn't related to an experiment, and has fully passed the attack chain |
link_experiment | Attempts to link this experiment_handler to a provided experiment |
link_techweb | Attempts to link this experiment_handler to a provided techweb |
should_run_handheld_experiment | Checks that an experiment can be run using the provided target, used for preventing the cancellation of the attack chain inappropriately |
try_run_autopsy_experiment | Hooks on a successful autopsy experiment |
try_run_destructive_experiment | Hooks on destructive scans to try and run an experiment (When using a handheld handler) |
try_run_handheld_experiment | Hooks on attack to try and run an experiment (When using a handheld handler) |
try_run_handheld_experiment_async | This proc exists because Jared Fogle really likes async |
ui_handle_experiment | Hook for handling UI interaction via signals |
unlink_experiment | Unlinks this handler from the selected experiment |
unlink_techweb | Unlinks this handler from the selected techweb |
Var Details
allowed_experiments
Holds the list of types of experiments that this experiment_handler can interact with
blacklisted_experiments
Holds the list of types of experiments that this experimennt_handler should NOT interact with
config_flags
Additional configuration flags for how the experiment_handler operates
disallowed_traits
A set of optional experiment traits (see defines) that are disallowed for any experiments
linked_web
Holds the currently linked techweb to get experiments from
selected_experiment
Holds the currently selected experiment
start_experiment_callback
Callback that, when supplied, can be called from the UI
Proc Details
Initialize
Initializes a new instance of the experiment_handler component
Arguments:
- allowed_experiments - The list of /datum/experiment types that can be performed with this component
- blacklisted_experiments - The list of /datum/experiment types that explicitly cannot be performed with this component
- config_mode - The define that determines how the experiment_handler should display the configuration UI
- disallowed_traits - Flags that control what experiment traits are blacklisted by this experiment handler
- config_flags - Flags that control the operational behaviour of the experiment handler, see experiment defines
- start_experiment_callback - When provided adds a UI button to use this callback to the start the experiment
action_experiment
Attempts to perform the selected experiment given some arguments
announce_message
Announces a message to this experiment handler
Arguments:
- message - The message to announce
announce_message_to_all
Announces a message to all experiment handlers
Arguments:
- message - The message to announce
can_select_experiment
Checks if an experiment is valid to be selected by this handler
Arguments:
- experiment - The experiment to check
configure_experiment
Attempts to show the user the experiment configuration panel
Arguments:
- user - The user to show the experiment configuration panel to
configure_experiment_click
Attempts to show the user the experiment configuration panel
Arguments:
- user - The user to show the experiment configuration panel to
ignored_handheld_experiment_attempt
Provides feedback when an item isn't related to an experiment, and has fully passed the attack chain
link_experiment
Attempts to link this experiment_handler to a provided experiment
Arguments:
- experiment - The experiment to attempt to link to
link_techweb
Attempts to link this experiment_handler to a provided techweb
This proc attempts to link the handler to a provided techweb, overriding the existing techweb if relevant
Arguments:
- new_web - The new techweb to link to
should_run_handheld_experiment
Checks that an experiment can be run using the provided target, used for preventing the cancellation of the attack chain inappropriately
try_run_autopsy_experiment
Hooks on a successful autopsy experiment
try_run_destructive_experiment
Hooks on destructive scans to try and run an experiment (When using a handheld handler)
try_run_handheld_experiment
Hooks on attack to try and run an experiment (When using a handheld handler)
try_run_handheld_experiment_async
This proc exists because Jared Fogle really likes async
ui_handle_experiment
Hook for handling UI interaction via signals
unlink_experiment
Unlinks this handler from the selected experiment
unlink_techweb
Unlinks this handler from the selected techweb