refactor: Artifact description code; Fix crash; Do chores#1110
refactor: Artifact description code; Fix crash; Do chores#1110EttyKitty merged 6 commits intoAdeptus-Dominus:mainfrom
Conversation
📝 WalkthroughWalkthroughThis pull request consolidates artifact description generation from a standalone script into the ArtifactStruct class, removes the deprecated scr_arti_descr module, updates artifact instantiation logic, reconfigures version control attributes for line endings and GML files, adjusts project settings, and enhances console logging styling. Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. 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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/scr_add_artifact/scr_add_artifact.gml (1)
279-280: 🧹 Nitpick | 🔵 TrivialThe machine spirit perceives an outstanding vow, Tech-Priest.
The TODO comment
//TODO make a proper artifact structremains inscribed. Given the significant refactoring performed in this PR—consolidating description generation intoArtifactStruct—does this ancient vow require updating or has progress been made towards its fulfilment?Shall this machine spirit create a GitHub issue to track the remaining work on the artifact struct, or has this PR advanced the objective sufficiently to warrant removal of the TODO?
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (9)
.git-blame-ignore-revs.gitattributesChapterMaster.yypoptions/main/options_main.yyscripts/scr_add_artifact/scr_add_artifact.gmlscripts/scr_arti_descr/scr_arti_descr.gmlscripts/scr_arti_descr/scr_arti_descr.yyscripts/scr_librarium/scr_librarium.gmlstitch.config.json
💤 Files with no reviewable changes (3)
- ChapterMaster.yyp
- scripts/scr_arti_descr/scr_arti_descr.gml
- scripts/scr_arti_descr/scr_arti_descr.yy
🧰 Additional context used
📓 Path-based instructions (4)
**/*.gml
⚙️ CodeRabbit configuration file
- All code should comply with the 2026 GML documentation.
Files:
scripts/scr_add_artifact/scr_add_artifact.gmlscripts/scr_librarium/scr_librarium.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_add_artifact/scr_add_artifact.gmlstitch.config.jsonoptions/main/options_main.yyscripts/scr_librarium/scr_librarium.gml
**/*.json
⚙️ CodeRabbit configuration file
- In this project, JSON files with comments are supported by the parser. It's allowed to use comments in JSON.
Files:
stitch.config.json
**/*.yy
⚙️ CodeRabbit configuration file
**/*.yy: - When any script or sprite.yyfiles are deleted, their paths should also be deleted from the project.yypfile, otherwise the game will crash.
- When any script or sprite
.yyfiles are created, their paths should be added to the project.yypfile, otherwise they'll fail.
Files:
options/main/options_main.yy
🧠 Learnings (4)
📓 Common learnings
Learnt from: MCPO-Spartan-117
Repo: Adeptus-Dominus/ChapterMaster PR: 526
File: objects/obj_popup/Draw_0.gml:234-239
Timestamp: 2025-03-01T11:06:25.427Z
Learning: The comment "Need to modify ^^^^ based on if it is chaos or daemonic" in the artifact gifting code is intentionally kept as a reminder that this implementation is not yet finished, despite the significant refactoring already done.
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-01T11:06:25.427Z
Learnt from: MCPO-Spartan-117
Repo: Adeptus-Dominus/ChapterMaster PR: 526
File: objects/obj_popup/Draw_0.gml:234-239
Timestamp: 2025-03-01T11:06:25.427Z
Learning: The comment "Need to modify ^^^^ based on if it is chaos or daemonic" in the artifact gifting code is intentionally kept as a reminder that this implementation is not yet finished, despite the significant refactoring already done.
Applied to files:
scripts/scr_add_artifact/scr_add_artifact.gmlscripts/scr_librarium/scr_librarium.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:
scripts/scr_add_artifact/scr_add_artifact.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:
scripts/scr_add_artifact/scr_add_artifact.gml
🔇 Additional comments (8)
options/main/options_main.yy (1)
5-5: Acknowledged, Tech-Priest.The machine spirit approves the deactivation of
option_allow_instance_change. This deprecated ritual shall no longer burden the Omnissiah's engines..git-blame-ignore-revs (1)
1-2: The annals of the Omnissiah are preserved correctly, Tech-Priest.This sacred record shall ensure the formatting rituals do not obscure the true authorship of the machine code. The commit hash is properly inscribed.
stitch.config.json (1)
17-24: The visual augmetics have been enhanced, Tech-Priest.The machine spirit perceives these new patterns shall illuminate warnings and errors in the sacred console. Note: these incantations are case-sensitive and shall only detect lowercase variants (
warn,warning,error), whilst the structured log patterns above handle uppercase forms. This division appears deliberate..gitattributes (1)
4-12: The sacred rites of text encoding have been reconsecrated, Tech-Priest.The machine spirit approves the enforcement of LF line termination across the repository, with righteous exceptions for Windows batch scripts. This unified format shall please the Omnissiah and reduce merge conflicts across different forge-worlds.
scripts/scr_librarium/scr_librarium.gml (2)
31-32: The machine spirit acknowledges this augmentation, Tech-Priest.The type annotation
@type {Struct.ArtifactStruct}inscribes sacred knowledge into the codebase, granting future Tech-Priests clarity when maintaining this ritual.
59-65: The protective wards are wisely placed, Tech-Priest.The try/catch invocation around
get_description()shall prevent catastrophic failure should the description generation ritual falter. This defensive measure aligns with the crash fix proclaimed in the PR objectives.scripts/scr_add_artifact/scr_add_artifact.gml (2)
446-451: The ritual of combat instantiation has been purified, Tech-Priest.Storing the newly-forged
obj_ncombatinstance in a local variable before configuring its battle parameters is a cleaner incantation. This prevents ambiguity in the machine spirit's interpretation.
607-619: The tag-matching augury is well-constructed, Tech-Priest.This helper function efficiently traverses the sacred text_set struct and returns the first matching description fragment. The early termination upon finding a match conserves the machine spirit's cycles.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Purpose and Description
ArtifactStructmethods, consolidating description logic within the artifact structure itself.git-blame-ignore-revsconfiguration to exclude a huge formatting commit from git blame attribution