Advertisement
jaklsfjlsak

1/25/21 飞船控制器相关 0kv2AWCL

Sep 5th, 2022
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement