Files
opus-apps/milo/plugins/inputChestView.lua
kepler155c 4576969739 Ui enhancements 2.0 (#29)
* canvas overhaul

* editor 2.0

* more tweaks

* more editor work

* completions + refactor

* cleanup + editor additions

* cleanup + undo overhaul

* editor recent/peripherals/redo + cleanup

* editor path issues

* cleanup

* changes for deprecated ui methods - recolor milo - make turtle scripts run again - mob rancher improvements

* can now use named colors
2020-04-21 22:40:47 -06:00

37 lines
822 B
Lua

local Ansi = require('opus.ansi')
local UI = require('opus.ui')
local device = _G.device
--[[ Configuration Screen ]]
local template =
[[%sInput Chest%s
Any items placed in this chest will be imported into storage.
]]
local inputChestWizardPage = UI.WizardPage {
title = 'Input Chest',
index = 2,
[1] = UI.TextArea {
x = 2, ex = -2, y = 2, ey = -2,
value = string.format(template, Ansi.yellow, Ansi.reset),
},
}
function inputChestWizardPage:isValidType(node)
local m = device[node.name]
return m and m.pullItems and {
name = 'Input Chest',
value = 'input',
category = 'custom',
help = 'Sends all items to storage',
}
end
function inputChestWizardPage:isValidFor(node)
return node.mtype == 'input'
end
UI:getPage('nodeWizard').wizard:add({ inputChest = inputChestWizardPage })