Difference between revisions of "Test"
Jump to navigation
Jump to search
| Line 2: | Line 2: | ||
=== Code === | === Code === | ||
| − | <syntaxhighlight lang=" | + | <syntaxhighlight lang="Lua"> |
| − | + | if event.type == "interrupt" then | |
| − | + | digiline_send("sensor", "GET") | |
| − | + | interrupt(1) | |
| − | + | end | |
| − | + | ||
| − | + | if event.type == "program" then | |
| − | + | interrupt(1) | |
| − | + | end | |
| + | |||
| + | if event.type == "digiline" then | ||
| + | if event.msg == "technic:hv_nuclear_reactor_core_active" then | ||
| + | port.a = false | ||
| + | port.c = true | ||
| + | else | ||
| + | port.a = true | ||
| + | port.c = false | ||
| + | end | ||
| + | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 15:43, 20 September 2019
Code
if event.type == "interrupt" then
digiline_send("sensor", "GET")
interrupt(1)
end
if event.type == "program" then
interrupt(1)
end
if event.type == "digiline" then
if event.msg == "technic:hv_nuclear_reactor_core_active" then
port.a = false
port.c = true
else
port.a = true
port.c = false
end
end
Category-tree
Directions
/spawn → Earth teleports → Korlen travelhub
Train station
V1
Earth teleports
↓
Korlen travelhub
V2
| Earth teleports |
| ↓ |
| Korlen travelhub |
V3
| Station 1 | |
| ↓ | |
| Station 2 | Station 2 |
| ↓ | |
| Station 3 |