-
Notifications
You must be signed in to change notification settings - Fork 44
fix: A bundle of fixes in no particular order #986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughSummary by CodeRabbit
WalkthroughData and UI refactor for unit management (new globals, ReactiveString/LabeledIcon usage, psyker tooltip function), index shift for equipment tabs (0-based), draw/logic tweaks for mass equip and ComplexSet, culture visual flags, controller/init updates, and multiple Dreadnought sprite sequences reduced to two frames. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Machine-spirits appeased. Changes catalogued and ready for ritual inspection. 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 13
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (8)
objects/obj_controller/Alarm_1.gml (2)
427-435: Undefined index ‘i’ in array_delete; deletion will misfire.You select a random element into _current_system, but then delete using i, which is not defined in this scope. Purge the impurity by resolving the actual index before deletion.
Apply:
- _current_system=array_random_element(_non_xenos_chaos); + _current_system = array_random_element(_non_xenos_chaos); + var i = array_find_value(_non_xenos_chaos, _current_system); _current_system.planet[1]=1; _current_system.p_owner[1]=90; _current_system.owner=90; - array_delete(_non_xenos_chaos, i, 1); + if (i > -1) array_delete(_non_xenos_chaos, i, 1);
14-16: Assignment used in place of comparison in if-conditions.These lines assign instead of compare, bending reality: field and is_test_map are forcibly set and condition always “truthy”. Use == for comparison.
Apply:
-field="both"//("orks","tyranids","both"); -if (global.chapter_name="Lamenters") then field="both"; -if (is_test_map=true) then field="orks"; +field = "both";//("orks","tyranids","both"); +if (global.chapter_name == "Lamenters") then field = "both"; +if (is_test_map == true) then field = "orks";scripts/scr_ComplexSet/scr_ComplexSet.gml (1)
757-766: Optional: Honour new_weapon_draw flags in the Dreadnought branch for consistency.Currently the dread path ignores new_weapon_draw/ui_twoh semantics present elsewhere. Unify behaviour to avoid divergent rendering logic.
Example refactor sketch:
- if ((weapon_right.sprite != 0) && sprite_exists(weapon_right.sprite)) { + if ((weapon_right.sprite != 0) && sprite_exists(weapon_right.sprite)) { draw_sprite(weapon_right.sprite, 0, x_surface_offset + weapon_right.ui_xmod, y_surface_offset + weapon_right.ui_ymod); } - if ((weapon_left.sprite != 0) && sprite_exists(weapon_left.sprite)) { - draw_sprite(weapon_left.sprite, 1, x_surface_offset + weapon_left.ui_xmod, y_surface_offset + weapon_left.ui_ymod); - } + if ((weapon_left.sprite != 0) && sprite_exists(weapon_left.sprite)) { + var _sub = 1; + if (weapon_left.new_weapon_draw && weapon_left.ui_twoh) { + // future: adapt if dread two-hand variants differ + } + draw_sprite(weapon_left.sprite, _sub, x_surface_offset + weapon_left.ui_xmod, y_surface_offset + weapon_left.ui_ymod); + }scripts/scr_culture_visuals/scr_culture_visuals.gml (1)
1945-1952: Close Combat Weapon (base): move new_weapon_draw into base.weapon_data.Currently placed at base level; readers likely expect it inside weapon_data alongside display_type.
"Close Combat Weapon" : { base: { body_types: [3], weapon_data: { - display_type: "dreadnought", + display_type: "dreadnought", + new_weapon_draw: true }, armours : ["Dreadnought"], - new_weapon_draw: true },objects/obj_mass_equip/Step_0.gml (1)
267-279: 0-based slot indexing verified
By the Omnissiah’s data-streams, I have audited the mass-equip schema and found no lingering 1-based tab logic:
- objects/obj_mass_equip/Step_0.gml uses
if (tab > -1)andtab == 0 || tab == 1for hand slots.- objects/obj_mass_equip/Draw_0.gml likewise checks
tab == 0 || tab == 1.- scripts/scr_ui_settings.gml applies the same 0-based slot mapping.
- scr_get_item_names implementation handles
_slotcases 0 and 1 as intended, with no remnants of 1-based comparisons.Optional refactoring:
- Update the docblock in
scripts/scr_get_item_names/scr_get_item_names.gmlto reflect 0-based_slotindexing (e.g. “0–4” instead of “1–5”) to prevent future confusion.scripts/scr_ui_settings/scr_ui_settings.gml (1)
392-406: Trailing comma in function call will cause a compiler tantrum. Remove it.The last argument in scr_get_item_names(...) ends with a comma; GML does not permit trailing commas in call argument lists.
Patch:
- scr_get_item_names( + scr_get_item_names( obj_mass_equip.item_name, obj_controller.settings, // eROLE gg, // slot is_hand_slot ? (obj_mass_equip.tab == 0 ? eENGAGEMENT.Ranged : eENGAGEMENT.Melee) : eENGAGEMENT.None, true, // include company standard - false, // show all regardless of inventory - - ); + false // show all regardless of inventory + );objects/obj_mass_equip/Draw_0.gml (2)
86-107: Two issues in hand-slot list assembly: trailing comma and ineffective de-duplication.
- The first scr_get_item_names call ends with a trailing comma — invalid in GML.
- array_resize(item_name, array_unique_ext(item_name)) is wrong: array_resize expects a size, not an array. Use the unique array directly.
Fix both:
- scr_get_item_names( + scr_get_item_names( item_name, obj_controller.settings, // eROLE 0, // slot eENGAGEMENT.Any, true, // include the company standard - false, // do not limit to available items - ); + false // do not limit to available items + ); @@ - array_resize(item_name, array_unique_ext(item_name)); + item_name = array_unique_ext(item_name);
65-85: Minor naming rite: “infanty_roles” typo.For readability, rename to infantry_roles.
Apply:
- var infanty_roles = [ + var infantry_roles = [ @@ - if ((tab == 0 || tab ==1) && array_get_index(infanty_roles, obj_controller.settings) >= 0) { + if ((tab == 0 || tab == 1) && array_get_index(infantry_roles, obj_controller.settings) >= 0) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (42)
sprites/spr_dread_assault_cannon/ca9af1f8-d9c1-4f87-b306-8aaff6acf541.pngis excluded by!**/*.pngsprites/spr_dread_assault_cannon/dd7d5c23-a6af-4857-8741-b07293907895.pngis excluded by!**/*.pngsprites/spr_dread_assault_cannon/layers/ca9af1f8-d9c1-4f87-b306-8aaff6acf541/5f4f0795-cb93-46e3-9a51-5771616e403f.pngis excluded by!**/*.pngsprites/spr_dread_assault_cannon/layers/ca9af1f8-d9c1-4f87-b306-8aaff6acf541/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_assault_cannon/layers/dd7d5c23-a6af-4857-8741-b07293907895/5f4f0795-cb93-46e3-9a51-5771616e403f.pngis excluded by!**/*.pngsprites/spr_dread_assault_cannon/layers/dd7d5c23-a6af-4857-8741-b07293907895/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_autocannon/430ba383-8c34-4c5c-a443-2005ddb354ff.pngis excluded by!**/*.pngsprites/spr_dread_autocannon/6692383a-0d7e-4194-998f-fc3bf2067f77.pngis excluded by!**/*.pngsprites/spr_dread_autocannon/layers/430ba383-8c34-4c5c-a443-2005ddb354ff/9093f3a1-b3fd-4c9b-af10-612dea29d004.pngis excluded by!**/*.pngsprites/spr_dread_autocannon/layers/6692383a-0d7e-4194-998f-fc3bf2067f77/9093f3a1-b3fd-4c9b-af10-612dea29d004.pngis excluded by!**/*.pngsprites/spr_dread_claw/c66f97c4-ce8b-427b-8ab0-baac7d95dda9.pngis excluded by!**/*.pngsprites/spr_dread_claw/edc36065-c8cc-48b7-b999-6a9a9665befa.pngis excluded by!**/*.pngsprites/spr_dread_claw/layers/c66f97c4-ce8b-427b-8ab0-baac7d95dda9/0a188212-4756-437d-9b06-5ec78990fa63.pngis excluded by!**/*.pngsprites/spr_dread_claw/layers/edc36065-c8cc-48b7-b999-6a9a9665befa/0a188212-4756-437d-9b06-5ec78990fa63.pngis excluded by!**/*.pngsprites/spr_dread_heavy_bolter/9fa15ed7-cd79-4acd-83d9-95ecf0be332f.pngis excluded by!**/*.pngsprites/spr_dread_heavy_bolter/b9dd1c82-3f7f-4a18-864f-e78a4b0ed9d6.pngis excluded by!**/*.pngsprites/spr_dread_heavy_bolter/layers/9fa15ed7-cd79-4acd-83d9-95ecf0be332f/8032ff11-29ed-4780-ac80-92b6e1c5e7aa.pngis excluded by!**/*.pngsprites/spr_dread_heavy_bolter/layers/b9dd1c82-3f7f-4a18-864f-e78a4b0ed9d6/8032ff11-29ed-4780-ac80-92b6e1c5e7aa.pngis excluded by!**/*.pngsprites/spr_dread_iron_clad/eb254b9d-bb2c-41f8-9e62-ad9069c99560.pngis excluded by!**/*.pngsprites/spr_dread_iron_clad/f5bd9088-45e5-4695-a241-41e7835f44fd.pngis excluded by!**/*.pngsprites/spr_dread_iron_clad/layers/eb254b9d-bb2c-41f8-9e62-ad9069c99560/750c31f7-7377-4a6c-809a-4f9444c3a1e7.pngis excluded by!**/*.pngsprites/spr_dread_iron_clad/layers/eb254b9d-bb2c-41f8-9e62-ad9069c99560/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_iron_clad/layers/f5bd9088-45e5-4695-a241-41e7835f44fd/750c31f7-7377-4a6c-809a-4f9444c3a1e7.pngis excluded by!**/*.pngsprites/spr_dread_iron_clad/layers/f5bd9088-45e5-4695-a241-41e7835f44fd/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_lascannon/48994d0c-01f0-441c-9383-c0eafe9cae39.pngis excluded by!**/*.pngsprites/spr_dread_lascannon/fc539d0b-b559-4265-95a9-df8bac65ea2b.pngis excluded by!**/*.pngsprites/spr_dread_lascannon/layers/48994d0c-01f0-441c-9383-c0eafe9cae39/1d4cccd9-bb49-4325-8933-45f465f70841.pngis excluded by!**/*.pngsprites/spr_dread_lascannon/layers/48994d0c-01f0-441c-9383-c0eafe9cae39/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_lascannon/layers/fc539d0b-b559-4265-95a9-df8bac65ea2b/1d4cccd9-bb49-4325-8933-45f465f70841.pngis excluded by!**/*.pngsprites/spr_dread_lascannon/layers/fc539d0b-b559-4265-95a9-df8bac65ea2b/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_missile/098fd89a-d321-4251-b0f3-70132fea3997.pngis excluded by!**/*.pngsprites/spr_dread_missile/7fa6bc12-162e-4538-92df-3bc73caec0ee.pngis excluded by!**/*.pngsprites/spr_dread_missile/layers/098fd89a-d321-4251-b0f3-70132fea3997/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_missile/layers/098fd89a-d321-4251-b0f3-70132fea3997/c8fad8b0-70d6-45c8-a8ed-2c1e3cb3673e.pngis excluded by!**/*.pngsprites/spr_dread_missile/layers/7fa6bc12-162e-4538-92df-3bc73caec0ee/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_missile/layers/7fa6bc12-162e-4538-92df-3bc73caec0ee/c8fad8b0-70d6-45c8-a8ed-2c1e3cb3673e.pngis excluded by!**/*.pngsprites/spr_dread_plasma_cannon/76458a7c-df41-4efe-ac58-2273c4d3e898.pngis excluded by!**/*.pngsprites/spr_dread_plasma_cannon/e1bf2ef8-95a8-4a6c-8464-f7b44f6675a3.pngis excluded by!**/*.pngsprites/spr_dread_plasma_cannon/layers/76458a7c-df41-4efe-ac58-2273c4d3e898/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_plasma_cannon/layers/76458a7c-df41-4efe-ac58-2273c4d3e898/ccd559cd-c323-4e0f-b733-5bf644ca1b41.pngis excluded by!**/*.pngsprites/spr_dread_plasma_cannon/layers/e1bf2ef8-95a8-4a6c-8464-f7b44f6675a3/818626e5-59b3-4a3c-9f1b-002f98b5e6d3.pngis excluded by!**/*.pngsprites/spr_dread_plasma_cannon/layers/e1bf2ef8-95a8-4a6c-8464-f7b44f6675a3/ccd559cd-c323-4e0f-b733-5bf644ca1b41.pngis excluded by!**/*.png
📒 Files selected for processing (19)
objects/obj_controller/Alarm_1.gml(1 hunks)objects/obj_controller/Create_0.gml(4 hunks)objects/obj_mass_equip/Create_0.gml(1 hunks)objects/obj_mass_equip/Draw_0.gml(4 hunks)objects/obj_mass_equip/Step_0.gml(1 hunks)scripts/scr_ComplexSet/scr_ComplexSet.gml(1 hunks)scripts/scr_buttons/scr_buttons.gml(2 hunks)scripts/scr_culture_visuals/scr_culture_visuals.gml(7 hunks)scripts/scr_powers/scr_powers.gml(1 hunks)scripts/scr_ui_manage/scr_ui_manage.gml(7 hunks)scripts/scr_ui_settings/scr_ui_settings.gml(2 hunks)sprites/spr_dread_assault_cannon/spr_dread_assault_cannon.yy(3 hunks)sprites/spr_dread_autocannon/spr_dread_autocannon.yy(2 hunks)sprites/spr_dread_claw/spr_dread_claw.yy(2 hunks)sprites/spr_dread_heavy_bolter/spr_dread_heavy_bolter.yy(2 hunks)sprites/spr_dread_iron_clad/spr_dread_iron_clad.yy(2 hunks)sprites/spr_dread_lascannon/spr_dread_lascannon.yy(2 hunks)sprites/spr_dread_missile/spr_dread_missile.yy(2 hunks)sprites/spr_dread_plasma_cannon/spr_dread_plasma_cannon.yy(2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.gml
⚙️ CodeRabbit configuration file
**/*.gml: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e.#macro ARR_body_parts["arm"]will crash the game, because there is no space between the array and the name of the macro.
- Color codes in the code shouldn't have any spaces in their id. I.e., color code
# 80bf40will crash the game.- All code should comply with the main GML documentation: https://manual.gamemaker.io/beta/en/GameMaker_Language/GML_Reference/GML_Reference.htm
Files:
objects/obj_mass_equip/Create_0.gmlobjects/obj_controller/Alarm_1.gmlobjects/obj_mass_equip/Step_0.gmlscripts/scr_powers/scr_powers.gmlscripts/scr_ComplexSet/scr_ComplexSet.gmlscripts/scr_ui_settings/scr_ui_settings.gmlscripts/scr_buttons/scr_buttons.gmlscripts/scr_culture_visuals/scr_culture_visuals.gmlobjects/obj_controller/Create_0.gmlobjects/obj_mass_equip/Draw_0.gmlscripts/scr_ui_manage/scr_ui_manage.gml
**/*.*
⚙️ CodeRabbit configuration file
**/*.*: - Having humanly understandable and maintainable code is always the top most priority.
- DRY (Don't repeat yourself) principle is also very important.
- Ensure that the code is compliant with the CODE_STYLE.MD: https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/docs/CODE_STYLE.md
- 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_mass_equip/Create_0.gmlobjects/obj_controller/Alarm_1.gmlobjects/obj_mass_equip/Step_0.gmlscripts/scr_powers/scr_powers.gmlsprites/spr_dread_lascannon/spr_dread_lascannon.yyscripts/scr_ComplexSet/scr_ComplexSet.gmlscripts/scr_ui_settings/scr_ui_settings.gmlscripts/scr_buttons/scr_buttons.gmlsprites/spr_dread_claw/spr_dread_claw.yyscripts/scr_culture_visuals/scr_culture_visuals.gmlsprites/spr_dread_autocannon/spr_dread_autocannon.yysprites/spr_dread_missile/spr_dread_missile.yyobjects/obj_controller/Create_0.gmlsprites/spr_dread_iron_clad/spr_dread_iron_clad.yysprites/spr_dread_assault_cannon/spr_dread_assault_cannon.yyobjects/obj_mass_equip/Draw_0.gmlsprites/spr_dread_plasma_cannon/spr_dread_plasma_cannon.yysprites/spr_dread_heavy_bolter/spr_dread_heavy_bolter.yyscripts/scr_ui_manage/scr_ui_manage.gml
**/*.yy
⚙️ CodeRabbit configuration file
**/*.yy: - When any script or sprite .yy files are deleted, their paths should also be deleted from the .yyp file, otherwise the game will crash.
- When any script or sprite .yy files are created, their paths should be added to the .yyp file, otherwise they'll fail.
Files:
sprites/spr_dread_lascannon/spr_dread_lascannon.yysprites/spr_dread_claw/spr_dread_claw.yysprites/spr_dread_autocannon/spr_dread_autocannon.yysprites/spr_dread_missile/spr_dread_missile.yysprites/spr_dread_iron_clad/spr_dread_iron_clad.yysprites/spr_dread_assault_cannon/spr_dread_assault_cannon.yysprites/spr_dread_plasma_cannon/spr_dread_plasma_cannon.yysprites/spr_dread_heavy_bolter/spr_dread_heavy_bolter.yy
🧠 Learnings (4)
📚 Learning: 2025-06-16T17:12:13.045Z
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#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:
scripts/scr_ComplexSet/scr_ComplexSet.gmlscripts/scr_culture_visuals/scr_culture_visuals.gml
📚 Learning: 2025-03-29T10:30:25.598Z
Learnt from: EttyKitty
PR: Adeptus-Dominus/ChapterMaster#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:
scripts/scr_culture_visuals/scr_culture_visuals.gml
📚 Learning: 2025-02-27T02:17:54.527Z
Learnt from: OH296
PR: Adeptus-Dominus/ChapterMaster#474
File: sprites/spr_marksmans_honor/spr_marksmans_honor.yy:47-52
Timestamp: 2025-02-27T02:17:54.527Z
Learning: The sprite "spr_marksmans_honor" is not used for animation despite having multiple frames - these frames represent different static states used in different contexts.
Applied to files:
sprites/spr_dread_autocannon/spr_dread_autocannon.yysprites/spr_dread_missile/spr_dread_missile.yysprites/spr_dread_iron_clad/spr_dread_iron_clad.yysprites/spr_dread_assault_cannon/spr_dread_assault_cannon.yysprites/spr_dread_plasma_cannon/spr_dread_plasma_cannon.yysprites/spr_dread_heavy_bolter/spr_dread_heavy_bolter.yy
📚 Learning: 2025-04-15T10:54:19.720Z
Learnt from: VanWeapon
PR: Adeptus-Dominus/ChapterMaster#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/Draw_0.gml
🔇 Additional comments (36)
objects/obj_mass_equip/Create_0.gml (1)
2-2: All tab comparison gates verified—no 1-based remnants detected.
- In Step_0.gml, the selection gate uses
if (tab > -1), correctly matching 0-based indexing.- In Draw_0.gml and related logic, only
tab == 0andtab == 1appear, which aligns with the first two slots in a 0-based scheme.The scan turned up no comparisons of the form
> 0,>= 1ortab < 0. “Cancel” restoringtab = -1remains the sole reset path. The new 0-based sentinel state is thus consistently honoured.objects/obj_controller/Alarm_1.gml (1)
422-422: Audit Passed: obj_ini not deactivated upstream
By the Omnissiah’s light, a repository-wide search forinstance_deactivate_object(obj_ini)andinstance_deactivate_instance(obj_ini)yielded no matches. You may rest assured thatinstance_activate_object(obj_ini)here is safe.scripts/scr_ComplexSet/scr_ComplexSet.gml (1)
759-766: Omnissian audit complete – nospr_dread_draws with subimage ≥ 2 found; manual asset-frame check remains.
- Code scan reveals only subimages 0 and 1 used for all
spr_dread_*in everydraw_sprite*invocation.- Next Rite: Confirm each
spr_dread_*sprite asset defines exactly two frames (indices 0 and 1), and that frame 1 corresponds to the left-hand graphic.Proceed to verify art-asset definitions before consecrating these changes.
sprites/spr_dread_iron_clad/spr_dread_iron_clad.yy (1)
54-54: Omnissiah’s Decree: All scourges invoked bydraw_sprite/draw_sprite_extwith subimage indices 2 or 3 forspr_dread_iron_cladand its kin return nil. No further call-site offences detected. The rites may conclude unimpeded.sprites/spr_dread_autocannon/spr_dread_autocannon.yy (3)
67-68: seqWidth/seqHeight blessed and consistent.197x232 matches width/height. No misalignment detected.
74-79: Keyframe pruning is sound.Now references only the two surviving frames; IDs and timings are coherent with the shortened sequence.
53-53: Omnissiah’s blessing: sprites recalibrated and all checks pass.– No occurrences of
image_index >= 2or similar in GML files.
– No logic branches testing for 4 frames (sprite_get_number/image_number >= 4).
– Each sprite folder contains exactly two PNGs (no orphaned assets).The sequence length of 2.0 is fully supported.
sprites/spr_dread_claw/spr_dread_claw.yy (2)
53-53: Sequence duration halved — coherent with keyframe plan.Length 2.0 with keys at 0.0 and 1.0 is correct. Ensure downstream code does not iterate beyond frame 1 for this sprite.
Covered by the repository-wide scan attached to spr_dread_autocannon.
79-79: Final keyframe retimed to 1.0 — correct index compression.This eliminates the old phantom 3.0 key; timing and length per frame are now uniform.
sprites/spr_dread_missile/spr_dread_missile.yy (3)
54-54: Sequence length reduction validated.2.0 total with two 1.0-length keys is structurally sound.
68-69: Declared sequence dimensions match sprite dimensions.197x232 alignment preserved. Note: this sprite contains two layers both named “default”; confirm this duplication is intentional to avoid liturgical confusion in the editor.
75-80: Keyframe set condensed cleanly to the two extant frames.IDs/path references point to the correct frames; no dangling references observed.
sprites/spr_dread_lascannon/spr_dread_lascannon.yy (3)
54-54: Sequence length set to 2.0 — consistent with two-frame doctrine.No timing gaps; suitable for non-animated state switching.
68-69: seqWidth/seqHeight mirror top-level width/height.Dimensional harmony achieved. As with missile, two “default” layers exist; validate this is by design.
75-80: Keyframe mapping purified.Only frame 0 and frame 1 remain referenced; the machine-spirit approves.
sprites/spr_dread_plasma_cannon/spr_dread_plasma_cannon.yy (3)
54-54: Sequence length trimmed to 2.0 — correct for biframes.Timing structure is internally consistent.
68-69: Sequence dimensions declared — consistent with sprite sheet.197x232 confirmed. Duplicate “default” layers present here as well; confirm intent.
75-80: Two-keyframe configuration is correct.References and durations are sanctified; no invalid GUIDs detected.
sprites/spr_dread_heavy_bolter/spr_dread_heavy_bolter.yy (2)
53-69: Two-frame sequence standardisation looks sound.length reduced to 2.0 with seqWidth/seqHeight matching width/height (197x232). This appeases the animation machine-spirits.
73-80: Omnissiah’s Omniscan: spr_dread_heavy_bolter frame-index integrity verified
No occurrences ofdraw_spriteorsprite_index = spr_dread_heavy_bolterpaired withimage_index ≥ 2were found outside the sprite file itself. The asset is only ever assigned and referenced as a two-frame sequence (indices 0 and 1), so there are no lurking callers assuming four frames.scripts/scr_culture_visuals/scr_culture_visuals.gml (2)
2040-2044: By the Omnissiah, normalise new_weapon_draw under weapon_data and confirm the Multi-Melta sprite– In scripts/scr_culture_visuals/scr_culture_visuals.gml, within the “Multi-Melta” dreadnought variant (around lines 2028–2045), move the flag into a nested
weapon_datablock to match other weapons’ definitions.
– Nospr_dread_multi_meltaasset is present in the codebase—verify with the art-team whether a dedicated Multi-Melta sprite exists, or ifspr_dread_plasma_cannonis intended as a placeholder.Proposed diff:
{ - sprite: spr_dread_plasma_cannon, + sprite: spr_dread_plasma_cannon, // TODO: replace if a Dread Multi-Melta asset exists body_types: [3], armours : ["Dreadnought"], - new_weapon_draw: true + weapon_data: { new_weapon_draw: true } }
2488-2505: Omnissiah directive: correct Autocannon’s display logic and verify draw flag placement
- Change the base entry’s
display_typefrom"melee_twohand"to"ranged_twohand"so it aligns with other two-handed ranged weapons.- The Dreadnought variant’s
new_weapon_drawmust override the base flag in the location your flattening logic actually reads:
• If onlyweapon_data.new_weapon_drawis picked up, wrap the override in its ownweapon_datablock.
• If top-level variant properties are honoured, you can leave it at the variant root.- No further Autocannon entries in
scr_culture_visuals.gmlreference the old melee type, so no other changes are needed here.sprites/spr_dread_assault_cannon/spr_dread_assault_cannon.yy (3)
7-7: BBox tweak acceptable.bbox_right 183 → 182: minor correction; no wider implications anticipated.
54-70: Two-frame sequence standardisation looks sound.length 2.0 with seqWidth/seqHeight matching sprite dimensions. The litany of synchronisation is upheld.
74-80: All Clear: No frame‐index assumptions detected
By my cogitation, the only code reference tospr_dread_assault_cannonresides in
• scripts/scr_ui_display_weapons/scr_ui_display_weapons.gml (within thedreadnought_sprite_componentsmapping)No occurrences of
sprite_index,image_index ≥ 2,draw_spriteordraw_sprite_extinvoking this sprite were found elsewhere. Thus, no callers assume four frames—desynchronisation risk absent.objects/obj_controller/Create_0.gml (3)
100-102: Sensible initialisation of unit_manage_constants and sentinel current_data. Blessed.Early bootstrapping avoids null dereferences in the new manage UI. No issues detected.
716-717: unit_manage_image default to false + exclude from saves aligns with draw-time lifecycle.Matches scr_ui_manage’s guarded destroy_image() usage; avoids leaking image handles across loads.
440-448: Migration Verified: Allunit_focus& UI Fields at Top-Level
The sacred code paths have been scanned, and the Omnissiah’s will is intact:
- scripts/scr_ui_manage.gml exclusively reads via
obj_controller.unit_focus, and useslast_unit,ui_melee_penalty/ui_ranged_penaltyas instance vars.- scripts/scr_company_struct.gml correctly writes to
obj_controller.unit_focus, no nested‐scope remnants.- In obj_controller’s own events (Step_0, scr_draw_management_unit),
unit_focusandlast_unitare assigned implicitly on the controller instance.- No stray definitions or shadowed variables detected in other contexts.
The cogitator hums in perfect synchrony. No further action required.
scripts/scr_ui_settings/scr_ui_settings.gml (2)
348-370: 0-based slot refactor (gg 0..4) is coherent with mass-equip changes.Mapping titles/wep/armour/gear/mobility matches the new indices. Praised be the consistent array logic.
382-390: Updated gating for Terminator/Dread and Devastators with new indices looks correct.
- Terminator/Dread lock-out now tied to gg == 3 (Special Item).
- Devastator gating to armour/mobility (gg == 2 or 4).
No functional objections.objects/obj_mass_equip/Draw_0.gml (3)
63-63: Gate includes tab 0 (now -1 means “none”): correct.Prevents the selection panel appearing when no slot is chosen; aligns with new sentinel semantics.
161-176: Slot-to-field assignment updated to 0-based: looks sound.0→wep1, 1→wep2, 2→armour (with terminator mobility reset), 3→gear, 4→mobility. Correct mapping for the new tab indices.
194-195: CANCEL resets tab to -1: consistent with new sentinel.UI returns cleanly to non-selection state; harmonious.
scripts/scr_ui_manage/scr_ui_manage.gml (3)
257-262: Image handle lifecycle: proper destruction before re-creation.is_struct guard + destroy_image() + delete prevents memory rune leakage. Machine spirits approve.
599-601: Drawing managed unit image via unit_manage_image handle is correct.Guarded by is_struct; consistent with earlier lifecycle fix.
129-145: Implement Numeric Owner ConsistencyTech-Priest Analysis: A full‐system
rgscan confirms thatunit_manage_constants.ownerandunit_manage_constants.faction_owneronly appear inscripts/scr_ui_manage/scr_ui_manage.gmlat lines 138–142. There is no downstream reliance on the current mixed typing—thus the proposed refactor is safe to enact.Directive:
function reset_manage_unit_constants(unit){ try{ delete unit_manage_constants; tooltips = {}; unit_manage_constants = {}; last_unit = [unit.company, unit.marine_number]; marine_armour[0] = unit.armour(); fix_right = 0; equip_data = unit.unit_equipment_data(); - unit_manage_constants.faction_owner = "1"; - if (unit.race() != 1) { - unit_manage_constants.owner = unit.race(); - } + // Numeric owner for consistency; string‐cast only for UI displays + unit_manage_constants.owner = unit.race(); + unit_manage_constants.faction_owner = string(unit_manage_constants.owner); unit_manage_constants.current_data = last_unit; var _damage_res = unit.damage_resistance();By the Omnissiah’s grace, the code’s integrity remains intact. Proceed with merge.
Purpose and Description
Testing done
Related things and/or additional context