mirror of
https://github.com/kepler155c/opus
synced 2024-06-14 09:26:54 +00:00
builder tweaks
This commit is contained in:
parent
87aed4dc01
commit
7438252fb4
|
@ -1703,6 +1703,7 @@ function supplyPage:setSupplies(supplies)
|
||||||
else
|
else
|
||||||
entry.need = entry.need + s.need
|
entry.need = entry.need + s.need
|
||||||
end
|
end
|
||||||
|
entry.need = entry.need - turtle.getItemCount(s.index)
|
||||||
end
|
end
|
||||||
|
|
||||||
self.grid:setValues(t)
|
self.grid:setValues(t)
|
||||||
|
|
|
@ -22,10 +22,10 @@ function Util.tryTimes(attempts, f, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Util.throttle(fn)
|
function Util.throttle(fn)
|
||||||
local ts = os.time()
|
local ts = os.clock()
|
||||||
local timeout = .095
|
local timeout = .095
|
||||||
return function(...)
|
return function(...)
|
||||||
local nts = os.time()
|
local nts = os.clock()
|
||||||
if nts > ts + timeout then
|
if nts > ts + timeout then
|
||||||
ts = nts
|
ts = nts
|
||||||
os.sleep(0)
|
os.sleep(0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user