v1.10.0 - Improved the component library to add things like component.gpu.
This commit is contained in:
@@ -84,4 +84,13 @@ function compLib.get(address)
|
||||
return nil, "full address not found"
|
||||
end
|
||||
|
||||
-- Add main component proxies to the library
|
||||
setmetatable(compLib, {["__index"] = function(_, item)
|
||||
if compLib.list(item)() then
|
||||
return compLib.proxy(compLib.list(item)())
|
||||
else
|
||||
return compLib[item]
|
||||
end
|
||||
end})
|
||||
|
||||
return compLib
|
||||
|
||||
@@ -10,7 +10,7 @@ local raster = {
|
||||
|
||||
local component = import("component")
|
||||
-- local ocelot = component.proxy(component.list("ocelot")())
|
||||
local gpu = component.proxy(component.list("gpu")())
|
||||
local gpu = component.gpu
|
||||
|
||||
local display = {}
|
||||
local chunksAffected = {}
|
||||
|
||||
Reference in New Issue
Block a user