attack dropping modules
This commit is contained in:
@@ -97,12 +97,14 @@ local function dropOff()
|
|||||||
|
|
||||||
inv = turtle.getSummedInventory()
|
inv = turtle.getSummedInventory()
|
||||||
for _, slot in pairs(inv) do
|
for _, slot in pairs(inv) do
|
||||||
if slot.count >= 16 then
|
if slot.count >= 16 or turtle.getSlot(8).count > 0 then
|
||||||
local chests = findChests()
|
local chests = findChests()
|
||||||
for c in Point.iterateClosest(turtle.point, chests) do
|
for c in Point.iterateClosest(turtle.point, chests) do
|
||||||
if turtle.dropDownAt(c, slot.name) then
|
if slot.name ~= 'plethora:module' then
|
||||||
chest = c
|
if turtle.dropDownAt(c, slot.name) then
|
||||||
break
|
chest = c
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
--_G.requireInjector(_ENV)
|
|
||||||
|
|
||||||
local Event = require('event')
|
local Event = require('event')
|
||||||
local Project = require('neural.project')
|
local Project = require('neural.project')
|
||||||
local UI = require('ui')
|
local UI = require('ui')
|
||||||
@@ -35,6 +33,7 @@ local page = UI.Page {
|
|||||||
q = 'quit',
|
q = 'quit',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
function page.grid:getDisplayValues(row)
|
function page.grid:getDisplayValues(row)
|
||||||
row = Util.shallowCopy(row)
|
row = Util.shallowCopy(row)
|
||||||
row.x = math.floor(row.x)
|
row.x = math.floor(row.x)
|
||||||
@@ -65,3 +64,5 @@ end)
|
|||||||
|
|
||||||
UI:setPage(page)
|
UI:setPage(page)
|
||||||
UI:pullEvents()
|
UI:pullEvents()
|
||||||
|
|
||||||
|
canvas:clear()
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ function Project:draw(meta, b, text, color)
|
|||||||
x = math.min(math.max(x, 1), self.cx - 10 * getCharSize(d))
|
x = math.min(math.max(x, 1), self.cx - 10 * getCharSize(d))
|
||||||
y = math.min(math.max(self.cy - y, 1), self.cy - 10 * getCharSize(d))
|
y = math.min(math.max(self.cy - y, 1), self.cy - 10 * getCharSize(d))
|
||||||
|
|
||||||
self.canvas.addDot({ x, y }, color, 4)
|
self.canvas.addDot({ x, y }, color, 32 / d)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,6 +22,6 @@
|
|||||||
[ "Entities" ] = {
|
[ "Entities" ] = {
|
||||||
title = "Entities",
|
title = "Entities",
|
||||||
category = "Neural",
|
category = "Neural",
|
||||||
run = "Entites.lua",
|
run = "Entities.lua",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user