Skip to content

The science module

Overview

API: science

scan(path=None, buttons=None, timeout=None, auto_side=True)

Start a science scan

Parameters:

Name Type Description Default
buttons dict

dictionary key = button, value = label. Defaults to None.

None
timeout _type_

A promise typically by calling timeout(). Defaults to None.

None
auto_side bool

If true quickly scans thing on the same side. Defaults to True.

True

Returns:

Name Type Description
Promise

A promise to wait. Typically passed to an await/AWAIT

scan_results(message, target=None, tab=None)

Set the scan results for the current scan. This should be called when the scan is completed. This is typically called as part of a scan() This could also be called in response to a routed science message. When pair with a scan() the target and tab are not need. Tab is the variable SCAN_TAB, target is track

Parameters:

Name Type Description Default
message str

scan text for a scan the is in progress

required
tab str

scan tab for a scan the is in progress

None

science_set_scan_data(player_id_or_obj, scan_target_id_or_obj, tabs)

Immediately set the science scan data for a scan target use this for things that you do not want to have scan delayed.

Parameters:

Name Type Description Default
player_id_or_obj agent

The player ship agent id or object

required
scan_target_id_or_obj agent

The target ship agent id or object

required
tabs dict

A dictionary to key = tab, value = scan string

required