Add support for custom dropper/barrel names in inventoryClient
This commit is contained in:
@@ -13,6 +13,11 @@ local CLIENT_CHANNEL = 4202 -- client listens for replies here
|
||||
local MONITOR_SIDE = "left"
|
||||
local SMELTER_MONITOR_SIDE = "top"
|
||||
|
||||
-- Remote station: set these to use a different dropper/barrel than the master.
|
||||
-- Leave empty ("") to use the master's default dropper/barrel.
|
||||
local CLIENT_DROPPER_NAME = "" -- e.g. "minecraft:dropper_5"
|
||||
local CLIENT_BARREL_NAME = "" -- e.g. "minecraft:barrel_3"
|
||||
|
||||
-------------------------------------------------
|
||||
-- State (received from master)
|
||||
-------------------------------------------------
|
||||
@@ -1101,9 +1106,10 @@ local function handleTouch(x, y)
|
||||
needsRedraw = true
|
||||
-- Send order to master
|
||||
sendToMaster({
|
||||
type = "order",
|
||||
itemName = itemName,
|
||||
amount = selectedAmount,
|
||||
type = "order",
|
||||
itemName = itemName,
|
||||
amount = selectedAmount,
|
||||
dropperName = CLIENT_DROPPER_NAME ~= "" and CLIENT_DROPPER_NAME or nil,
|
||||
})
|
||||
print(string.format("[ORDER] Sent to master: %s x%d", itemName, selectedAmount))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user