Clean up Line-of-Sight radial visualization - #148
Conversation
- Obstacles (Pillars) are now only considered if they are within the stall's attack range. - Shadow wedges now correctly start from the pillar's position instead of the stall's center. - Enforced that only pillars block LOS, as per user requirements. - Improved distance checks to prevent self-blocking and ensure clean visual rendering. Co-authored-by: candour <4670475+candour@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
📝 WalkthroughWalkthroughThe stall selection line-of-sight shadow logic is refined to render obstruction wedges only when pillar distance falls between a lower threshold and the stall's range, with the wedge's near edge positioned at the pillar's actual distance instead of a fixed offset. ChangesLine-of-Sight Shadow Wedge Refinement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/src/main/java/com/messark/hawker/ui/components/GameBoard.kt (1)
415-419: ⚡ Quick winMake LOS blockers explicitly pillar-only
LOS shadows are still sourced from
TileType.Obstructionviaobstructions, so new obstruction subtypes could accidentally start blocking LOS. Since the requirement is pillar-only blocking, filter explicitly forTileType.PILLARat source.Proposed change
- val obstructions = hexes.values.filter { it.type is TileType.Obstruction } + val obstructions = hexes.values.filter { it.type is TileType.PILLAR }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 211bab2e-4ef5-4df2-bacc-e28836d6527e
📒 Files selected for processing (1)
app/src/main/java/com/messark/hawker/ui/components/GameBoard.kt
Build Successful! 🚀Note: This link will be removed when the PR is closed. |
This change addresses the "crazy" radial lines seen in the stall selection UI. By filtering for only relevant obstacles (pillars within range) and correctly anchoring the shadow wedges at the obstacle's position rather than the stall's center, the visualization is now much cleaner and accurately reflects the actual blocked firing zones.
PR created automatically by Jules for task 14999766084127066769 started by @candour
Summary by CodeRabbit
Release Notes