Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Wrap modem on the correct side
- local modem = peripheral.wrap("left") -- change "left" to your modem side
- -- Function to send a tank update
- local function sendTankUpdate()
- -- Example tank update table
- local tankUpdate = {
- name = "test_tank",
- amount = math.random(0, 10000), -- random fill for testing
- capacity = 10000,
- fluid = "mod:water",
- color = "blue"
- }
- -- Send the message on channel 1
- modem.transmit(1, 1, tankUpdate)
- print("Sent tank update!")
- end
- -- Main manual test loop
- while true do
- print("Press Enter to send test tank update...")
- read()
- sendTankUpdate()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement