regressions

This commit is contained in:
kepler155c
2018-01-26 06:36:53 -05:00
parent 1a0bf56b70
commit fcaaf87052
6 changed files with 11 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ local JSON = require('json')
local blockDB = TableDB()
function blockDB:load()
local blocks = JSON.decodeFromFile('usr/etc/blocks.json')
local blocks = JSON.decodeFromFile('usr/etc/names/minecraft.json')
if not blocks then
error('Unable to read blocks.json')

View File

@@ -443,7 +443,7 @@ function TurtleBuilder:inAirDropoff()
turtle._goto(pt)
os.sleep(.1) -- random computer is not connected error
local chestAdapter = Adapter.wrap({ direction = 'down', wrapSide = 'top' })
local chestAdapter = Adapter.wrap({ direction = 'down', side = 'top' })
if not chestAdapter then
self:log('Chests above is not valid')
@@ -505,7 +505,7 @@ function TurtleBuilder:inAirResupply()
turtle._goto(pt)
os.sleep(.1) -- random computer is not connected error
local chestAdapter = Adapter.wrap({ direction = 'down', wrapSide = 'top' })
local chestAdapter = Adapter.wrap({ direction = 'down', side = 'top' })
if not chestAdapter then
Util.print('not valid')

View File

@@ -16,13 +16,17 @@ local turtle = _G.turtle
local config = {
computerFacing = 'north',
inventorySide = 'front',
monitor = 'type/monitor',
}
Config.load('crafter', config)
repeat until not turtle.forward()
local inventoryAdapter = InventoryAdapter.wrap({ side = 'front', facing = config.computerFacing })
local inventoryAdapter = InventoryAdapter.wrap({
side = config.inventorySide,
facing = config.computerFacing
})
if not inventoryAdapter then
error('Invalid inventory configuration')
end

View File

@@ -742,7 +742,7 @@ if #args < 1 then
error('supply file name')
end
Builder.itemAdapter = Adapter.wrap()
Builder.itemAdapter = Adapter.wrap({ side = 'bottom', direction = 'up' })
if not Builder.itemAdapter then
error('A chest or ME interface must be below turtle')
end

View File

@@ -1237,7 +1237,7 @@ function craftPage:eventHandler(event)
if event.type == 'cancel' then
UI:setPreviousPage()
elseif event.type == 'enable_view' and event.view == self.wizard.pages.resources then
elseif event.type == 'enable_view' and event.next then
local items = listItems()
local count = tonumber(self.wizard.pages.quantity.count.value)
local recipe = Craft.findRecipe(self.item)
@@ -1246,6 +1246,7 @@ function craftPage:eventHandler(event)
v.displayName = itemDB:getName(v)
end
self.wizard.pages.resources.grid:setValues(ingredients)
return false
elseif event.type == 'accept' then
local key = uniqueKey(self.item)

View File

@@ -51,7 +51,6 @@ local clipboard
-- do we need a clipboard shim
if not multishell or not _G.kernel then -- is this OpusOS ?
debug('nope')
if _G.clipboard then -- has it been installed already
clipboard = _G.clipboard
else
@@ -1032,7 +1031,6 @@ local __actions = {
if clipboard then
clipboard.setData(text)
else
debug(text)
os.queueEvent('clipboard_copy', text)
end
setStatus('shift-^v to paste')