mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
Update Station 2/3 Program
This commit is contained in:
parent
99c2e48819
commit
3e9f51d49b
|
@ -60,12 +60,29 @@ local ba_exit_time=0
|
|||
|
||||
local netpack_head=string.pack("iii",6,1,1)
|
||||
|
||||
local function sendTrainLeaveToB()
|
||||
trainnet.send(netpack_head,station_id,station_b_id,1)
|
||||
end
|
||||
|
||||
local function sendTrainLeaveToA()
|
||||
trainnet.send(netpack_head,station_id,station_a_id,1)
|
||||
end
|
||||
|
||||
local function sendTrainArriveFromA()
|
||||
trainnet.send(netpack_head,station_a_id,2)
|
||||
end
|
||||
|
||||
local function sendTrainArriveFromB()
|
||||
trainnet.send(netpack_head,station_b_id,2)
|
||||
end
|
||||
|
||||
local function doInit()
|
||||
-- TODO: You must change this function to fix your station
|
||||
event.listen("redstone_change",
|
||||
function(_event,_addr,_side,_old,_new)
|
||||
-- [NOTICE] Change information here!!
|
||||
-- Here: your must send an arrive message to last station
|
||||
-- TODO:
|
||||
|
||||
end
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user