-
-
Notifications
You must be signed in to change notification settings - Fork 6
1.12.2 functions
For this example we will take this situation :
m = peripheral.wrap("left")
Returns a table of functions, allowing you to call peripheral methods as if they were normal Lua functions. If no peripheral is connected, returns nil. (http://computercraft.info/wiki/Peripheral.wrap)
Here's a working example : https://gist.github.com/LotuxPunk/6a45b7076c05d1bb15c690a9c4a38623
For this example we will take this situation :
component = require("component")
m = component.tardisinterface
local x, y, z = m.getTardisPos()
Returns the 3 coordinate of your TARDIS Location (x, y, z)
m.setTardisDestination(x,y,z,[dimensionID])
To set the destination at 0,0 at the height 64 in OverWorld
m.setTardisPos(0,64,0,0)
The dimensionID
is optionnal since the 1.12.2-1.2.5.1
local x, y, z, dimensionID = m.getTardisDestination()
m.startFlight()
m.setDoors(boolean) -> m.setDoors(false) //to close the doors
local booleanValue = m.isInFlight()
Returns a boolean value depending if is in flight.
local artronUnits= m.getArtron()
Returns the Artron units
m.setFueling(boolean)
local booleanValue = m.isDoorsOpened()
local booleanValue = m.canFly()
local timeInSecond = m.getTravelTime()
local x, y, z, dim, name = m.getWaypoint(waypointID)
Beware, TARDIS can only save 15 waypoints (0 to 14).
local booleanValue = m.setWaypoint(waypointID,x,y,z,dimensionID, name)
local doubleValue = m.getHealthComponent(componentID)
local arrayOfInt = m.getDimensionsID()
local stringValue = m.getDimensionName(dimensionID)
m.setDimensionPos(dimensionID)
m.setRelativePos(x,y,z)
local dimensionID = m.getDimension()
local dimensionID = m.getTargetDimension()
You can also get the target dimension ID with getTardisDestination
.
local boolean = m.getField()
m.setField(boolean)
local stringValue= m.getSystemName(componentID)
local boolean = m.getStealth()
m.setStealth(boolean)
m.setStabilizers(boolean)
local boolean = m.getStabilizers()