mmm
This commit is contained in:
parent
5422d52065
commit
4f2631b349
24 changed files with 414 additions and 5665 deletions
40
computer/5/scoundril
Normal file
40
computer/5/scoundril
Normal file
|
@ -0,0 +1,40 @@
|
|||
W = window.create(term.native(),5,10,39,13)
|
||||
--W.setBackgroundColor(colors.lightGray)
|
||||
--W.setTextColor(colors.black)
|
||||
W.clear()
|
||||
|
||||
function scoundrilmirror()
|
||||
while true do
|
||||
--local x,y = W.getCursorPos()
|
||||
--paintutils.drawBox(4,9,46,23,colors.gray)
|
||||
--W.setBackgroundColor(colors.brown)
|
||||
--W.setTextColor(colors.pink)
|
||||
id,mess = rednet.receive()
|
||||
if id == 4 then
|
||||
W[mess[1]](unpack(mess[2]))
|
||||
end
|
||||
--W.setCursorPos(x,y)
|
||||
--paintutils.drawBox(4,9,46,23,colors.gray)
|
||||
end
|
||||
end
|
||||
function eventmirror()
|
||||
while true do
|
||||
event = {os.pullEventRaw()}
|
||||
if event[1] == "rednet_message" then
|
||||
|
||||
elseif event[1] == "modem_message" then
|
||||
|
||||
else
|
||||
rednet.send(
|
||||
4,
|
||||
event,
|
||||
"pocketevent"
|
||||
)
|
||||
--print(event)
|
||||
end
|
||||
end
|
||||
end
|
||||
parallel.waitForAll(
|
||||
scoundrilmirror,
|
||||
eventmirror
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue