- 976
- 75
- 9.5 kB
About RoadFinder
Show and list Rust roads, and use road points programmatically
Commands
-
/road (Requires roadfinder.use)
- /road list - List all roads by name, and set temporary markers
- /road show ROADNAME - Set temporary markers for named road
- /road {start} ROADNAME - Teleport to the start of the named road in 5 seconds (start is optional)
- /road end ROADNAME - Teleport to the end of the named road
Examples:
- /road end Road 12 - to teleport to the end of Road 12
- /road start Road 10 - to teleport to the start of Road 10
- /road Road 11 - to teleport to the start of Road 11
- /road 5 to teleport to the start of Road 5
- /road end 6 to teleport to the end of Road 6
Permissions
- roadfinder.use - Allow use of the road command
Configuration
{ "Options": { "ShowAllTextTime": 30.0, "ShowOneTextTime": 60.0, "ShowOneAllPoints": true }, "Version": { "Major": 1, "Minor": 0, "Patch": 5 } }
- `ShowAllTextTime` -- How long to display start and end points as debug text (at road points)
- `ShowOneTextTime` -- How long to display start, end and road points for a single road via /road show
- `ShowOneAllPoints` -- For /road show, display all road points (vs. start and end)
For Developers
The following can be used for example as follows:
[PluginReference] private readonly Plugin RoadFinder; Dictionary<string, Road> roads = RoadFinder?.Call("GetRoads");
Hooks
List<string> GetRoadNames();
Returns a List of string values containing road names.
Dictionary<string, Road> GetRoads();
Returns the entire road list in a Dictionary. This requires a local version of the following class:
public class Road { public List<Vector3> points = new List<Vector3>(); public float width; public float offset; public int topo; }
Road GetRoad(string name);
Returns a single Road object for the named road. Requires class show above.
List<Vector3> GetRoadPoints(string name);
Returns a list of vectors for the entire run of the road. The count will vary based on road length.