Add Zinc washing test and large stock page controls

This commit is contained in:
2026-07-18 02:36:22 +02:00
parent d4f18113a6
commit 8a14c96534
2 changed files with 35 additions and 10 deletions
+4
View File
@@ -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
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
- zentrale Leitwarte fuer Status, Energie, Alarme und Sektor-Hauptschalter
+31 -10
View File
@@ -60,6 +60,20 @@ local actions = {
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)
@@ -240,15 +254,17 @@ local function drawStockPage(width)
stockPageButtons[#stockPageButtons + 1] = {
direction = -1,
x1 = 1,
x2 = math.floor(width / 3),
y = 3,
x2 = math.floor(width / 2),
y1 = 3,
y2 = 8,
enabled = stockPage > 1,
}
stockPageButtons[#stockPageButtons + 1] = {
direction = 1,
x1 = math.ceil(width * 2 / 3),
x1 = math.floor(width / 2) + 1,
x2 = width,
y = 3,
y1 = 3,
y2 = 8,
enabled = stockPage < stockPageCount,
}
@@ -338,12 +354,16 @@ local function render()
local xRight = xLeft + buttonWidth + gap
local buttonHeight = 2
drawButton(actions[1], xLeft, buttonTop, xLeft + buttonWidth - 1, buttonTop + buttonHeight - 1)
drawButton(actions[2], xRight, buttonTop, xRight + buttonWidth - 1, buttonTop + buttonHeight - 1)
drawButton(actions[3], xLeft, buttonTop + 3, xLeft + buttonWidth - 1, buttonTop + 4)
drawButton(actions[4], xRight, buttonTop + 3, xRight + buttonWidth - 1, buttonTop + 4)
for index, action in ipairs(actions) do
local column = (index - 1) % 2
local actionRow = math.floor((index - 1) / 2)
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)
for index, message in ipairs(messages) do
writeAt(2, logTitleRow + index, message, colors.lightGray)
@@ -417,7 +437,8 @@ end
local function handleTouch(x, y)
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
stockPage = stockPage + pageButton.direction
statusText = "Lagerseite " .. tostring(stockPage) .. "/" .. tostring(stockPageCount)