From 02b27b1e4377480a91481e457b59ee350be0f118 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 03:34:09 +0000 Subject: [PATCH] Fix UI labeling and redundancy in StallConsole - Hide "Rate" stat for Bak Kut Teh stalls (always 0 and misleading) - Rename "Range" to "Boost Range" for Bak Kut Teh for better clarity - Use "Grab Rate" consistently for Tray Return Uncle stalls - Remove unused 'hungerValue' variable - Update fixes.md with FIX-015 Co-authored-by: candour <4670475+candour@users.noreply.github.com> --- .../hawker/ui/components/StallConsole.kt | 17 +++++++---------- fixes.md | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/messark/hawker/ui/components/StallConsole.kt b/app/src/main/java/com/messark/hawker/ui/components/StallConsole.kt index c37aed2..b4c183f 100644 --- a/app/src/main/java/com/messark/hawker/ui/components/StallConsole.kt +++ b/app/src/main/java/com/messark/hawker/ui/components/StallConsole.kt @@ -129,12 +129,6 @@ fun StallConsole( StallType.BAK_KUT_TEH -> "Boost" else -> "Damage" } - val hungerValue = when (stall.stallType) { - StallType.TEH_TARIK, StallType.TRAY_RETURN_UNCLE -> "${stall.effectDurationMs}ms" - StallType.ICE_KACHANG -> "${stall.freezeDurationMs}ms" - StallType.BAK_KUT_TEH -> "+${stall.damage.toInt()}%" - else -> "${stall.damage.toInt()}" - } val hungerLabel = if (stall.stallType == StallType.BAK_KUT_TEH) { if (bktBuffType == com.messark.hawker.model.BktBuffType.HERBAL) "Rate Boost" else "Dmg Boost" } else hungerWord @@ -147,11 +141,14 @@ fun StallConsole( } StatLine(label = buildInlinedLabel(stall, hungerLabel, hungerCategory), value = hungerDisplayValue) - StatLine(label = buildInlinedLabel(stall, "Range", "Range"), value = String.format("%.1f", stall.range)) + val rangeLabel = if (stall.stallType == StallType.BAK_KUT_TEH) "Boost Range" else "Range" + StatLine(label = buildInlinedLabel(stall, rangeLabel, "Range"), value = String.format("%.1f", stall.range)) - val rateCategory = if (stall.stallType == StallType.TRAY_RETURN_UNCLE) "Grab Rate" else "Rate" - val displayRate = if (stall.stallType == StallType.BAK_KUT_TEH) 0f else (stall.fireRateMs / rateMultiplier) / 1000f - StatLine(label = buildInlinedLabel(stall, "Rate", rateCategory), value = String.format("%.1fs", displayRate)) + if (stall.stallType != StallType.BAK_KUT_TEH) { + val rateLabel = if (stall.stallType == StallType.TRAY_RETURN_UNCLE) "Grab Rate" else "Rate" + val displayRate = (stall.fireRateMs / rateMultiplier) / 1000f + StatLine(label = buildInlinedLabel(stall, rateLabel, rateLabel), value = String.format("%.1fs", displayRate)) + } if (stall.aoeRadius > 0) { StatLine(label = buildInlinedLabel(stall, "Area", "Radius"), value = String.format("%.1f", stall.aoeRadius)) diff --git a/fixes.md b/fixes.md index a92c5ce..bb23ffc 100644 --- a/fixes.md +++ b/fixes.md @@ -47,3 +47,4 @@ This document tracks identified and resolved bugs in the Hawker Rush codebase. | FIX-014 | 2026-05-20 | Fixed a bug where `undoSell` did not enforce pathing or Tray Return Uncle rules, allowing players to block the main path or leave Uncles without neighbors. Centralized validation into `validateStallPlacement`. | Resolved | | REF-012 | 2026-05-18 | Refactored the enemy processing pipeline in `MainViewModel.kt` to consolidate movement and transient logic into `handleEnemyPipeline`. Introduced `EngineUpdateBatch` for efficient state updates and optimized "held enemy" tracking to eliminate redundant grid-wide iterations. | Resolved | | REF-013 | 2026-07-10 | Refactored `MainViewModel.kt` stall interaction logic (onCellClick, sellStall, undoSell) for better modularity and atomicity. Optimized `validateStallPlacement` by skipping redundant A* pathfinding for enemies whose paths are not intersected by new stalls. | Resolved | +| FIX-015 | 2026-07-15 | Improved `StallConsole.kt` UI by hiding redundant "Rate" stats for Bak Kut Teh stalls, re-labeling their "Range" to "Boost Range", and ensuring consistent "Grab Rate" labeling for the Tray Return Uncle stall. Removed unused `hungerValue` code. | Resolved |