AdvancedPeripherals icon indicating copy to clipboard operation
AdvancedPeripherals copied to clipboard

Redstone Integrator Pull Event

Open Erabior opened this issue 3 years ago • 1 comments

Describe your idea

Redstone pull event for redstone integrators. I feel it makes sense as the computers have os.pullEvent("redstone") I.E. local redR=peripheral.wrap('right') inputlevel=redR.pullEvent("redstone")

Describe alternatives you've considered if you've any

alternatively, perhaps make the integrators simply output a redstone signal on the side facing the computer? This would make os.pullEvent("redstone") function and it would be up to the user to determine which integrator and what side. This would still save a bit of work and does not seem to difficult to implement.

Additional context

No response

Linked Issues

No response

Erabior avatar Feb 11 '22 14:02 Erabior

perhaps make the integrators simply output a redstone signal on the side facing the computer

IMO this isn't particularly practical, as it assumes the Rs bridge is placed directly next to the computer in the world, rather than connected via wired modems.

I like the suggestion in general though 👍

djmattyg007 avatar Feb 11 '22 22:02 djmattyg007

I would also like some way to "interrupt" the program whenever something is detected by a redstone integrator rather than having to constantly scan a ton of redstone integrators for active signals.

Something like os.pullEvent("redstoneIntegrator"). Could return: 1 event name 2 side string 3: peripheral name Example:

lua> while true do require("cc.pretty").pretty_print({os.pullEvent("redstoneIntegrator")}) end
{
  "redstoneIntegrator",
  "north",
  "redstoneIntegrator_5",
}
{
  "redstoneIntegrator",
  "north",
  "redstoneIntegrator_5",
}

Peekofwar avatar Oct 27 '22 23:10 Peekofwar