Train Station

This device allows the computer to manipulate the Train Station as well as any present train!

This is an example of how to access the device.

local d = require("devices")
local station = d:find("train_station")
print(station:getStationName())

API

Device name: train_station

Methods

assemble()
This method attempts to assemble the current train.

disassemble()
This method attempts to disassemble the present train.

setAssemblyMode(asssemblyMode:boolean)
This method attempts to enter/exit assembly mode

isInAssemblyMode():boolean
This method determines if the Station is in assembly mode.

getStationName():string
This method gets the Station’s name.

setStationName(name:string)
This method sets the Station’s name.

isTrainPresent():boolean
This method determines if a train is present at the Station.

isTrainImminent():boolean
This method determines if a train is coming into the Station.

isTrainEnroute():boolean
This method determines if a train is heading towards the Station.

getTrainName():string
This method gets the name of the train that is present.

setTrainName(name:string)
This method sets the name of the train that is present

hasSchedule():boolean
This method determines whether the present train has a schedule.

getSchedule():table
This method gets the present train’s schedule as a table.

setSchedule(schedule:table)
This method sets the present train’s schedule parsed from the given table.