mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-03 11:07:23 -04:00
Updated Signals (markdown)
parent
8bc215f117
commit
9a91b6cd9c
@ -4,6 +4,7 @@ Signals can be consumed using `[[computer.pullSignal()|API/Computer]]` or its pr
|
||||
|
||||
The following lists all signals triggered by components and the built-in libraries. They are listed in the following format: `name(arg: type, ...)`, meaning you would pull them like `local name, arg, ... = event.pull()`. For example, to pull a modem message:
|
||||
```lua
|
||||
local event = require("event")
|
||||
local _, localNetworkCard, remoteAddress, port, distance, payload = event.pull("modem_message")
|
||||
print("Received data '" .. tostring(payload) .. "' from address " .. remoteAddress ..
|
||||
" on network card " .. localNetworkCard .. " on port " .. port .. ".")
|
||||
|
Loading…
x
Reference in New Issue
Block a user