diff --git a/de_react_auto b/de_react_auto index 1a7d755..b063e7d 100644 --- a/de_react_auto +++ b/de_react_auto @@ -935,11 +935,19 @@ local function updateDisplay() if maxFuel <= 0 then maxFuel = 1 end -- SAFETY: prevent division by zero local fuelPercent = fuel / maxFuel + -- Color fuel based on thresholds + local fuelColor = colors.lime + if fuelPercent >= CONFIG.fuel_shutdown_threshold then + fuelColor = colors.red + elseif fuelPercent >= CONFIG.fuel_warning_threshold then + fuelColor = colors.orange + end + mon.setCursorPos(1, y) mon.setTextColor(colors.white) mon.write("Fuel Used: ") - mon.setTextColor(colors.brown) - mon.write(formatPercent(fuelPercent)) + mon.setTextColor(fuelColor) + mon.write(formatPercent(fuelPercent) .. " (Shutdown: " .. formatPercent(CONFIG.fuel_shutdown_threshold) .. ")") y = y + 1 drawProgressBar(mon, 1, y, w - 2, fuelPercent, 1, colors.brown, colors.green)