You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MrDiamondDog edited this page Jun 26, 2022
·
7 revisions
RFID Reader Block
RFID Reader Block allows you to read RFID Cards in a players inventory
Can be used as Upgrade for Drones/Microcontrollers/Robots/Tablets
Methods:
rfid=require("component").os_rfidreader-- Scans for all entites for RFIDs within range default is 16 blocksrfid.scan(optionalint:1-64)
If you specify an integer it will scan that area, large areas can cause lag.
This will queue a signal with the name rfidData 4 parameters will be returned,: uuid, playerName, distance, data.
It will also return the data in a table.
The max range is configurable in the mod's config file, though the maximum is 64 blocks.
Example Program:
output=component.os_rfidReader.scan(10)
fork, vinpairs(output[1]) doprint(k, v)
end
It would return:
uuid (uuid)
data (data)
player (player)
range (range)