![]() |
naev 0.12.6
|
Handles factions' safe lanes through systems. More...
#include "nlua_safelanes.h"#include "array.h"#include "nlua_faction.h"#include "nlua_system.h"#include "nlua_vec2.h"#include "nluadef.h"#include "safelanes.h"
Go to the source code of this file.
Functions | |
| static int | safelanesL_get (lua_State *L) |
| Lua accessor functions to safe lane information. | |
| int | nlua_loadSafelanes (nlua_env env) |
| Loads the safelanes Lua library. | |
Variables | |
| static const luaL_Reg | safelanesL_methods [] |
Handles factions' safe lanes through systems.
Definition in file nlua_safelanes.c.
| int nlua_loadSafelanes | ( | nlua_env | env | ) |
Loads the safelanes Lua library.
| env | Lua enviornment. |
Definition at line 30 of file nlua_safelanes.c.
|
static |
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.
Lua module: safelanes
Return a table of matching lanes (format described below).
Lua usage parameter: safelanes.get() – Everyone's in current system Lua usage parameter: safelanes.get( "Empire" ) – Empire's lanes in current system Lua usage parameter: safelanes.get( faction.get("Empire"), system.get("Gamma Polaris") ) – Empire's lanes through Gamma Polaris. Lua function parameter:[opt] Faction f If present, only return this faction's lanes. Lua function parameter:[opt] string standing What type of lanes to get. Either nil for specific faction only, "friendly", "neutral", "hostile", "non-friendly", or "non-hostile". Lua function parameter:[opt=system.cur()] System s The system whose lanes we want. Lua function parameter:[opt=false] boolean onlyknown Whether or not to limit the lanes to those known to the player. Lua return parameter: 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.
| L | Lua State |
Lua function: get
Definition at line 64 of file nlua_safelanes.c.
|
static |
Safelane Lua methods.
Definition at line 22 of file nlua_safelanes.c.