Naev

Module safelanes

Lua accessor functions to safe lane information.

A "safe lane" is an intra-system route patrolled by a faction.

This module is in development; its interface should not be considered final.

Functions

get ([f[, standing[, s=system.cur()[, onlyknown=false]]]]) Return a table of matching lanes (format described below).


Functions

get ([f[, standing[, s=system.cur()[, onlyknown=false]]]])
Return a table of matching lanes (format described below).

Parameters:

  • f Faction If present, only return this faction's lanes. (optional)
  • standing string What type of lanes to get. Either nil for specific faction only, "friendly", "neutral", "hostile", "non-friendly", or "non-hostile". (optional)
  • s System The system whose lanes we want. (default system.cur())
  • onlyknown boolean Whether or not to limit the lanes to those known to the player. (default false)

Returns:

    table The list of matching safe lanes, each of which is a table where: lane[1] and lane[2] are the endpoints (type vec2), and lane.faction is the owner's Faction.

Usage:

  • safelanes.get() -- Everyone's in current system
    
  • safelanes.get( "Empire" ) -- Empire's lanes in current system
    
  • safelanes.get( faction.get("Empire"), system.get("Gamma Polaris") ) --
     Empire's lanes through Gamma Polaris.
    
generated by LDoc 1.5.0 Last updated 2024-04-19 15:38:17