Mini Tardis ComputerCraft Bridge
Bridge between Mini Tardis and CC:Tweaked
Automate your TARDIS!
About the Modification
Adds a TARDIS Computer Interface block that functions as a peripheral device for ComputerCraft. Crafting recipe:
(Any wired modem will work)
Usage
- Place the block inside Mini Tardis and connect it to a computer in the usual way
- Wrap the peripheral using
peripheral.wrap(<side>)orperipheral.find("minitardis_bridge") - Refer to the method reference when writing scripts for TARDIS
Ready-made Automation Scripts
Ready-made scripts are available in the mod's GitHub repository ("View Source" link on the right side of the page)
scripts/tardisServer.lua- place this script on a computer inside TARDIS, rename tostartup.lua, change modem channels at the beginning of the file for multiplayer games. The computer must have TARDIS Computer Interface nearby and optionally ender modem for remote controlscripts/tardisRemote.lua- install on a pocket computer with ender modem, change channels in the file if necessaryscripts/gpsHost.lua- create a GPS constellation with wired and ender modems, specify modem information at the beginning of the file and set the constellation dimension. Rename the script tostartup.lua
Method Reference
isLinked()returns boolean, indicates whether Computer Interface is inside TARDIS
All following methods throw an error if Computer Interface is not inside TARDIS
getState()checks TARDIS state and returns one of the strings:booting_up- TARDIS is booting upcrashed- TARDIS has crashed and requires rebootcrashing- TARDIS is in the process of crashingdisabled- TARDIS is powered offdrifting- TARDIS is drifting between dimensionsflying- TARDIS is flying to destinationlanded- TARDIS has landedlanding- TARDIS is landingrefueling- TARDIS is refuelingsearching_for_landing- TARDIS is preparing to landsuspended_flight- energy conduits are locked during flighttaking_off- TARDIS is taking off
boot()returns true on success, powers on TARDIS fromdisabledstateshutdown()returns true on success, powers off TARDIS fromlandedorcrashedstatesrefuel(boolean)returns true on success, sets refueling stategetFuel()returns number from 0 to 1000, shows TARDIS fuel amountgetStability()returns number from 0 to 1000, shows TARDIS stabilitygetAvailableWorlds()returns array of strings, shows dimensions available for travelgetCurrentPos()returns array of 3 XYZ numbers, error if TARDIS is not landed, current TARDIS positiongetCurrentFacing()returns one of direction strings, error if TARDIS is not landed, current TARDIS facing:northeastwestsouth
getCurrentWorld()returns string, current TARDIS worldgetDestinationPos()returns array of 3 XYZ numbers, error if destination unknown, current TARDIS destinationgetDestinationFacing()returns compass direction string, error if destination unknown, TARDIS facing at destinationgetDestinationWorld()returns string, error if destination unknown, TARDIS destination worldresetDestination()returns true on success, resets destination to current TARDIS locationsetDestinationPos(x, y, z)returns true on success, error if destination unreachable, sets destination coordinatessetDestinationFacing(compass_direction)returns true on success, sets TARDIS facing at destinationsetDestinationWorld(world_id)returns true on success, error if TARDIS cannot enter this world or it's not discovered in Dimensions app, sets destination worldisDestinationLocked()returns boolean, indicates whether destination is lockedsetDestinationLocked(boolean)returns true on success, sets destination lock stateareConduitsUnlocked()returns boolean, indicates whether energy conduits are unlockedsetConduitsUnlocked(boolean)returns true on success, locks or unlocks energy conduitshandbrake(boolean)returns true on success, sets handbrake stategetErrorOffsets()returns array of offsets, can only be called duringflyingstate, error otherwise, each offset is array of 2 elements:- First offset element - north/south, 1 means TARDIS needs to be nudged south, -1 means north
- Second offset element - west/east, 1 means TARDIS needs to be nudged east, -1 means west
- Return example:
{ {0,0}, {1,-1}, {1,0}, {0,-1} }
getCoordinateScale()returns number from 0 to 3, shows Localization Scale Interpreter valuesetCoordinateScale(number 0 to 3)returns true on success, sets Localization Scale Interpreter value, also used to select offset duringflyingstatenudgeDestination(direction)returns true on success, nudges destination in specified direction, used for adjusting offsets duringflyingstate. Direction can be one of:northeastwestsouthupdown
getTotalDriftingPhases()returns number, can only be called duringdriftingstate, error otherwise, shows total drifting phasesgetDriftingPhasesComplete()returns number, can only be called duringdriftingstate, error otherwise, shows completed drifting phasesisDriftingPhaseReady()returns boolean, can only be called duringdriftingstate, error otherwise, true when TARDIS is ready for phase shift, callhandbrake(true)to phase shift