phase out peripheral.lookup

This commit is contained in:
kepler155c@gmail.com
2019-03-08 16:26:18 -05:00
parent 9392fe47f8
commit 3192dc52d7
4 changed files with 11 additions and 40 deletions

View File

@@ -20,20 +20,20 @@ Use this turtle for machine crafting.
--]]
local Event = require('event')
local Peripheral = require('peripheral')
local Util = require('util')
local device = _G.device
local fs = _G.fs
local os = _G.os
local peripheral = _G.peripheral
local turtle = _G.turtle
local STARTUP_FILE = 'usr/autorun/brewArray.lua'
local function equip(side, item, rawName)
local equipped = Peripheral.lookup('side/' .. side)
local equipped = peripheral.getType(side)
if equipped and equipped.type == item then
if equipped == item then
return true
end