Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughUnder the Hood
Player Notes
WalkthroughTech‑Priest, the machine spirit records: promotion decisions no longer fallback to low‑health overrides; unit health colouring thresholds were rewritten; bionics construction and acquisition were refactored and normalized; UI manage selection now caches focus and resets manage constants after actions. (≤50 words) Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/scr_ui_manage/scr_ui_manage.gml (1)
1390-1395:⚠️ Potential issue | 🟠 MajorIdentical vulnerability in Reset action path.
The same structural validation deficiency manifests here, Tech-Priest. Apply the protective ward consistently.
🛡️ Proposed defensive rite
if (reset_possible) { button.alpha = 1; if (button.draw()) { reset_selection_equipment(); - reset_manage_unit_constants(_unit_focus); + if (is_struct(_unit_focus)) { + reset_manage_unit_constants(_unit_focus); + } } }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: cd1093b5-1ec6-4d5b-ad8c-be0e3333a36f
📒 Files selected for processing (6)
scripts/scr_company_view/scr_company_view.gmlscripts/scr_draw_management_unit/scr_draw_management_unit.gmlscripts/scr_marine_struct/scr_marine_struct.gmlscripts/scr_special_view/scr_special_view.gmlscripts/scr_ui_manage/scr_ui_manage.gmlscripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml
💤 Files with no reviewable changes (2)
- scripts/scr_special_view/scr_special_view.gml
- scripts/scr_company_view/scr_company_view.gml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.gml
⚙️ CodeRabbit configuration file
- All code should comply with the 2026 GML documentation.
Files:
scripts/scr_ui_manage/scr_ui_manage.gmlscripts/scr_draw_management_unit/scr_draw_management_unit.gmlscripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gmlscripts/scr_marine_struct/scr_marine_struct.gml
**/*.*
⚙️ CodeRabbit configuration file
**/*.*: - Code Philosophy: Prioritize explicit intent and maintainability over brevity. If a
solution is "clever" but mentally taxing, request a refactor to a clearer approach.
Variable Naming: Use clear, descriptive names; avoid over-abbreviation.
Abstraction: Apply the "Rule of Three"; suggest abstraction only when similar logic is
repeated three or more times to avoid premature complexity.Subjective Choices: For naming or architecture, ask guiding questions to prompt developer
reflection and provide at least two alternative perspectives.TODOs: If a TODO comment is added, ask the user if a GitHub issue should be created. If a
TODO comment is deleted, remind the user to check the status of that specific issue.
Files:
scripts/scr_ui_manage/scr_ui_manage.gmlscripts/scr_draw_management_unit/scr_draw_management_unit.gmlscripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gmlscripts/scr_marine_struct/scr_marine_struct.gml
🧠 Learnings (3)
📓 Common learnings
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 424
File: scripts/scr_flavor/scr_flavor.gml:34-36
Timestamp: 2025-03-09T02:33:43.867Z
Learning: EttyKitty prefers to keep PRs focused on their stated goals and scope, and may decline to implement otherwise valid suggestions if they're not directly related to the PR's primary objective.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 579
File: objects/obj_enunit/Alarm_0.gml:200-202
Timestamp: 2025-03-11T01:38:19.874Z
Learning: EttyKitty welcomes easy, committable suggestions that improve documentation of code chunks, variables with strange names, and functions. Their codebase is generally lacking documentation, but they prioritize human-readable code above documentation.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 878
File: sprites/spr_weapon_phobos_bolt_pistol/spr_weapon_phobos_bolt_pistol.yy:26-44
Timestamp: 2025-06-16T17:08:08.239Z
Learning: EttyKitty prefers automated solutions over manual cleanup for .yy file formatting and is open to automated tools for GameMaker Studio .yy file cleanup.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 938
File: scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml:478-478
Timestamp: 2025-07-21T17:03:28.251Z
Learning: EttyKitty acknowledges when PRs contain scope creep and agrees that changes should be focused on the stated PR objectives, reinforcing their preference for keeping PRs narrowly scoped to their primary purpose.
📚 Learning: 2025-03-07T01:56:40.971Z
Learnt from: MCPO-Spartan-117
Repo: Adeptus-Dominus/ChapterMaster PR: 562
File: scripts/scr_marine_struct/scr_marine_struct.gml:0-0
Timestamp: 2025-03-07T01:56:40.971Z
Learning: Marines' ages should be incremented at the year transition in obj_turn_end/Alarm_1.gml rather than calculated dynamically based on the current year and recruitment date. This ensures proper aging without retroactive application.
Applied to files:
scripts/scr_draw_management_unit/scr_draw_management_unit.gml
📚 Learning: 2025-04-15T11:03:37.154Z
Learnt from: VanWeapon
Repo: Adeptus-Dominus/ChapterMaster PR: 725
File: scripts/scr_initialize_custom/scr_initialize_custom.gml:2474-2572
Timestamp: 2025-04-15T11:03:37.154Z
Learning: In the ChapterMaster initialization code, negative values in the company structure (e.g., for vehicles like rhinos, landspeeders) are acceptable as only positive values will result in units being created.
Applied to files:
scripts/scr_marine_struct/scr_marine_struct.gml
🔇 Additional comments (4)
scripts/scr_marine_struct/scr_marine_struct.gml (1)
751-754: The refactored augmentation protocol exhibits proper form.The restructured
add_bionicsfunction demonstrates commendable clarity, Tech-Priest. The parameter standardisation with underscore prefixes, the switch-based stat modifications, and the explicit health capping logic align with sacred machine principles of maintainability.Also applies to: 788-842
scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml (1)
564-588: The mass-augmentation protocol functions within acceptable parameters.The selection iteration logic exhibits proper form, Tech-Priest. The early Armoury check, unit eligibility filtering, and dreadnought exclusion demonstrate sound machine-logic.
However, be advised: this function's integrity depends upon the sanctity of
_unit.add_bionics(). The corruption identified inscr_marine_struct.gml(premature Armoury consumption) will propagate through this conduit, potentially consuming sacred components without successful augmentation when units possess fully-augmented flesh-forms.scripts/scr_ui_manage/scr_ui_manage.gml (1)
1237-1237: The local variable extraction demonstrates proper optimisation.The caching of
obj_controller.unit_focusinto_unit_focusreduces redundant property access and improves code clarity. The struct validation guard at lines 1290-1291 shows appropriate defensive practice that should be propagated to the other access points identified above.Also applies to: 1290-1292
scripts/scr_draw_management_unit/scr_draw_management_unit.gml (1)
327-338: Health status indicators now operate with proper diagnostic clarity.The separation of health-state colouring from promotion recommendations demonstrates sound protocol design, Tech-Priest. The tiered thresholds (≤0 critical, ≤15 warning) provide clear visual diagnostics for unit integrity assessment.
The decoupling ensures that promotion eligibility no longer corrupts health status display—a necessary purification of the prior logic contamination.
No description provided.