Advertisement
lucasmontec

tankTester

Jul 6th, 2025
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. -- Wrap modem on the correct side
  2. local modem = peripheral.wrap("left") -- change "left" to your modem side
  3.  
  4. -- Function to send a tank update
  5. local function sendTankUpdate()
  6. -- Example tank update table
  7. local tankUpdate = {
  8. name = "test_tank",
  9. amount = math.random(0, 10000), -- random fill for testing
  10. capacity = 10000,
  11. fluid = "mod:water",
  12. color = "blue"
  13. }
  14.  
  15. -- Send the message on channel 1
  16. modem.transmit(1, 1, tankUpdate)
  17. print("Sent tank update!")
  18. end
  19.  
  20. -- Main manual test loop
  21. while true do
  22. print("Press Enter to send test tank update...")
  23. read()
  24. sendTankUpdate()
  25. end
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement