attack dropping modules
This commit is contained in:
@@ -97,12 +97,14 @@ local function dropOff()
|
||||
|
||||
inv = turtle.getSummedInventory()
|
||||
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()
|
||||
for c in Point.iterateClosest(turtle.point, chests) do
|
||||
if turtle.dropDownAt(c, slot.name) then
|
||||
chest = c
|
||||
break
|
||||
if slot.name ~= 'plethora:module' then
|
||||
if turtle.dropDownAt(c, slot.name) then
|
||||
chest = c
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
--_G.requireInjector(_ENV)
|
||||
|
||||
local Event = require('event')
|
||||
local Project = require('neural.project')
|
||||
local UI = require('ui')
|
||||
@@ -35,6 +33,7 @@ local page = UI.Page {
|
||||
q = 'quit',
|
||||
},
|
||||
}
|
||||
|
||||
function page.grid:getDisplayValues(row)
|
||||
row = Util.shallowCopy(row)
|
||||
row.x = math.floor(row.x)
|
||||
@@ -65,3 +64,5 @@ end)
|
||||
|
||||
UI:setPage(page)
|
||||
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))
|
||||
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
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
[ "Entities" ] = {
|
||||
title = "Entities",
|
||||
category = "Neural",
|
||||
run = "Entites.lua",
|
||||
run = "Entities.lua",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user