milo: tweaks
This commit is contained in:
@@ -142,6 +142,9 @@ function itemDB:add(baseItem)
|
|||||||
-- disks
|
-- disks
|
||||||
elseif baseItem.media then
|
elseif baseItem.media then
|
||||||
-- don't ignore nbt... as disks can be labeled
|
-- don't ignore nbt... as disks can be labeled
|
||||||
|
if baseItem.media.recordTitle then
|
||||||
|
nItem.displayName = nItem.displayName .. ': ' .. baseItem.media.recordTitle
|
||||||
|
end
|
||||||
|
|
||||||
-- potions
|
-- potions
|
||||||
elseif nItem.name == 'minecraft:potion' or nItem.name == 'minecraft:lingering_potion' then
|
elseif nItem.name == 'minecraft:potion' or nItem.name == 'minecraft:lingering_potion' then
|
||||||
|
|||||||
@@ -1,23 +1,17 @@
|
|||||||
--[[
|
--[[
|
||||||
Provides: autocrafting, resource limits, on-demand crafting, storage stocker.
|
Provides: autocrafting, resource limits, on-demand crafting.
|
||||||
|
|
||||||
Using a turtle allows for crafting of items eliminating the need for AE/RS
|
|
||||||
molecular assemblers / crafters.
|
|
||||||
|
|
||||||
Turtle crafting:
|
Turtle crafting:
|
||||||
1. The turtle must have a crafting table equipped.
|
1. The turtle must have a crafting table equipped.
|
||||||
2. Equip the turtle with an introspection module.
|
2. Equip the turtle with an introspection module.
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
|
||||||
-- TODO: fix which is primary wired modem
|
|
||||||
|
|
||||||
_G.requireInjector(_ENV)
|
_G.requireInjector(_ENV)
|
||||||
|
|
||||||
local Config = require('config')
|
local Config = require('config')
|
||||||
local Event = require('event')
|
local Event = require('event')
|
||||||
local Milo = require('milo')
|
local Milo = require('milo')
|
||||||
local Peripheral = require('peripheral')
|
local Sound = require('sound')
|
||||||
local Storage = require('storage')
|
local Storage = require('storage')
|
||||||
local UI = require('ui')
|
local UI = require('ui')
|
||||||
local Util = require('util')
|
local Util = require('util')
|
||||||
@@ -145,9 +139,9 @@ context.storage.turtleInventory = context.turtleInventory
|
|||||||
|
|
||||||
local function loadDirectory(dir)
|
local function loadDirectory(dir)
|
||||||
for _, file in pairs(fs.list(dir)) do
|
for _, file in pairs(fs.list(dir)) do
|
||||||
_debug('loading: ' .. file)
|
|
||||||
local s, m = Util.run(_ENV, fs.combine(dir, file))
|
local s, m = Util.run(_ENV, fs.combine(dir, file))
|
||||||
if not s and m then
|
if not s and m then
|
||||||
|
_G.printError('Error loading: ' .. file)
|
||||||
error(m or 'Unknown error')
|
error(m or 'Unknown error')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -169,6 +163,7 @@ end
|
|||||||
Milo:clearGrid()
|
Milo:clearGrid()
|
||||||
|
|
||||||
UI:setPage(UI:getPage('listing'))
|
UI:setPage(UI:getPage('listing'))
|
||||||
|
Sound.play('ui.toast.challenge_complete')
|
||||||
|
|
||||||
local processing
|
local processing
|
||||||
|
|
||||||
|
|||||||
@@ -329,7 +329,6 @@ function page.grid:eventHandler(event)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function page:transfer(item, count, msg)
|
function page:transfer(item, count, msg)
|
||||||
--Sound.play('ui.button.click', .3)
|
|
||||||
self:sendRequest({ request = 'transfer', item = item, count = count }, msg)
|
self:sendRequest({ request = 'transfer', item = item, count = count }, msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ local function client(socket)
|
|||||||
nil,
|
nil,
|
||||||
request.requested,
|
request.requested,
|
||||||
data.item)
|
data.item)
|
||||||
|
|
||||||
local item = Milo:listItems()[request.key]
|
local item = Milo:listItems()[request.key]
|
||||||
socket:write({
|
socket:write({
|
||||||
type = 'transfer',
|
type = 'transfer',
|
||||||
|
|||||||
Reference in New Issue
Block a user