Module airship_travel

Source

Macrosยง

debug_airship_eulerization ๐Ÿ”’
debug_airships ๐Ÿ”’

Structsยง

AirshipDockPositions
The docking postions at an AirshipDock plot.
AirshipDockingApproach
Information needed for an airship to travel to and dock at an AirshipDock plot.
AirshipDockingPosition
A docking position (id, position). The docking position id is an index of all docking positions in the world.
AirshipRouteLeg
One leg of an airship route.
AirshipSpawningLocation
Information needed for placing an airship in the world when the world is generated (each time the server starts).
Airships
Data for airship operations. This is generated world data.
DockNode
A node on the triangulation of the world docking sites, with data on the nodes that are connected to it.

Enumsยง

AirshipDockPlatform
The AirshipDock Sites are always oriented along a cardinal direction. The docking platforms are likewise on the sides of the dock perpendicular to a cardinal axis.
AirshipDockingSide
An airship can dock with its port or starboard side facing the dock.

Staticsยง

ENSW_PLATFORMS ๐Ÿ”’
ESNW_PLATFORMS ๐Ÿ”’
NEWS_PLATFORMS ๐Ÿ”’
NWES_PLATFORMS ๐Ÿ”’
SEWN_PLATFORMS ๐Ÿ”’
SWEN_PLATFORMS ๐Ÿ”’
WNSE_PLATFORMS ๐Ÿ”’
WSNE_PLATFORMS ๐Ÿ”’

Traitsยง

TriangulationExt ๐Ÿ”’
Extension functions for Triangulation (from the triangulate crate).

Functionsยง

add_edge ๐Ÿ”’
Adds an edge between two nodes in the tesselation graph.
best_eulerian_circuit_segments ๐Ÿ”’
Get the optimal grouping of Eulerian Circuit nodes and edges such that a maximum number of sub-circuits are created, and the length of each sub-circuit is as similar as possible.
find_best_eulerian_circuit ๐Ÿ”’
Find the best Eulerian circuit for the given graph of dock nodes. Try each node as the starting point for a circuit. The best circuit is the one with the longest routes (sub-segments of the circuit), and where the route lengths are equal as possible.
first_odd_node ๐Ÿ”’
Find the first node in the graph where the DockNode has an odd number of connections to other nodes.
remove_edge ๐Ÿ”’
Removes an edge between two nodes in the tesselation graph.

Type Aliasesยง

DockNodeGraph ๐Ÿ”’
A map of node index to DockNode, where DockNode contains a list of nodes that the node is connected to.