-
-
Notifications
You must be signed in to change notification settings - Fork 6
1.14.4 functions
For this example we will take this situation :
tardis = peripheral.wrap("top")
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)
Every call will damage the Aprioritron subsystem, make sur to read this : https://github.com/LotuxPunk/Handles/wiki/Aprioritron's-subsystem
local x, y, z = tardis.getLocation()
local x, y, z = tardis.getDestination()
tardis.setDestination(x, y, z)
tardis.setDimension(id)
id
is the number before the dimension when you do tardis.getDimensions()
tardis.setDestinationAndDimension(x, y, z, id)
id
is the number before the dimension when you do tardis.getDimensions()
local dimensions = tardis.getDimensions()
dimensions
is an array of strings with dimension id & dimension name
tardis.setFlight(speedValue)
speedValue
have to be 0 < speedValue <= 1
tardis.setRefuel(boolean)
tardis.setSpeed(value)
value
have to be between 0 & 1
local double = tardis.getArtronBank()
local seconds = tardis.getTimeLeft()
tardis.setDoors(status)
String value status
have to be "CLOSED", "BOTH" or "ONE"
local status = tardis.getDoors()
local id = tardis.getDimension()
You can find the name of the dimension with getDimensions()
and look at the index id
local facing = tardis.getFacing()
tardis.setFacing(facing)
String value facing
have to be "NORTH", "SOUTH", "EAST" or "WEST"
local count = tardis.getLifeSigns()
local status = tardis.getAlarm()
local status = tardis.setAlarm(boolean)
local status = tardis.isHandbrakeFree()
local status = tardis.setHandbrake(boolean)
local speedValue = tardis.setSpeed(value)
local speedValue = tardis.getSpeed()