Add War Thunder-style equipment damage panel with top-down model#2
Add War Thunder-style equipment damage panel with top-down model#2dldev32 wants to merge 2 commits into
Conversation
Implements a damage indicator panel that appears in the bottom-left corner of the screen while riding a vehicle. Shows: - Semi-transparent dark background panel - Vehicle name as title - Isometric 3D model preview of the vehicle - Hull health bar with color-coded damage state - Individual part health bars (engines, wheels/tracks, guns, propellers) Health bars use a green->yellow->orange->red color gradient based on damage percentage (>75% green, >50% yellow, >25% orange, <=25% red). New files: - GUIEquipmentDamagePanel: Main panel overlay GUI - GUIComponentDamageBar: Colored health bar component - GUIComponentDamageRect: Simple colored rectangle component - damage_panel.png: Texture with white pixel block for color tinting https://claude.ai/code/session_011MwQM8URLX4upEQmL2KtgE
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c20322426
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (APart part : vehicle.allParts) { | ||
| String partName = getPartDisplayName(part); | ||
| if (partName != null && part.definition.general.health > 0) { |
There was a problem hiding this comment.
Exclude fake parts from damage panel entries
Filter out synthetic parts when building partEntries. This loop walks vehicle.allParts, which includes helper parts like PartGroundDeviceFake (added in PartGroundDevice.addPartsPostAddition), so long wheels/tracks can appear as duplicate rows in the panel. Those fake rows are implementation details rather than real equipment and can report different damage state than the visible part, which makes the panel misleading for players.
Useful? React with 👍 / 👎.
Replace health bars with War Thunder-style damage visualization: - Add GUIComponentVehicleDamageModel for top-down vehicle+parts rendering with 3-pass outline technique (enlarged white → dark mask → translucent fill) - Add GUIComponentIconCutout for color-tintable texture icon cutouts - Rewrite GUIEquipmentDamagePanel to use texture-based icons (white→red on destruction) and combined vehicle+parts model with damage color fill - Update damage_panel.png texture with white part icons and solid pixel block - Remove unused GUIComponentDamageBar and GUIComponentDamageRect https://claude.ai/code/session_011MwQM8URLX4upEQmL2KtgE
Summary
New Files
GUIComponentVehicleDamageModel- Renders vehicle + all parts from top-down with 3-pass outline technique (enlarged white silhouette → dark background mask → translucent damage fill)GUIComponentIconCutout- Extension ofGUIComponentCutoutwith color tinting support for damage state iconsdamage_panel.png- 256x256 texture with dark panel background, 6 white part type icons, and solid white pixel block for color tintingModified Files
GUIEquipmentDamagePanel- Rewritten to use texture-based icons and combined vehicle+parts model renderingPartSeat.java- Opens and closes the damage panel alongside the existing GUIHUDRemoved Files
GUIComponentDamageBar- Replaced by model-based damage visualizationGUIComponentDamageRect- No longer neededTest plan
https://claude.ai/code/session_011MwQM8URLX4upEQmL2KtgE