Computer Core

by Relik77

Computer is a modification for Factorio that’s all about computer programming. It allows you to write programs using the Lua programming language.

Utilities
6 years ago
0.15 - 0.16
25

i Two requests

6 years ago

So i would like to request two features, first one is a listener function for lan that fires when a new signal appears on the circuit network and the second is a cheap wlan receiver entity that will take any signal/signals sent to it and forward it to any circuit network it's connected to

6 years ago

oh yah, also an entity that takes the signal on any network it's connected to and sends it to a specific computer

6 years ago

Hi,
If I understand well on request, it is already possible to do this type of system:

A lan listener function

function myMfct()
--[[ do something ]]
end

function lanListener(callback, oldSignal)
  --[[ Get signal input ]]
  local newSignals = lan.readLeftSignals()

  --[[ Check your change condition or other tests ]]
  if valid then
    callback()
  end


  --[[ Wait next tick ]]
  os.wait(lanListener, 0, callback, newSignals )
end

lanListener(myMfct)

For the other two points, I think make a wlan connector controllable by one or more computers (the only possible configuration being to define a label, because it would be a passive connector and not active)

Currently I am very busy, but as soon as possible I will work on this improvement. (The longest being to create the design)

New response