infiniteblock

Untitled

Jan 25th, 2021 (edited)
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local sides = peripheral.getNames()
  2. local data
  3. local shipcores = {}
  4.       for _, side in pairs(sides) do
  5.   if peripheral.getType(side) == "warpdriveShipController" then
  6.     print("Wrapping " .. side)
  7.     table.insert(shipcores, peripheral.wrap(side))
  8.     table.sort(shipcores, function(a, b) return a.getShipSize > b.getShipSize end)
  9.  
  10.   end
  11. end
  12.       for _, shipcore in pairs(shipcores) do
  13.       print(shipcore.getShipSize)
  14.      end
Add Comment
Please, Sign In to add comment