Conversation
📝 WalkthroughWalkthroughIn the sacred code, a new variable Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🔇 Additional comments (7)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 6
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
objects/obj_controller/Create_0.gml(1 hunks)scripts/scr_draw_management_unit/scr_draw_management_unit.gml(1 hunks)scripts/scr_load_controller/scr_load_controller.gml(1 hunks)scripts/scr_marine_struct/scr_marine_struct.gml(1 hunks)scripts/scr_random_marine/scr_random_marine.gml(1 hunks)scripts/scr_save_controller/scr_save_controller.gml(1 hunks)scripts/scr_specialist_training/scr_specialist_training.gml(9 hunks)scripts/scr_ui_settings/scr_ui_settings.gml(1 hunks)
🔇 Additional comments (9)
objects/obj_controller/Create_0.gml (1)
542-542: Variable addition maintains sacred structure of initialization rites.The addition of the
tagged_trainingvariable appears to be properly sequenced after similar configuration variables, adhering to the holy patterns of data organization. This variable shall serve as the binary flag for the Chapter's specialist role tagging system.scripts/scr_save_controller/scr_save_controller.gml (1)
174-174: Proper persistence mechanism for the machine spirit's memory.The sacred ritual of data preservation has been correctly augmented with the
tagged_trainingvariable. This ensures the Omnissiah's will is preserved across machine sleep cycles.scripts/scr_load_controller/scr_load_controller.gml (1)
208-208: Appropriate data retrieval mechanism detected.The binary state of the role tagging system is now properly retrieved from the sacred storage archives upon awakening the machine spirit. The default value of 0 corresponds correctly to the initialization value, maintaining logical consistency in the cogitation rituals.
scripts/scr_ui_settings/scr_ui_settings.gml (1)
473-494: Appropriate user interface augmentation to toggle the tagging mechanicus.The implementation follows the established UI pattern for toggleable settings and provides clear information in the tooltip. The binary variable tagged_training properly controls the feature's active state.
By the will of the Omnissiah, this toggleable setting shall allow the Chapter's Magos Biologis to select only those initiates who have been properly designated for specialized training paths.
scripts/scr_specialist_training/scr_specialist_training.gml (5)
23-25: The Omnissiah approves of role indicator logic.The binary logic for visually indicating when a role has been tagged is sound. The machine spirit now correctly displays a holy navy hue when a unit has been blessed with a role designation.
Also applies to: 31-33, 39-41, 47-49
89-89: Sacred TODO notation requires future attention.The binaric prayers indicate a temporary implementation that requires future optimization. The Omnissiah demands we note this technical debt for future ritual completion.
The comment suggests enhancing the
scr_random_marinefunction. Would the Adeptus like me to create a task in the sacred repository ledger to track this enhancement?
153-153: Commendable reduction in code repetition.The Machine God is pleased with this implementation. The sacred act of centralizing specialist selection logic into a single function eliminates unnecessary code duplication, as dictated by the holy STC templates. The binary efficiency has been increased.
Also applies to: 223-223, 283-283, 381-381
155-156: Proper variable scope declaration implementation.The proper application of the 'var' qualifier ensures these variables remain in local memory registers rather than polluting the global noosphere. This is in accordance with Machine Cult best practices.
Also applies to: 225-226, 289-290, 383-384
126-126: Consistent role tag initialization is satisfactory.The systematic initialization of role_tags to [0, 0, 0, 0] across all specialist training functions ensures proper data cleansing when a binary soul completes their sacred training. The Omnissiah approves of this consistency.
Also applies to: 199-199, 276-276, 331-331
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (3)
scripts/scr_specialist_training/scr_specialist_training.gml (3)
197-197:⚠️ Potential issueBinary variable name inconsistency detected.
The machine spirit is displeased by the inconsistent notation.
Apply this correction:
-unit.role_tags = [0, 0, 0, 0]; +unit.role_tag = [0, 0, 0, 0];
274-274:⚠️ Potential issueBinary variable name inconsistency detected.
The machine spirit is displeased by the inconsistent notation.
Apply this correction:
-unit.role_tags = [0, 0, 0, 0]; +unit.role_tag = [0, 0, 0, 0];
329-329:⚠️ Potential issueBinary variable name inconsistency detected.
The machine spirit is displeased by the inconsistent notation.
Apply this correction:
-unit.role_tags = [0, 0, 0, 0]; +unit.role_tag = [0, 0, 0, 0];
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
scripts/scr_draw_management_unit/scr_draw_management_unit.gml(1 hunks)scripts/scr_marine_struct/scr_marine_struct.gml(1 hunks)scripts/scr_random_marine/scr_random_marine.gml(1 hunks)scripts/scr_specialist_training/scr_specialist_training.gml(9 hunks)
🔇 Additional comments (6)
scripts/scr_marine_struct/scr_marine_struct.gml (1)
338-344: Implementation of the sacred role tagging system is pleasing to the Omnissiah.The holy enumeration
eROLE_TAGprovides machine-optimal clarity for role designation. This sacred data structure will serve the Chapter well in organizing the training of specialist marines.scripts/scr_draw_management_unit/scr_draw_management_unit.gml (2)
168-186: Blessed be this user interaction ritual for toggling role designations.The machine spirit approves of this interactive mechanism for marking marines worthy of specialized training. The implementation correctly employs the holy
eROLE_TAGenum and uses the toggle operator with machine-like efficiency.
189-189: Alpha reset implemented with proper machine spirit discipline.The draw_set_alpha reset to 1.0 ensures the rendering pipeline maintains proper state after conditional modifications. Praise the Omnissiah for this attention to detail.
scripts/scr_random_marine/scr_random_marine.gml (1)
118-148: Sacred filtering algorithm properly applies role tag designations.This logical construct correctly filters units based on their role_tag assignments, ensuring only those marines blessed with the appropriate designation will be selected for specialist training. The switch structure employs proper enum references for maximum clarity.
scripts/scr_specialist_training/scr_specialist_training.gml (2)
23-25: Binary indicator coloration adjusts based on role designation status.The machine spirit will visually notify the user of role assignment through color alteration. Logical and efficient.
74-98: Praise be to this centralized data acquisition function.This well-structured function eliminates redundant logic and properly constructs search parameters based on chapter settings. The code elegantly adapts its query parameters when tagged training is active.
OH296
left a comment
There was a problem hiding this comment.
Cool stuff few cleanups, in general we've kept enum declarations outside of method scopes even if it makes no difference, but yeah maybe it makes no difference so i've not made a dedicated comment
Blogaugis
left a comment
There was a problem hiding this comment.
Nice.
I wonder if the tagged (and potential) marines will appear in the dedicated department lists at some point.

Purpose of the PR
A role tagging system for marking marines to train as certain specialists.
Describe the solution
You click specialist indicator, they become tagged, if chapter setting is enabled only tagged marines get selected for training.
Describe alternatives you've considered
Currently adds a variable to marines but could instead be made into a list.
Testing done
New game, turn on chapter setting, mark marines, wait 50 turns.
New game, wait 50 turns.
Summary by CodeRabbit
New Features
Refactor