attack dropping modules

This commit is contained in:
kepler155c@gmail.com
2018-12-16 22:38:25 -05:00
parent 82a82fbcab
commit e0c45bd87c
4 changed files with 11 additions and 8 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -22,6 +22,6 @@
[ "Entities" ] = {
title = "Entities",
category = "Neural",
run = "Entites.lua",
run = "Entities.lua",
},
}