radar

Radar Mk.1: one narrow beam straight out of the radar's face, swept twice a second. Reports the first thing the beam meets and nothing to either side.

getContact()Get what the beam is hitting.
getRange()Get the beam's range.
getContact()Source

Get what the beam is hitting.

Returns

  1. { [string] = any } | nil Nil if the beam meets nothing within range. Otherwise a table with kind ("ship", "terrain", or "obstructed" when the radar's own ship blocks its face), distance in blocks, closingSpeed in blocks per second (positive when approaching; 0 until the beam has held the same target for two sweeps), and for a ship whose transponder is on, its name.
getRange()Source

Get the beam's range.

Returns

  1. number The range in blocks.