restart when turn on if halt
This commit is contained in:
parent
38c239a77b
commit
01d2ebacee
|
|
@ -1,17 +1,17 @@
|
||||||
if event.type == "program" then
|
if event.type == "program" then
|
||||||
mem = {}
|
-- mem = {}
|
||||||
mem.events = {}
|
-- mem.events = {}
|
||||||
mem.orderSize = 20
|
mem.orderSize = 20
|
||||||
mem.outputSize = 22
|
mem.outputSize = 22
|
||||||
mem.inputName = "Tacit:goldrefab"
|
mem.inputName = "Tacit:tinrefab"
|
||||||
mem.itemName = "default:gold_lump"
|
mem.itemName = "default:tin_lump"
|
||||||
mem.orderName = "goldrefab"
|
mem.orderName = "tinrefab"
|
||||||
|
|
||||||
mem.interruptInterval = 30
|
mem.interruptInterval = 30
|
||||||
mem.power = "off"
|
-- mem.power = "off"
|
||||||
mem.outputCount = 0
|
-- mem.outputCount = 0
|
||||||
mem.injectCount = 0
|
-- mem.injectCount = 0
|
||||||
mem.state = "checkchest"
|
-- mem.state = "checkchest"
|
||||||
interrupt(mem.interruptInterval)
|
interrupt(mem.interruptInterval)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -87,5 +87,10 @@ end
|
||||||
|
|
||||||
if event.type == "on" then
|
if event.type == "on" then
|
||||||
mem.power = "on"
|
mem.power = "on"
|
||||||
|
if mem.state == "waitorder" then mem.state = "checkchest" end
|
||||||
|
if mem.state == "waitoutput" then
|
||||||
|
mem.state = "checkchest"
|
||||||
|
mem.outputCount = 0
|
||||||
|
end
|
||||||
mem.interruptInterval = 1
|
mem.interruptInterval = 1
|
||||||
end
|
end
|
||||||
Loading…
Reference in New Issue
Block a user