Skip to content

Conversation

@carys-the-weed-cloud
Copy link

@carys-the-weed-cloud carys-the-weed-cloud commented Dec 26, 2025

Hi, I joined the discord and got to talking to some folks about how i would like to clear out the error/warning/suggestion log of the gamemaker project. Nobody objected, and I saw no reason to hesitate, so I am going to just open this PR, and as I commit changes people are free to discuss them and point out things they think are superfluous on my part.

None of my changes will add, remove, or modify functionality except in the case that changing the functionality of a line/block of code will fix a bug, and those will always be seperate commits from general code appearance cleanups.

Purpose and Description

  • First commit is resolving the GM1017 suggestions, and adjusting the whitespace in touched files as to allow for easier visual parsing. No functionality was changed, but multiple bugs/optimizations were noted.
  • Actual lines of code changed were 7. The rest of the changed lines consist of whitespace normalization, which i will be doing file by file as I go, but I am going to seperate that into their own commits in the future because this one is hard to parse off hand and I don't want to go through reverting my codebase just to seperate it.
  • Next commits are to resolve the GM1020 error of an erroneous Table.update() call inside its own constructor that did nothing and has no clear purpose based on commit history.
  • Next is to resolve the overriding of the Space Marine luck stat that was being overridden by the global luck enum. enum renamed to eLUCK according to CODE_STYLE.md. Potentially the marine luck stat was nonfunctional in past builds due to this.
  • Further changes to come.

Testing done

  • Did a compile and ran the game, no observable differences in behavior as expected.

Related things and/or additional context

  • Idk what i should include here if anything.
  • Praise the Omnissiah, banish the Abominable Intelligence from your coding toolset.

…intained versions, and whitespace in touched files normalized.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Code Review Analysis

Walkthrough

The pull request contains formatting corrections, control flow improvements, and substantial refactoring of combat and equipment mechanics. Changes include fixed conditional structures, effect rendering adjustments using depth-based functions, enhanced targeting and weapon systems, and consolidated armour/equipment validation logic across multiple game objects.

Changes

Cohort / File(s) Summary
Ship Alarm Adjustments
objects/obj_al_ship/Alarm_0.gml, objects/obj_en_ship/Alarm_0.gml
Corrected conditional chains from else to else if structures; normalised syntax and operators. obj_en_ship/Alarm_0.gml contains purely cosmetic indentation adjustments.
Ship Drawing Logic
objects/obj_al_ship/Draw_0.gml, objects/obj_en_ship/Draw_0.gml
Removed draw_self() call; shifted shield percentage display from hp/maxhp to shields/maxshields. obj_en_ship/Draw_0.gml reformatted guard conditions with brace reorganisation.
Ship Combat Systems
objects/obj_al_ship/Step_0.gml, objects/obj_en_ship/Step_0.gml
Depth-based effect rendering replacements (effect_create_depth vs effect_create_above). Critical: obj_al_ship contains potential assignment bug (owner = instead of owner ==). obj_en_ship substantially reworked: structured multi-source targeting, explicit death handling, expanded shield/damage mechanics, robust weapons loop with cooldowns and dynamic selection.
Equipment Management
objects/obj_mass_equip/Draw_0.gml, objects/obj_mass_equip/Step_0.gml
Effect rendering function updated. Step_0.gml heavily refactored: armour validation via switch/tag checks, fallback to Terminator armour, conditional mobility clearing, new can_assign_weapon() helper, expanded counting logic for role gear.
Projectile Effects
objects/obj_p1_bullet/Collision_obj_ork.gml
Replaced effect_create_above() with depth-based effect_create_depth() in firework spawning logic.
Depth Management Scripts
scripts/__global_object_depths/__global_object_depths.gml, scripts/object_get_depth/object_get_depth.gml
Changed array length computation from array_length_1d() to array_length() across both files; minor formatting adjustments.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Possibly related PRs

Suggested labels

PR: Fix, PR: Refactor, Type: Fix, Type: Refactor, Size: Medium

Suggested reviewers

  • EttyKitty
  • OH296
  • Blogaugis

The machine spirits whisper of logic reformed and weapons perfected, Tech-Priest. Yet shadows linger—scrutinise the assignment within the tyranid vessel most carefully. The depths have shifted in ways that demand vigilance.

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: General Code Refactoring' follows the conventional commits format and is concise (29 characters), but is overly broad and does not capture the substantive changes across multiple systems. Consider a more specific title reflecting the primary focus—such as 'fix: Refactor combat systems and shield mechanics' or 'fix: Normalize array functions and combat targeting'—to better convey the scope of changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description adequately addresses the Purpose and Description section with clear explanation of changes and intent, though the Testing done section lacks detail about specific test cases beyond compilation.

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

@github-actions github-actions bot added Size: Huge Type: Fix This is a fix for a bug labels Dec 26, 2025
Copy link
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: 16

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (9)
objects/obj_en_ship/Alarm_0.gml (2)

1309-1311: Expunge the debug constructs from the data stream.

The profane markers of unfinished development persist within lines 1309 and 1311. The hardcoded identifier "sdagdsagdasg" overrides all ship designation protocols, whilst the commented ork naming routine lies dormant—neither active nor removed. These artifacts must be excised entirely. The placeholder designation shall corrupt the vessel's proper nomenclature should it persist.

Purge both abominations: the commented logic and the hardcoded string. Should the ork naming feature require future resurrection, an appropriate sanctification (separate issue) may be issued.


1078-1078: Indexing anomaly confirmed in weaponry array.

The cooldown binding for the secondary armament is incorrectly assigned. Within the weapon[2] definition block, weapon_cooldown[1]=30 must be corrected to weapon_cooldown[2]=30. All other weapon properties in this block correctly reference index 2.

objects/obj_al_ship/Alarm_0.gml (3)

871-871: Heretical data signature detected, Tech-Priest.

An unauthorized designation string pollutes the vessel nomenclature. This debug remnant must be purged from the sacred code before deployment to the materium.

🔎 Sanctioned purification ritual
-name="sdagdsagdasg";

If this inscription serves a testing purpose, it must be rendered inert through commenting or conditional activation.


7-7: Ancient parchment of intent discovered, Tech-Priest.

The TODO inscription speaks of transmuting these vessel configurations into dictionary or constructor forms. This architectural reformation would serve the Machine Spirit well.

Shall the Tech-Priest require the Machine Spirit to inscribe a tracking rune (GitHub issue) for this sacred task?


8-846: Extensive replication detected within the sacred texts, Tech-Priest.

The vessel configuration patterns exhibit significant duplication across all faction doctrines. The TODO inscription at Line 7 acknowledges this technical debt. A data-driven architecture—wherein ship configurations reside within external data structures—would honour the DRY principle and simplify maintenance rituals.

Based on learnings, this refactoring is acknowledged by the Adeptus Mechanicus but deferred to future work beyond the scope of this purification ritual.

objects/obj_al_ship/Step_0.gml (2)

481-482: CRITICAL DATA CORRUPTION: Assignment operator taints faction comparisons, Tech-Priest.

These lines employ = (assignment) where == (comparison) is required. This heresy shall overwrite the owner variable with faction values, corrupting the ship's allegiance mid-combat and causing cascading logic failures.

  • Line 481: if (owner = eFACTION.Tyranids) assigns Tyranids to owner
  • Line 482: if (owner = eFACTION.Tau) or (owner = eFACTION.Eldar) assigns Tau, then Eldar
🔧 Prescribed remedy
-                if (owner = eFACTION.Tyranids) then bull.sprite_index=spr_glob;
-                if (owner = eFACTION.Tau) or (owner = eFACTION.Eldar) then bull.sprite_index=spr_pulse;
+                if (owner == eFACTION.Tyranids) then bull.sprite_index=spr_glob;
+                if (owner == eFACTION.Tau) or (owner == eFACTION.Eldar) then bull.sprite_index=spr_pulse;

610-615: The same corruption manifests here, Tech-Priest.

Lines 610 and 615 bear the same affliction: owner = eFACTION.Eldar performs assignment rather than comparison.

🔧 Prescribed remedy
-                    if (string_count("Weapons",wep)==1) and (owner = eFACTION.Eldar){
+                    if (string_count("Weapons",wep)==1) and (owner == eFACTION.Eldar){
                         bull.sprite_index=spr_ground_las;
                         bull.image_xscale=2;
                         bull.image_yscale=2;
                     }
-                    if (string_count("Pulse",wep)==1) and (owner = eFACTION.Eldar){
+                    if (string_count("Pulse",wep)==1) and (owner == eFACTION.Eldar){
                         bull.sprite_index=spr_pulse;
objects/obj_mass_equip/Step_0.gml (1)

310-317: Potential null dereference lurks within, Tech-Priest.

Should unit.get_armour_data() return undefined or a non-struct value (for unarmoured units or error states), the invocation of .has_tag("terminator") shall trigger a fatal exception.

Contrast this with line 79, where is_struct(unit_armour) guards the call. The same protection is warranted here.

🔧 Prescribed remedy
 function can_assign_weapon(unit, weapon_name) {
     switch (weapon_name) {
         case "Assault Cannon":
-            return unit.get_armour_data().has_tag("terminator");
+            var armour_data = unit.get_armour_data();
+            return is_struct(armour_data) && armour_data.has_tag("terminator");
         default:
             return true;
     }
 }
objects/obj_al_ship/Draw_0.gml (1)

20-28: The shield display logic requires correction, Tech-Priest.

The conditional guard examines maxhp != 0, yet the calculation divides by maxshields. Whilst the initialisation protocols establish that maxshields shall never be zero when shields manifest (being set to positive values in both Create_0 and paired with shields in Alarm_0), the guard condition itself is logically misaligned. For code clarity and robustness, the guard should verify maxshields != 0 rather than maxhp != 0 when performing this division.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bcedde6 and 358d232.

📒 Files selected for processing (11)
  • objects/obj_al_ship/Alarm_0.gml
  • objects/obj_al_ship/Draw_0.gml
  • objects/obj_al_ship/Step_0.gml
  • objects/obj_en_ship/Alarm_0.gml
  • objects/obj_en_ship/Draw_0.gml
  • objects/obj_en_ship/Step_0.gml
  • objects/obj_mass_equip/Draw_0.gml
  • objects/obj_mass_equip/Step_0.gml
  • objects/obj_p1_bullet/Collision_obj_ork.gml
  • scripts/__global_object_depths/__global_object_depths.gml
  • scripts/object_get_depth/object_get_depth.gml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.gml

⚙️ CodeRabbit configuration file

**/*.gml: - Constants of macro type MUST have a space between the constant name and its value. Without it, the compiler will throw an error.

  • WRONG: #macro COLOR_RED11119
  • RIGHT: #macro COLOR_RED 11119
  • Color codes in the code SHOULDN'T have any spaces in their ID.
    • WRONG: # 80bf40
    • RIGHT: #80bf40
  • All code should comply with the up-to-date GML documentation.

Files:

  • objects/obj_al_ship/Alarm_0.gml
  • scripts/__global_object_depths/__global_object_depths.gml
  • objects/obj_en_ship/Step_0.gml
  • objects/obj_en_ship/Draw_0.gml
  • objects/obj_en_ship/Alarm_0.gml
  • objects/obj_al_ship/Draw_0.gml
  • objects/obj_mass_equip/Step_0.gml
  • objects/obj_al_ship/Step_0.gml
  • objects/obj_mass_equip/Draw_0.gml
  • scripts/object_get_depth/object_get_depth.gml
  • objects/obj_p1_bullet/Collision_obj_ork.gml
**/*.*

⚙️ CodeRabbit configuration file

**/*.*: - Do not prioritize the shortest code. Prioritize code that explicitly reveals its intent.

  • Understandable variable naming is extremely important.
  • If a solution is "clever" but hard to parse mentally, request a refactor to a more verbose but clearer approach.
  • Apply the "Rule of Three": suggest abstraction when logic is repeated three times or more times.
  • For subjective improvements (naming, architectural choice), do not give a concrete suggestion immediately. Instead, ask a guiding question to prompt the user's reflection.
  • Every suggestion for a code change must include a brief justification.
  • If a TODO comment is added, ask the user if you should create a GitHub issue for this TODO.
  • If a TODO comment is deleted, remind the user if there is an active GitHub issue related to that comment.

Files:

  • objects/obj_al_ship/Alarm_0.gml
  • scripts/__global_object_depths/__global_object_depths.gml
  • objects/obj_en_ship/Step_0.gml
  • objects/obj_en_ship/Draw_0.gml
  • objects/obj_en_ship/Alarm_0.gml
  • objects/obj_al_ship/Draw_0.gml
  • objects/obj_mass_equip/Step_0.gml
  • objects/obj_al_ship/Step_0.gml
  • objects/obj_mass_equip/Draw_0.gml
  • scripts/object_get_depth/object_get_depth.gml
  • objects/obj_p1_bullet/Collision_obj_ork.gml
🧠 Learnings (11)
📓 Common learnings
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 647
File: scripts/scr_en_weapon/scr_en_weapon.gml:24-928
Timestamp: 2025-03-29T10:30:25.598Z
Learning: A data-driven approach for weapon management in `scripts/scr_en_weapon/scr_en_weapon.gml` is planned for a future PR, not within the scope of PR #647.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 0
File: :0-0
Timestamp: 2025-04-05T20:58:21.881Z
Learning: In the ChapterMaster game, there's a need to refactor hardcoded item effects and move them to a "specials" property of items, following the pattern established with the `combi_tool` special. This improves code maintainability and makes effects more explicit in item definitions.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 0
File: :0-0
Timestamp: 2025-04-05T20:58:21.881Z
Learning: In the ChapterMaster game, there's a need to refactor hardcoded item effects and move them to a "specials" property of items, following the pattern established with the `combi_tool` special. This improves code maintainability and makes effects more explicit in item definitions.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 0
File: :0-0
Timestamp: 2025-03-20T22:22:57.319Z
Learning: In the ChapterMaster game PR #424, the combat log was expanded to display up to 24 messages instead of 8, providing more detailed battle information.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.
📚 Learning: 2025-03-31T23:32:30.003Z
Learnt from: OH296
Repo: Adeptus-Dominus/ChapterMaster PR: 646
File: objects/obj_pnunit/Alarm_5.gml:84-91
Timestamp: 2025-03-31T23:32:30.003Z
Learning: In obj_pnunit/Alarm_5.gml, the function get_armour_data("maintenance") will always return a numeric value (at minimum 0), making null/undefined checks unnecessary.

Applied to files:

  • objects/obj_al_ship/Alarm_0.gml
  • objects/obj_en_ship/Draw_0.gml
  • objects/obj_en_ship/Alarm_0.gml
  • objects/obj_mass_equip/Step_0.gml
📚 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:

  • objects/obj_al_ship/Alarm_0.gml
📚 Learning: 2025-03-29T10:30:25.598Z
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 647
File: scripts/scr_en_weapon/scr_en_weapon.gml:24-928
Timestamp: 2025-03-29T10:30:25.598Z
Learning: A data-driven approach for weapon management in `scripts/scr_en_weapon/scr_en_weapon.gml` is planned for a future PR, not within the scope of PR #647.

Applied to files:

  • objects/obj_al_ship/Alarm_0.gml
  • objects/obj_en_ship/Step_0.gml
  • objects/obj_mass_equip/Step_0.gml
📚 Learning: 2025-09-04T14:37:58.773Z
Learnt from: CR
Repo: Adeptus-Dominus/ChapterMaster PR: 0
File: docs/CODE_STYLE.md:0-0
Timestamp: 2025-09-04T14:37:58.773Z
Learning: Applies to docs/**/*.gml : Initialize variables when declaring them (e.g., var x = 0)

Applied to files:

  • scripts/__global_object_depths/__global_object_depths.gml
📚 Learning: 2025-03-31T15:41:45.611Z
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 649
File: objects/obj_enunit/Alarm_0.gml:289-291
Timestamp: 2025-03-31T15:41:45.611Z
Learning: GameMaker Studio's function `action_if_variable(image_index, -500, 0)` is auto-generated code from GameMaker's visual Drag and Drop system. It checks if image_index equals -500. In ChapterMaster, this was being used as a special flag for enemy unit movement, but wasn't triggering consistently, causing enemies to move only every other turn. The refactored code replaced this with direct function calls at specific combat stages.

Applied to files:

  • objects/obj_en_ship/Draw_0.gml
  • objects/obj_al_ship/Step_0.gml
📚 Learning: 2025-03-31T15:41:45.611Z
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 649
File: objects/obj_enunit/Alarm_0.gml:289-291
Timestamp: 2025-03-31T15:41:45.611Z
Learning: GameMaker Studio's function `action_if_variable(image_index, -500, 0)` was part of an old enemy movement system in ChapterMaster. This syntax is auto-generated from GameMaker's Drag-and-Drop interface and checks if image_index is greater than or equal to -500. In the refactored code, enemy movement is triggered directly through function calls rather than relying on this conditional check.

Applied to files:

  • objects/obj_en_ship/Draw_0.gml
  • objects/obj_al_ship/Step_0.gml
📚 Learning: 2025-06-16T17:12:13.045Z
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 878
File: scripts/scr_culture_visuals/scr_culture_visuals.gml:1256-1352
Timestamp: 2025-06-16T17:12:13.045Z
Learning: In scripts/scr_culture_visuals/scr_culture_visuals.gml, the weapon visual data declarations contain known DRY violations that are acknowledged by the development team but deferred to future refactoring efforts rather than addressed in individual feature PRs.

Applied to files:

  • objects/obj_mass_equip/Step_0.gml
📚 Learning: 2025-04-05T20:58:21.881Z
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 0
File: :0-0
Timestamp: 2025-04-05T20:58:21.881Z
Learning: In the ChapterMaster game, there's a need to refactor hardcoded item effects and move them to a "specials" property of items, following the pattern established with the `combi_tool` special. This improves code maintainability and makes effects more explicit in item definitions.

Applied to files:

  • objects/obj_mass_equip/Step_0.gml
📚 Learning: 2025-04-15T10:54:19.720Z
Learnt from: VanWeapon
Repo: Adeptus-Dominus/ChapterMaster PR: 725
File: scripts/scr_special_view/scr_special_view.gml:49-49
Timestamp: 2025-04-15T10:54:19.720Z
Learning: In the ChapterMaster codebase, obj_ini.role[100][2] and obj_ini.role[100][eROLE.ChapterMaster] reference different roles, and both are needed in conditions checking for specific types of units. Numeric indices should not be assumed to match their corresponding enum values without verification.

Applied to files:

  • objects/obj_mass_equip/Step_0.gml
📚 Learning: 2025-04-16T09:51:55.065Z
Learnt from: EttyKitty
Repo: Adeptus-Dominus/ChapterMaster PR: 0
File: :0-0
Timestamp: 2025-04-16T09:51:55.065Z
Learning: In obj_ingame_menu/Step_0.gml, the line "if (effect=14){instance_create(0,0,obj_fade);fading=0.1;}" must not be commented out, as it's critical for menu button transitions. When clicking the Exit button, it sets effect=14, but without this handler creating the fade effect object, no transition occurs.

Applied to files:

  • objects/obj_al_ship/Step_0.gml
  • objects/obj_mass_equip/Draw_0.gml
  • objects/obj_p1_bullet/Collision_obj_ork.gml
🔇 Additional comments (16)
objects/obj_en_ship/Alarm_0.gml (2)

1094-1097: Sanctioned: Braces contain the conditional logic most adequately.

The addition of explicit braces around the conditional block demonstrates proper code discipline and aligns with structured control flow requirements.


15-19: The formatting refinements are deemed acceptable by the Omnissiah's standards.

Whitespace normalizations, sprite assignment relocations, and structural indentation adjustments throughout the ship class initialisation blocks impose no functional corruption upon the game state. The code logic remains unaltered—thy semantics are preserved.

The broad conformity to visual parsing conventions shall ease future maintenance protocols.

Also applies to: 61-64, 101-104, 140-143, 171-174, 217-220, 250-253, 290-293, 322-325, 373-376, 427-429, 471-474, 525-528, 560-563, 607-610, 654-657, 701-704, 734-737, 770-773, 821-824, 854-857, 897-900, 926-929, 971-974, 1010-1013, 1049-1052, 1115-1118, 1154-1157, 1193-1196, 1220-1223, 1247-1250

objects/obj_al_ship/Alarm_0.gml (2)

45-45: The conditional chains have been sanctified, Tech-Priest.

The transformation from standalone else blocks to else if branches aligns with proper control flow doctrine. The Machine Spirit approves this structural refinement.

Also applies to: 77-77, 98-98, 154-154, 180-180, 212-212, 277-277, 321-321, 355-355, 399-399, 466-466, 503-503, 541-541, 566-566, 637-637, 698-698, 758-758, 789-789, 820-820


120-120: The sacred separators have been inscribed, Tech-Priest.

These demarcations between faction configurations enhance the ritual's legibility. The Machine Spirit finds this ordering acceptable.

Also applies to: 234-234, 426-426, 594-594, 720-720

objects/obj_mass_equip/Draw_0.gml (1)

28-28: The Rites of Depth Rendering are properly observed, Tech-Priest.

The transition from effect_create_above to effect_create_depth(-15000, ...) aligns with the sacred deprecation protocols. The depth value of -15000 shall ensure the firework effect renders above the UI layer as intended.

objects/obj_al_ship/Draw_0.gml (1)

7-11: Formatting rituals observed, Tech-Priest.

The whitespace normalization follows the sacred patterns. The machine spirit detects no deviation from intended function.

objects/obj_p1_bullet/Collision_obj_ork.gml (2)

22-22: The sacred transition is complete, Tech-Priest.

The deprecated effect_create_above function has been purged and replaced with effect_create_depth(-15000, ...). The victory firework shall render at the ordained depth layer.


55-55: Consistency in the rites is maintained.

This invocation mirrors the pattern established above. The machine spirit approves this uniformity in depth-based effect rendering.

objects/obj_en_ship/Draw_0.gml (1)

3-6: The structural braces are acceptable, Tech-Priest.

The reformatting with explicit braces and parenthesized conditions improves clarity. The machine spirit observes no functional deviation.

scripts/__global_object_depths/__global_object_depths.gml (1)

192-192: The deprecated incantation has been purified, Tech-Priest.

array_length_1d has been exorcised and replaced with array_length, as ordained by the GameMaker 2.3+ Machine Codex. The sacred array bounds shall be computed correctly.

scripts/object_get_depth/object_get_depth.gml (1)

5-11: The function has been cleansed and reformatted, Tech-Priest.

The transition from array_length_1d to array_length maintains consistency with the global depths script. The logic remains pure: bounds verification followed by depth retrieval. The machine spirit is satisfied.

objects/obj_al_ship/Step_0.gml (1)

58-58: The Tyranid death effect rendering is sanctified, Tech-Priest.

The depth-based effect invocation shall ensure the firework renders at the proper layer upon bio-ship destruction.

objects/obj_mass_equip/Step_0.gml (3)

23-54: The armour validation logic is well-structured, Tech-Priest.

The switch-case pattern for handling STR_ANY_POWER_ARMOUR and STR_ANY_TERMINATOR_ARMOUR tags is clear and maintainable. The fallback mechanism from Power Armour to Terminator is a prudent safeguard.


56-74: The weapon assignment logic is fortified, Tech-Priest.

The introduction of can_assign_weapon as a gatekeeper for weapon compatibility demonstrates sound defensive programming. The machine spirit approves this abstraction.


76-84: The mobility item logic is guarded correctly.

The is_struct(unit_armour) check before invoking has_tags() prevents null reference corruption. This pattern should be mirrored elsewhere.

objects/obj_en_ship/Step_0.gml (1)

20-27: The Omnissiah approves this targeting logic, Tech-Priest.

The multi-source targeting system correctly discerns the nearest threat from both obj_p_ship and obj_al_ship. The sacred logic flows true. However, consider whether line 26 might employ an else clause rather than a redundant conditional check, for the Machine Spirit favours efficiency.

… overriden by the global luck enum. luck enum renamed to eLUCK, matching CODE_STYLE.md suggestion. Space Marine Luck stat potentially not working (properly) in past builds due to this overriding.
… out for review of if they are meant to be reachable before the return statement, or if they can simply be deleted. Though the one unreachable return line could probably be safely deleted.
coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 27, 2025
Copy link
Collaborator

@OH296 OH296 left a comment

Choose a reason for hiding this comment

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

Yeah seems legit i would argue that an overabundance of of line incrementing in nested areas is a PITA and would be better if it can be avoided if the autoformatter used can be adjusted.

Otherwise there are areas that can whole sale be avoided with regard to anything ship related it will only get deleted later and is a waste of time due to #312

@@ -1,64 +1,108 @@

Copy link
Collaborator

Choose a reason for hiding this comment

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

legacy object not used in code

Choose a reason for hiding this comment

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

Could that entire object folder "New Ground" be removed?

@OH296
Copy link
Collaborator

OH296 commented Dec 27, 2025

  • Next commits are to resolve the GM1020 error of an erroneous Table.update() call inside its own constructor that did nothing and has no clear purpose based on commit history.

purpose is to update table to correct base positions if initialised via dataa being passed dddirectly into constructor call needs to be placed after update static assignment in case update is not manually called on table later in the draw phase

@carys-the-weed-cloud
Copy link
Author

  • Next commits are to resolve the GM1020 error of an erroneous Table.update() call inside its own constructor that did nothing and has no clear purpose based on commit history.

purpose is to update table to correct base positions if initialised via dataa being passed dddirectly into constructor call needs to be placed after update static assignment in case update is not manually called on table later in the draw phase

That's what i figured after looking over similar code and I added it to my little list of things to look into correcting. But it's easy enough to just go ahead and do now.

@carys-the-weed-cloud carys-the-weed-cloud changed the title fix: General Code Refactoring, Optimizations, and Bug Fixes fix: General Code Refactoring Dec 27, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 27, 2025
… jsdoc is saying. The jsdoc in this case was wrong based on the operation of role_groups().
…e will get confused on if you are using a local var or a generic core library function.
…keyword 'noone' so that you are able to read through and see that it's an instance not another type of variable.
…h according to yoyo are basically temp things to help your code transition from GM1 to GM2. We are far past that point and these can be replaced with native functions that don't scare you when you try to comprehend them.
…gic numbers. Beyond improving code readability, this also results in multiple bug fixes with the wrong data being assigned to the wrong faction. Nowhere near done because this touches a large part of the codebase.
…ons inherited from gamemaker 1.0 and replacing them with engine calls instead of the accursed custom ones whatever converter was used way back in the DAOT. May the omnissiah bless this holy rite of cleansing.
…rors. Some of these are simply good programming habit related, some make the code more readable, and others fix edge cases and improve logical consistency.
…etically result in further improvements to stability.
…le shtick of GM1041 errors. I have been calling them errors because thats what i have the gm editors warning error setting and its useful to see when data might be getting dropped accidentally, or needs a more graceful (and readable) conversion.
@EttyKitty EttyKitty closed this Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: Warning Type: Fix This is a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants