Skip to content

Merge development branch into main#1138

Merged
EttyKitty merged 3 commits intomainfrom
development
Apr 5, 2026
Merged

Merge development branch into main#1138
EttyKitty merged 3 commits intomainfrom
development

Conversation

@EttyKitty
Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3e6db1e5-ec25-47dc-8dfb-7f7699cabb4a

📥 Commits

Reviewing files that changed from the base of the PR and between 05434ee and 973fbc3.

📒 Files selected for processing (2)
  • scripts/scr_marine_struct/scr_marine_struct.gml
  • scripts/scr_ui_manage/scr_ui_manage.gml

📝 Walkthrough

Under the Hood

  • Removed health-based fallback promotion assignments in company management logic that applied when ma_health[v] <= 10, simplifying promotion decision branches in scr_company_view and scr_special_view
  • Refactored TTRPG_stats.add_bionics(): renamed parameters, simplified control flow, normalized returns to booleans, tightened bionics eligibility/selection, and streamlined stat/health application; also removed some default field initialisations from TTRPG_stats
  • Optimised management UI code: cache obj_controller.unit_focus into a local variable in draw/manage routines and call reset_manage_unit_constants(...) after Add Bionics and Reset actions
  • Improved unit-selection/bionics tooling: add_bionics_selection() now has stricter filtering (controllability, Dread armour checks), an early-return when no Bionics items exist, and was annotated with /// @mixin
  • Minor cleanup: removed a commented-out specialist promotion line and adjusted draw/update ordering in scr_draw_management_unit

Player Notes

  • Management UI health indicators now use HP thresholds: units show red at 0 HP and yellow at ≤15 HP (previously relied on promotion status for critical colouring)

Walkthrough

Tech‑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

Cohort / File(s) Summary
Promotion / Company View
scripts/scr_company_view/scr_company_view.gml, scripts/scr_special_view/scr_special_view.gml
Removed health‑based fallback assignments (ma_promote[v] = 10 when ma_health[v] <= 10) and a commented specialist promotion line; promotion determination now omits these low‑health overrides.
Health Colouring & Draw Logic
scripts/scr_draw_management_unit/scr_draw_management_unit.gml
Replaced promotion‑gated “critical” check with direct health thresholds: ma_health <= 0 → red (critical), <= 15 → yellow; promotion hint logic evaluated after colouring.
Bionics System Refactor
scripts/scr_marine_struct/scr_marine_struct.gml
Removed default initialisations for several TTRPG_stats fields; renamed add_bionics parameters to _area, _quality, _from_armoury; simplified eligibility selection, armoury consumption gating, stat/health application, and normalized returns to boolean.
UI Manage Selection & State Reset
scripts/scr_ui_manage/scr_ui_manage.gml
Cache obj_controller.unit_focus into local _unit_focus; update Reload tooltip reference; call reset_manage_unit_constants(_unit_focus) after Add Bionics / Reset action flows.
Bionics Quick‑Find Selection
scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml
Added /// @mixin`` annotation; early‑return when no bionics; tightened filtering (skip zero selections, non‑structs, non‑controllable units, armour containing "Dread" via `string_pos`); removed unused locals and index indirections.

Possibly related PRs

  • Adeptus‑Dominus/ChapterMaster#851 — touches TTRPG_stats and scr_marine_struct.gml; likely related to bionics / stats refactor.
  • Adeptus‑Dominus/ChapterMaster#624 — edits management UI and drawing code (scr_draw_management_unit.gml, scr_ui_manage.gml, quick‑find pane); overlaps with UI changes here.
  • Adeptus‑Dominus/ChapterMaster#954 — modifies selection button drawing and manage UI flows; directly related to draw_manage_selection_buttons() and post‑action state handling.
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The pull request title 'Merge development branch into main' does not follow the conventional commits format ((): ) as required. Restructure the title to follow conventional commits format. Example: 'chore(merge): integrate development branch changes into main' or summarise the primary purpose of the merged changes.
Description check ⚠️ Warning No pull request description was provided by the author, leaving all required template sections completely empty. Provide a description following the template structure: include Purpose and Description section explaining the changes, Testing done section, and Related things/context section.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟠 Major

Identical 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

📥 Commits

Reviewing files that changed from the base of the PR and between 04bfca1 and 05434ee.

📒 Files selected for processing (6)
  • scripts/scr_company_view/scr_company_view.gml
  • scripts/scr_draw_management_unit/scr_draw_management_unit.gml
  • scripts/scr_marine_struct/scr_marine_struct.gml
  • scripts/scr_special_view/scr_special_view.gml
  • scripts/scr_ui_manage/scr_ui_manage.gml
  • scripts/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.gml
  • scripts/scr_draw_management_unit/scr_draw_management_unit.gml
  • scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml
  • scripts/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.gml
  • scripts/scr_draw_management_unit/scr_draw_management_unit.gml
  • scripts/scr_unit_quick_find_pane/scr_unit_quick_find_pane.gml
  • scripts/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_bionics function 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 in scr_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_focus into _unit_focus reduces 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.

@EttyKitty EttyKitty merged commit 22fd24f into main Apr 5, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant