mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
# Conflicts: # .github/CODEOWNERS # .github/workflows/compile_changelogs.yml # .github/workflows/stale.yml # SQL/database_changelog.md # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # code/__DEFINES/atom_hud.dm # code/__DEFINES/inventory.dm # code/__DEFINES/mobs.dm # code/__DEFINES/species_clothing_paths.dm # code/__DEFINES/subsystems.dm # code/__DEFINES/surgery.dm # code/__HELPERS/global_lists.dm # code/_globalvars/lists/maintenance_loot.dm # code/_globalvars/traits/_traits.dm # code/controllers/subsystem/minor_mapping.dm # code/controllers/subsystem/processing/quirks.dm # code/controllers/subsystem/shuttle.dm # code/datums/components/palette.dm # code/datums/components/surgery_initiator.dm # code/datums/diseases/advance/advance.dm # code/datums/hud.dm # code/datums/mood.dm # code/datums/mutations/chameleon.dm # code/datums/quirks/negative_quirks/nyctophobia.dm # code/datums/status_effects/debuffs/debuffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/slime/slime_leech.dm # code/datums/weather/weather.dm # code/game/data_huds.dm # code/game/objects/items.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/frog_statue.dm # code/game/objects/items/rcd/RLD.dm # code/game/objects/items/robot/items/hypo.dm # code/game/objects/items/stacks/medical.dm # code/game/objects/items/stacks/wrap.dm # code/game/objects/items/storage/garment.dm # code/game/objects/items/tools/medical/defib.dm # code/game/objects/items/weaponry.dm # code/game/objects/items/weaponry/melee/misc.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/curtains.dm # code/game/objects/structures/dresser.dm # code/game/objects/structures/girders.dm # code/game/objects/structures/maintenance.dm # code/game/objects/structures/mirror.dm # code/modules/admin/greyscale_modify_menu.dm # code/modules/admin/verbs/light_debug.dm # code/modules/antagonists/ashwalker/ashwalker.dm # code/modules/antagonists/heretic/knowledge/starting_lore.dm # code/modules/antagonists/ninja/ninjaDrainAct.dm # code/modules/art/paintings.dm # code/modules/client/preferences.dm # code/modules/client/verbs/ooc.dm # code/modules/clothing/head/wig.dm # code/modules/events/disease_outbreak.dm # code/modules/holodeck/holo_effect.dm # code/modules/jobs/job_types/head_of_security.dm # code/modules/jobs/job_types/security_officer.dm # code/modules/library/skill_learning/generic_skillchips/point.dm # code/modules/mining/lavaland/ash_flora.dm # code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/basic/guardian/guardian.dm # code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm # code/modules/mob/living/carbon/carbon.dm # code/modules/mob/living/carbon/human/human.dm # code/modules/mob/living/carbon/human/human_defines.dm # code/modules/mob/living/carbon/life.dm # code/modules/mob/living/living.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/mob.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mod/mod_control.dm # code/modules/mod/modules/modules_general.dm # code/modules/modular_computers/computers/item/computer_ui.dm # code/modules/paperwork/paper.dm # code/modules/paperwork/paperbin.dm # code/modules/power/lighting/light.dm # code/modules/projectiles/guns/energy/kinetic_accelerator.dm # code/modules/projectiles/projectile.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/food_reagents.dm # code/modules/reagents/chemistry/reagents/other_reagents.dm # code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm # code/modules/research/xenobiology/crossbreeding/_clothing.dm # code/modules/research/xenobiology/crossbreeding/prismatic.dm # code/modules/surgery/advanced/brainwashing.dm # code/modules/surgery/advanced/lobotomy.dm # code/modules/surgery/amputation.dm # code/modules/surgery/blood_filter.dm # code/modules/surgery/bodyparts/_bodyparts.dm # code/modules/surgery/brain_surgery.dm # code/modules/surgery/cavity_implant.dm # code/modules/surgery/coronary_bypass.dm # code/modules/surgery/gastrectomy.dm # code/modules/surgery/healing.dm # code/modules/surgery/limb_augmentation.dm # code/modules/surgery/organ_manipulation.dm # code/modules/surgery/revival.dm # code/modules/surgery/sleeper_protocol.dm # code/modules/surgery/surgery_helpers.dm # code/modules/surgery/surgery_step.dm # code/modules/unit_tests/_unit_tests.dm # code/modules/unit_tests/designs.dm # code/modules/unit_tests/icon_state_worn.dm # code/modules/unit_tests/screenshots/screenshot_antag_icons_cultist.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png # code/modules/unit_tests/screenshots/screenshot_husk_body.png # code/modules/unit_tests/screenshots/screenshot_husk_body_missing_limbs.png # icons/map_icons/clothing/head/_head.dmi # icons/map_icons/clothing/shoes.dmi # icons/map_icons/items/_item.dmi # icons/mob/huds/hud.dmi # icons/mob/inhands/64x64_lefthand.dmi # icons/mob/inhands/64x64_righthand.dmi # icons/obj/machines/computer.dmi # tgui/packages/tgui/interfaces/OperatingComputer.jsx # tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferences/MainPage.tsx # tgui/packages/tgui/interfaces/PreferencesMenu/types.ts # tgui/packages/tgui/interfaces/SurgeryInitiator.tsx # tools/icon_cutter/check.py
375 lines
15 KiB
Plaintext
375 lines
15 KiB
Plaintext
/**
|
|
* # 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)
|
|
*/
|
|
/datum/component/experiment_handler
|
|
/// Holds the currently linked techweb to get experiments from
|
|
var/datum/techweb/linked_web
|
|
/// Holds the currently selected experiment
|
|
var/datum/experiment/selected_experiment
|
|
/// Holds the list of types of experiments that this experiment_handler can interact with
|
|
var/list/allowed_experiments
|
|
/// Holds the list of types of experiments that this experimennt_handler should NOT interact with
|
|
var/list/blacklisted_experiments
|
|
/// A set of optional experiment traits (see defines) that are disallowed for any experiments
|
|
var/disallowed_traits
|
|
/// Additional configuration flags for how the experiment_handler operates
|
|
var/config_flags
|
|
/// Callback that, when supplied, can be called from the UI
|
|
var/datum/callback/start_experiment_callback
|
|
|
|
/**
|
|
* 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
|
|
*/
|
|
/datum/component/experiment_handler/Initialize(allowed_experiments = list(),
|
|
blacklisted_experiments = list(),
|
|
config_mode = EXPERIMENT_CONFIG_ATTACKSELF,
|
|
disallowed_traits = null,
|
|
config_flags = null,
|
|
datum/callback/start_experiment_callback = null,
|
|
list/experiment_signals
|
|
)
|
|
. = ..()
|
|
if(!ismovable(parent))
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
src.allowed_experiments = allowed_experiments
|
|
src.blacklisted_experiments = blacklisted_experiments
|
|
src.disallowed_traits = disallowed_traits
|
|
src.config_flags = config_flags
|
|
src.start_experiment_callback = start_experiment_callback
|
|
|
|
for(var/signal in experiment_signals)
|
|
RegisterSignal(parent, signal, experiment_signals[signal])
|
|
|
|
// Determine UI display mode
|
|
switch(config_mode)
|
|
if(EXPERIMENT_CONFIG_ATTACKSELF)
|
|
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(configure_experiment))
|
|
if(EXPERIMENT_CONFIG_ALTCLICK)
|
|
RegisterSignal(parent, COMSIG_CLICK_ALT, PROC_REF(configure_experiment))
|
|
if(EXPERIMENT_CONFIG_CLICK)
|
|
RegisterSignal(parent, COMSIG_ATOM_UI_INTERACT, PROC_REF(configure_experiment_click))
|
|
if(EXPERIMENT_CONFIG_UI)
|
|
RegisterSignal(parent, COMSIG_UI_ACT, PROC_REF(ui_handle_experiment))
|
|
|
|
// Auto connect to the first visible techweb (useful for always active handlers)
|
|
// Note this won't work at the moment for non-machines that have been included
|
|
// on the map as the servers aren't initialized when the non-machines are initializing
|
|
if (!(config_flags & EXPERIMENT_CONFIG_NO_AUTOCONNECT))
|
|
CONNECT_TO_RND_SERVER_ROUNDSTART(linked_web, parent)
|
|
|
|
GLOB.experiment_handlers += src
|
|
|
|
/datum/component/experiment_handler/Destroy(force)
|
|
. = ..()
|
|
GLOB.experiment_handlers -= src
|
|
|
|
/**
|
|
* Hooks on attack to try and run an experiment (When using a handheld handler)
|
|
*/
|
|
/datum/component/experiment_handler/proc/try_run_handheld_experiment(datum/source, atom/target, mob/user, list/modifiers)
|
|
SIGNAL_HANDLER
|
|
if (!should_run_handheld_experiment(source, target, user))
|
|
return
|
|
INVOKE_ASYNC(src, PROC_REF(try_run_handheld_experiment_async), source, target, user)
|
|
return COMPONENT_CANCEL_ATTACK_CHAIN
|
|
|
|
/**
|
|
* Provides feedback when an item isn't related to an experiment, and has fully passed the attack chain
|
|
*/
|
|
/datum/component/experiment_handler/proc/ignored_handheld_experiment_attempt(datum/source, atom/target, mob/user, list/modifiers)
|
|
SIGNAL_HANDLER
|
|
if ((isnull(selected_experiment) && !(config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE)) || (config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
|
|
return
|
|
playsound(user, 'sound/machines/buzz/buzz-sigh.ogg', 25)
|
|
to_chat(user, span_notice("[target] is not related to your currently selected experiment."))
|
|
|
|
/**
|
|
* Checks that an experiment can be run using the provided target, used for preventing the cancellation of the attack chain inappropriately
|
|
*/
|
|
/datum/component/experiment_handler/proc/should_run_handheld_experiment(datum/source, atom/target, mob/user)
|
|
// Check that there is actually an experiment selected
|
|
if (selected_experiment == null && !(config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE))
|
|
return
|
|
if (!linked_web)
|
|
return
|
|
|
|
// Determine if this experiment is actionable with this target
|
|
var/list/arguments = list(src)
|
|
arguments = args.len > 1 ? arguments + args.Copy(2) : arguments
|
|
if (config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE)
|
|
for (var/datum/experiment/experiment in linked_web.available_experiments)
|
|
if (experiment.actionable(arglist(arguments)))
|
|
return TRUE
|
|
else
|
|
return selected_experiment.actionable(arglist(arguments))
|
|
|
|
/**
|
|
* This proc exists because Jared Fogle really likes async
|
|
*/
|
|
/datum/component/experiment_handler/proc/try_run_handheld_experiment_async(datum/source, atom/target, mob/user)
|
|
if (selected_experiment == null && !(config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE))
|
|
if(!(config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
|
|
to_chat(user, span_notice("You do not have an experiment selected!"))
|
|
return
|
|
var/skill_modifier = user.mind.get_skill_modifier(/datum/skill/research, SKILL_SPEED_MODIFIER) //SKYRAT EDIT: Research Skill (simple research)
|
|
if(!(config_flags & EXPERIMENT_CONFIG_IMMEDIATE_ACTION) && !do_after(user, 1 SECONDS * skill_modifier, target = target)) //SKYRAT EDIT: Research Skill (simple research)
|
|
return
|
|
if(action_experiment(source, target))
|
|
// BUBBERSTATION EDIT START
|
|
if (config_flags && EXPERIMENT_CONFIG_WORKS_FROM_RANGE)
|
|
user.Beam(target, icon_state = "rped_upgrade", time = 0.5 SECONDS)
|
|
// BUBBERSTATION EDIT END
|
|
playsound(user, 'sound/machines/ping.ogg', 25)
|
|
to_chat(user, span_notice("You scan [target]."))
|
|
user.mind.adjust_experience(/datum/skill/research, 5) //SKYRAT EDIT: Research Skill (simple research)
|
|
else if(!(config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
|
|
playsound(user, 'sound/machines/buzz/buzz-sigh.ogg', 25)
|
|
to_chat(user, span_notice("[target] is not related to your currently selected experiment."))
|
|
|
|
/**
|
|
* Hooks on destructive scans to try and run an experiment (When using a handheld handler)
|
|
*/
|
|
/datum/component/experiment_handler/proc/try_run_destructive_experiment(datum/source, list/scanned_atoms)
|
|
SIGNAL_HANDLER
|
|
var/atom/movable/our_scanner = parent
|
|
if (selected_experiment == null)
|
|
if(!(config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
|
|
playsound(our_scanner, 'sound/machines/buzz/buzz-sigh.ogg', 25)
|
|
to_chat(our_scanner, span_notice("No experiment selected!"))
|
|
return
|
|
var/successful_scan
|
|
for(var/scan_target in scanned_atoms)
|
|
if(action_experiment(source, scan_target))
|
|
successful_scan = TRUE
|
|
if(successful_scan)
|
|
playsound(our_scanner, 'sound/machines/ping.ogg', 25)
|
|
to_chat(our_scanner, span_notice("The scan succeeds."))
|
|
else if(!(config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
|
|
playsound(src, 'sound/machines/buzz/buzz-sigh.ogg', 25)
|
|
our_scanner.say("The scan did not result in anything.")
|
|
|
|
/// Hooks on a successful autopsy experiment
|
|
/datum/component/experiment_handler/proc/try_run_autopsy_experiment(obj/source, mob/living/target)
|
|
SIGNAL_HANDLER
|
|
|
|
if (action_experiment(source, target))
|
|
playsound(source, 'sound/machines/ping.ogg', 25)
|
|
source.say("New unique autopsy successfully catalogued.")
|
|
|
|
/**
|
|
* Announces a message to this experiment handler
|
|
*
|
|
* Arguments:
|
|
* * message - The message to announce
|
|
*/
|
|
/datum/component/experiment_handler/proc/announce_message(message)
|
|
var/atom/movable/experi_parent = parent
|
|
experi_parent.say(message)
|
|
|
|
/**
|
|
* Attempts to perform the selected experiment given some arguments
|
|
*/
|
|
/datum/component/experiment_handler/proc/action_experiment(datum/source, ...)
|
|
// Check if an experiment is selected
|
|
if (selected_experiment == null && !(config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE))
|
|
return FALSE
|
|
|
|
// Get arguments for passing to the experiment[s]
|
|
var/list/arguments = list(src)
|
|
arguments = args.len > 1 ? arguments + args.Copy(2) : arguments
|
|
|
|
// Check if this handler is configured to be always active, in which case we
|
|
// attempt to action every experiment that is available to this handler.
|
|
if (config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE)
|
|
var/any_success
|
|
for (var/datum/experiment/experiment in linked_web.available_experiments)
|
|
// Because this checks any experiment, we have to ensure it is allowable to be selected with can_select_experiment(...)
|
|
// this handles the handler's blacklist, whitelist, etc (potentially refactor this in the future if possible because this could be expensive)
|
|
if (can_select_experiment(experiment) && experiment.actionable(arglist(arguments)) && experiment.perform_experiment(arglist(arguments)))
|
|
any_success = TRUE
|
|
return any_success
|
|
else
|
|
// Returns true if the experiment was successfuly handled
|
|
return selected_experiment.actionable(arglist(arguments)) && selected_experiment.perform_experiment(arglist(arguments))
|
|
|
|
/**
|
|
* Hook for handling UI interaction via signals
|
|
*/
|
|
/datum/component/experiment_handler/proc/ui_handle_experiment(datum/source, mob/user, action)
|
|
SIGNAL_HANDLER
|
|
switch(action)
|
|
if("open_experiments")
|
|
INVOKE_ASYNC(src, PROC_REF(configure_experiment), null, usr)
|
|
|
|
/**
|
|
* Attempts to show the user the experiment configuration panel
|
|
*
|
|
* Arguments:
|
|
* * user - The user to show the experiment configuration panel to
|
|
*/
|
|
/datum/component/experiment_handler/proc/configure_experiment(datum/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
INVOKE_ASYNC(src, PROC_REF(ui_interact), user)
|
|
return CLICK_ACTION_SUCCESS
|
|
|
|
/**
|
|
* Attempts to show the user the experiment configuration panel
|
|
*
|
|
* Arguments:
|
|
* * user - The user to show the experiment configuration panel to
|
|
*/
|
|
/datum/component/experiment_handler/proc/configure_experiment_click(datum/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
INVOKE_ASYNC(src, TYPE_PROC_REF(/datum, ui_interact), user)
|
|
|
|
/**
|
|
* 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
|
|
*/
|
|
/datum/component/experiment_handler/proc/link_techweb(datum/techweb/new_web)
|
|
if (new_web == linked_web)
|
|
return
|
|
selected_experiment?.on_unselected(src)
|
|
selected_experiment = null
|
|
linked_web = new_web
|
|
|
|
/**
|
|
* Unlinks this handler from the selected techweb
|
|
*/
|
|
/datum/component/experiment_handler/proc/unlink_techweb()
|
|
selected_experiment?.on_unselected(src)
|
|
selected_experiment = null
|
|
linked_web = null
|
|
|
|
/**
|
|
* Attempts to link this experiment_handler to a provided experiment
|
|
*
|
|
* Arguments:
|
|
* * experiment - The experiment to attempt to link to
|
|
*/
|
|
/datum/component/experiment_handler/proc/link_experiment(datum/experiment/experiment)
|
|
if (can_select_experiment(experiment))
|
|
unlink_experiment()
|
|
selected_experiment = experiment
|
|
selected_experiment.on_selected(src)
|
|
|
|
/**
|
|
* Unlinks this handler from the selected experiment
|
|
*/
|
|
/datum/component/experiment_handler/proc/unlink_experiment()
|
|
selected_experiment?.on_unselected(src)
|
|
selected_experiment = null
|
|
|
|
/**
|
|
* Checks if an experiment is valid to be selected by this handler
|
|
*
|
|
* Arguments:
|
|
* * experiment - The experiment to check
|
|
*/
|
|
/datum/component/experiment_handler/proc/can_select_experiment(datum/experiment/experiment)
|
|
// Check that this experiment is visible currently
|
|
if (!(experiment in linked_web?.available_experiments))
|
|
return FALSE
|
|
|
|
return is_compatible_experiment(experiment)
|
|
|
|
/**
|
|
* Checks if an experiment could be selected by the handler if it were available in the linked web.
|
|
* Basically, it skips the available_experiments check, unlike can_select_experiment.
|
|
*/
|
|
/datum/component/experiment_handler/proc/is_compatible_experiment(datum/experiment/experiment)
|
|
// Check that this experiments has no disallowed traits
|
|
if (experiment.traits & disallowed_traits)
|
|
return FALSE
|
|
|
|
// Check against the list of allowed experimentors
|
|
if (length(experiment.allowed_experimentors) && !is_type_in_list(parent, experiment.allowed_experimentors))
|
|
return FALSE
|
|
|
|
// Check that this experiment type isn't blacklisted
|
|
if(is_type_in_list(experiment, blacklisted_experiments))
|
|
return FALSE
|
|
|
|
// Finally, check against the allowed experiment types
|
|
return is_type_in_list(experiment, allowed_experiments)
|
|
|
|
/datum/component/experiment_handler/ui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if (!ui)
|
|
var/atom/parent_atom = parent
|
|
ui = new(user, src, "ExperimentConfigure", "[parent_atom ? "[parent_atom.name] | " : ""]Experiment Configuration")
|
|
ui.open()
|
|
|
|
/datum/component/experiment_handler/ui_data(mob/user)
|
|
. = list(
|
|
"always_active" = (config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE),
|
|
"has_start_callback" = !isnull(start_experiment_callback),
|
|
)
|
|
.["techwebs"] = list()
|
|
for (var/datum/techweb/techwebs as anything in SSresearch.techwebs)
|
|
if(!length(techwebs.techweb_servers)) //no servers, we don't care
|
|
if(techwebs == linked_web) //disconnect if OUR techweb lost their servers.
|
|
unlink_techweb()
|
|
continue
|
|
if(!length(SSresearch.find_valid_servers(get_turf(parent), techwebs)))
|
|
continue
|
|
var/list/data = list(
|
|
web_id = techwebs.id,
|
|
web_org = techwebs.organization,
|
|
selected = (techwebs == linked_web),
|
|
ref = REF(techwebs),
|
|
all_servers = techwebs.techweb_servers,
|
|
)
|
|
.["techwebs"] += list(data)
|
|
.["experiments"] = list()
|
|
if (linked_web)
|
|
for (var/datum/experiment/experiment as anything in linked_web.available_experiments)
|
|
if(!can_select_experiment(experiment))
|
|
continue
|
|
.["experiments"] += list(list("selected" = selected_experiment == experiment) + experiment.to_ui_data())
|
|
|
|
/datum/component/experiment_handler/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
if (.)
|
|
return
|
|
switch (action)
|
|
if ("select_server")
|
|
. = TRUE
|
|
var/datum/techweb/new_techweb = locate(params["ref"])
|
|
if (new_techweb)
|
|
link_techweb(new_techweb)
|
|
return
|
|
if ("clear_server")
|
|
. = TRUE
|
|
unlink_techweb()
|
|
if ("select_experiment")
|
|
. = TRUE
|
|
// Don't allow selection for always actives (no concept of active)
|
|
if (config_flags & EXPERIMENT_CONFIG_ALWAYS_ACTIVE)
|
|
return
|
|
var/datum/experiment/experiment = locate(params["ref"])
|
|
if (experiment)
|
|
link_experiment(experiment)
|
|
if ("clear_experiment")
|
|
. = TRUE
|
|
unlink_experiment()
|
|
if("start_experiment_callback")
|
|
start_experiment_callback.Invoke(selected_experiment)
|