From ebc3efba6a994d110c6dcae3d81d90f64ec610b8 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sun, 22 Mar 2026 02:12:04 -0400 Subject: [PATCH] Add commandId to transmitted messages for improved command tracking --- inventoryWebBridge.lua | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/inventoryWebBridge.lua b/inventoryWebBridge.lua index cbb3919..db7045e 100644 --- a/inventoryWebBridge.lua +++ b/inventoryWebBridge.lua @@ -128,39 +128,47 @@ local function processCommand(cmd) if action == "order" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { type = "order", + commandId = cmd.commandId, itemName = cmd.itemName, amount = cmd.amount, dropperName = cmd.dropperName, }) elseif action == "scan" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { - type = "scan", + type = "scan", + commandId = cmd.commandId, }) elseif action == "toggle_pause" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { - type = "toggle_pause", + type = "toggle_pause", + commandId = cmd.commandId, }) elseif action == "toggle_recipe" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { - type = "toggle_recipe", - recipe = cmd.recipe, + type = "toggle_recipe", + commandId = cmd.commandId, + recipe = cmd.recipe, }) elseif action == "enable_all" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { - type = "enable_all", + type = "enable_all", + commandId = cmd.commandId, }) elseif action == "disable_all" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { - type = "disable_all", + type = "disable_all", + commandId = cmd.commandId, }) elseif action == "sort_barrel" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { type = "sort_barrel", + commandId = cmd.commandId, barrelName = cmd.barrelName, }) elseif action == "craft" then modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, { type = "craft", + commandId = cmd.commandId, recipeIdx = cmd.recipeIdx, }) else