Files
opus-apps/milo/plugins/brewingStandView.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

43 lines
1.2 KiB
Lua

local Ansi = require('opus.ansi')
local UI = require('opus.ui')
local colors = _G.colors
local device = _G.device
local template =
[[%sBrewing stands have the ability to automatically learn recipes.%s
Simply craft potions in the brewing stand as normal except for these conditions.
1. Place item in top slot FIRST.
2. Place all 3 bottles.
When finished brewing, the recipe will be available upon refreshing.
Note that you do not need to import items from the brewing stand or export blaze powder, this will be done automatically.]]
local wizardPage = UI.WizardPage {
title = 'Brewing Stand',
index = 2,
[1] = UI.TextArea {
x = 2, ex = -2, y = 2, ey = -2,
value = string.format(template, Ansi.yellow, Ansi.reset),
},
}
-- Brewing stand shows as Cauldron is Minecraft 1.10
function wizardPage:isValidType(node)
local m = device[node.name]
return m and (m.type == 'minecraft:brewing_stand' or m.type == 'Cauldron') and {
name = 'Brewing Stand',
value = 'brewingStand',
category = 'machine',
help = 'Auto-learning brewing stand',
}
end
function wizardPage:isValidFor(node)
return node.mtype == 'brewingStand'
end
UI:getPage('nodeWizard').wizard:add({ brewingStand = wizardPage })