Add Zinc washing test and large stock page controls
This commit is contained in:
@@ -33,6 +33,10 @@ Testbestellungen fuer `crushing`, `saw:1` und `saw:2`. Pro Verarbeitungslinie
|
|||||||
bleibt nur ein Auftrag aktiv, bis sein Ergebnis im Lager erkannt wurde. Er
|
bleibt nur ein Auftrag aktiv, bis sein Ergebnis im Lager erkannt wurde. Er
|
||||||
steuert noch keine Clutches oder sonstigen Redstone-Ausgaenge.
|
steuert noch keine Clutches oder sonstigen Redstone-Ausgaenge.
|
||||||
|
|
||||||
|
Als erster generischer Fan-Prozess ist `fan:washing` enthalten. Der Testauftrag
|
||||||
|
verarbeitet 64 vereinheitlichte Zinc Clumps zu mindestens 576 Zinc Nuggets; das
|
||||||
|
zufaellige Gunpowder-Nebenprodukt erscheint automatisch in der Lagerliste.
|
||||||
|
|
||||||
## Zielbild
|
## Zielbild
|
||||||
|
|
||||||
- zentrale Leitwarte fuer Status, Energie, Alarme und Sektor-Hauptschalter
|
- zentrale Leitwarte fuer Status, Energie, Alarme und Sektor-Hauptschalter
|
||||||
|
|||||||
+31
-10
@@ -60,6 +60,20 @@ local actions = {
|
|||||||
outputPerInput = 6,
|
outputPerInput = 6,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id = "wash_zinc_clumps",
|
||||||
|
label = "576 ZINC NUGGETS",
|
||||||
|
lockKey = "fan:washing",
|
||||||
|
address = "fan:washing",
|
||||||
|
item = "alltheores:zinc_clump",
|
||||||
|
-- Washing yields 9 nuggets per clump and has a 25% Gunpowder byproduct.
|
||||||
|
inputCount = 64,
|
||||||
|
completion = {
|
||||||
|
mode = "expected",
|
||||||
|
output = "alltheores:zinc_nugget",
|
||||||
|
outputPerInput = 9,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local function findPeripheral(wantedType)
|
local function findPeripheral(wantedType)
|
||||||
@@ -240,15 +254,17 @@ local function drawStockPage(width)
|
|||||||
stockPageButtons[#stockPageButtons + 1] = {
|
stockPageButtons[#stockPageButtons + 1] = {
|
||||||
direction = -1,
|
direction = -1,
|
||||||
x1 = 1,
|
x1 = 1,
|
||||||
x2 = math.floor(width / 3),
|
x2 = math.floor(width / 2),
|
||||||
y = 3,
|
y1 = 3,
|
||||||
|
y2 = 8,
|
||||||
enabled = stockPage > 1,
|
enabled = stockPage > 1,
|
||||||
}
|
}
|
||||||
stockPageButtons[#stockPageButtons + 1] = {
|
stockPageButtons[#stockPageButtons + 1] = {
|
||||||
direction = 1,
|
direction = 1,
|
||||||
x1 = math.ceil(width * 2 / 3),
|
x1 = math.floor(width / 2) + 1,
|
||||||
x2 = width,
|
x2 = width,
|
||||||
y = 3,
|
y1 = 3,
|
||||||
|
y2 = 8,
|
||||||
enabled = stockPage < stockPageCount,
|
enabled = stockPage < stockPageCount,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,12 +354,16 @@ local function render()
|
|||||||
local xRight = xLeft + buttonWidth + gap
|
local xRight = xLeft + buttonWidth + gap
|
||||||
local buttonHeight = 2
|
local buttonHeight = 2
|
||||||
|
|
||||||
drawButton(actions[1], xLeft, buttonTop, xLeft + buttonWidth - 1, buttonTop + buttonHeight - 1)
|
for index, action in ipairs(actions) do
|
||||||
drawButton(actions[2], xRight, buttonTop, xRight + buttonWidth - 1, buttonTop + buttonHeight - 1)
|
local column = (index - 1) % 2
|
||||||
drawButton(actions[3], xLeft, buttonTop + 3, xLeft + buttonWidth - 1, buttonTop + 4)
|
local actionRow = math.floor((index - 1) / 2)
|
||||||
drawButton(actions[4], xRight, buttonTop + 3, xRight + buttonWidth - 1, buttonTop + 4)
|
local x = column == 0 and xLeft or xRight
|
||||||
|
local y = buttonTop + actionRow * 3
|
||||||
|
drawButton(action, x, y, x + buttonWidth - 1, y + buttonHeight - 1)
|
||||||
|
end
|
||||||
|
|
||||||
local logTitleRow = math.min(height - 4, buttonTop + 6)
|
local actionRows = math.ceil(#actions / 2)
|
||||||
|
local logTitleRow = math.min(height - 4, buttonTop + actionRows * 3)
|
||||||
writeAt(2, logTitleRow, "Letzte Ereignisse:", colors.yellow)
|
writeAt(2, logTitleRow, "Letzte Ereignisse:", colors.yellow)
|
||||||
for index, message in ipairs(messages) do
|
for index, message in ipairs(messages) do
|
||||||
writeAt(2, logTitleRow + index, message, colors.lightGray)
|
writeAt(2, logTitleRow + index, message, colors.lightGray)
|
||||||
@@ -417,7 +437,8 @@ end
|
|||||||
|
|
||||||
local function handleTouch(x, y)
|
local function handleTouch(x, y)
|
||||||
for _, pageButton in ipairs(stockPageButtons) do
|
for _, pageButton in ipairs(stockPageButtons) do
|
||||||
if y == pageButton.y and x >= pageButton.x1 and x <= pageButton.x2 then
|
if y >= pageButton.y1 and y <= pageButton.y2
|
||||||
|
and x >= pageButton.x1 and x <= pageButton.x2 then
|
||||||
if pageButton.enabled then
|
if pageButton.enabled then
|
||||||
stockPage = stockPage + pageButton.direction
|
stockPage = stockPage + pageButton.direction
|
||||||
statusText = "Lagerseite " .. tostring(stockPage) .. "/" .. tostring(stockPageCount)
|
statusText = "Lagerseite " .. tostring(stockPage) .. "/" .. tostring(stockPageCount)
|
||||||
|
|||||||
Reference in New Issue
Block a user