mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-12 16:57:32 -04:00
Mentioning waypoint in nav upgrade's manual entry.
This commit is contained in:
parent
5672cf8dc8
commit
0e995faa8a
@ -4,4 +4,6 @@
|
||||
|
||||
The navigation upgrade provides location and orientation information to devices it is installed in. The coordinates the upgrade provides are relative to the center of the map that was used to craft the upgrade, and the functional range is based on the size of that map.
|
||||
|
||||
The map inside a Navigation upgrade can be changed by re-crafting the upgrade with a new map. The old map will be returned to the player.
|
||||
The map inside a Navigation upgrade can be changed by re-crafting the upgrade with a new map. The old map will be returned to the player.
|
||||
|
||||
Note that this upgrade is a lot more useful when used in combination with one or more [waypoints](../block/waypoint.md).
|
@ -64,7 +64,7 @@ class UpgradeNavigation(val host: EnvironmentHost with Rotatable) extends prefab
|
||||
val waypoints = Waypoints.findWaypoints(position, range).
|
||||
filter(waypoint => waypoint.getDistanceFrom(positionVec.xCoord, positionVec.yCoord, positionVec.zCoord) <= rangeSq)
|
||||
result(waypoints.map(waypoint => {
|
||||
val delta = position.toVec3.subtract(waypoint.position.offset(waypoint.facing).toVec3)
|
||||
val delta = positionVec.subtract(waypoint.position.offset(waypoint.facing).toVec3)
|
||||
Map(
|
||||
"position" -> Array(delta.xCoord, delta.yCoord, delta.zCoord),
|
||||
"redstone" -> waypoint.maxInput,
|
||||
|
@ -303,7 +303,7 @@ class NativeLuaArchitecture(val machine: api.machine.Machine) extends Architectu
|
||||
|
||||
apis.foreach(_.initialize())
|
||||
|
||||
lua.load(classOf[Machine].getResourceAsStream(Settings.scriptPath + "machine.lua"), "=kernel", "t")
|
||||
lua.load(classOf[Machine].getResourceAsStream(Settings.scriptPath + "machine.lua"), "=machine", "t")
|
||||
lua.newThread() // Left as the first value on the stack.
|
||||
|
||||
true
|
||||
|
Loading…
x
Reference in New Issue
Block a user