MomoFloFlo

Untitled

Nov 7th, 2025
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. local component = require("component")
  2. local sides = require("sides")
  3.  
  4. -- Finde deinen Adapter
  5. local adapter = component.adapter
  6.  
  7. print("=== Adapter Analysis ===")
  8. print("Adapter Address: " .. adapter.address)
  9. print("")
  10.  
  11. -- PrΓΌfe alle 6 Seiten des Adapters
  12. for side = 0, 5 do
  13.   local sideName = sides[side]
  14.   print("--- Side: " .. sideName .. " ---")
  15.  
  16.   -- Versuche Methoden fΓΌr diese Seite zu bekommen
  17.   local success, methods = pcall(function()
  18.     return adapter.methods(side)
  19.   end)
  20.  
  21.   if success and methods and #methods > 0 then
  22.     print("Found component with methods:")
  23.     for i, method in ipairs(methods) do
  24.       print("  " .. i .. ". " .. method)
  25.     end
  26.    
  27.     -- Versuche auch den Typ zu bekommen
  28.     local typeSuccess, componentType = pcall(function()
  29.       return adapter.type(side)
  30.     end)
  31.    
  32.     if typeSuccess and componentType then
  33.       print("Component Type: " .. componentType)
  34.     end
  35.   else
  36.     print("  No component detected")
  37.   end
  38.   print("")
  39. end
Advertisement
Add Comment
Please, Sign In to add comment