NavRoute

From Vendetta Lua
Jump to: navigation, search

Functions

add

Definition:
add() -> ?

Description:



Arguments:
?

Returns:
?

Example:


addbyid

Definition:
addbyid(int sectorid) -> true

Description:
Add a waypoint to the navigation route.
sectorid equal or lower than 0 generates an error.

Arguments:
sectorid - sector to plot a route to

Returns:
Seems to always return true.

Example:

local sectorid = SectorIDFromLocationStr("Bractus C-5")
NavRoute.addbyid(sectorid)




clear

Definition:
clear() -> Clear the current route

Description:
Will clear any route if one exists



Arguments:
None



Returns:
Nil



Example:

GetCurrentRoute

Definition:
GetCurrentRoute() -> table route

Description:
Returns current nav route. Note: The return value is a reference to the navroute not a copy. That means the returned table is updated as the route changes and the route can be edited by modifying the table elements.

Returns:
route reference to navroute table

GetFinalDestination

Definition:
GetFinalDestination() -> ?

Description:



Arguments:
?

Returns:

sector-id of route end



Example:

GetNextHop

Definition:
GetNextHop() -> ?

Description:



Arguments:
?

Returns:
?

Example:


list

Definition:
list() -> ?

Description:



Arguments:
?

Returns:
?

Example:


load

Definition:
load() -> ?

Description:



Arguments:
?

Returns:
?

Example:


OnEvent

Definition:
OnEvent() -> ?

Description:



Arguments:
?

Returns:
?

Example:


save

Definition:
save() -> ?

Description:



Arguments:
?

Returns:
?

Example:


SetFinalDestination

Definition:
SetFinalDestination(int destination) -> nil

Description:
Plot navroute to specified sector.

Arguments:
destination - sectorid of destination sector.

Example:

NavRoute.SetFinalDestination(SectorIDFromLocationStr"Dau A1")

SetFullRoute

Definition:
SetFullRoute(table route) -> nil

Description:
Set the navigation route by specifying all it's points.

Arguments:
route - list containing sectorid's describing the navroute.
Calling it with arguments of wrong type (not table) causes Lua errors that cripple the HUD.

Example:

local sectorid = SectorIDFromLocationStr("Bractus C-5")
NavRoute.SetFullRoute({sectorid, sectorid+1, 1234})



undo

Definition:
undo() -> ?

Description:



Arguments:
?

Returns:
?

Example: