Skip to content

refactor: Artifact description code; Fix crash; Do chores#1110

Merged
EttyKitty merged 6 commits intoAdeptus-Dominus:mainfrom
EttyKitty:pr/stitch
Feb 4, 2026
Merged

refactor: Artifact description code; Fix crash; Do chores#1110
EttyKitty merged 6 commits intoAdeptus-Dominus:mainfrom
EttyKitty:pr/stitch

Conversation

@EttyKitty
Copy link
Collaborator

@EttyKitty EttyKitty commented Feb 4, 2026

Purpose and Description

  • Refactored artifact description generation from a standalone script into ArtifactStruct methods, consolidating description logic within the artifact structure itself
  • Disabled the option_allow_instance_change option in GameMaker settings
  • Added .git-blame-ignore-revs configuration to exclude a huge formatting commit from git blame attribution
  • Standardized line endings to LF across the project whilst maintaining Windows-safe CRLF for batch and PowerShell scripts
  • Added Stitch configuration with GM warning and error message highlighting
  • Fix this: https://canary.discord.com/channels/714022226810372107/1467735863873114256

@github-actions github-actions bot added Area: JSON Changes to external JSON files or their under-the-hood functionality Type: CI Continuous Integration changes labels Feb 4, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Version Control Configuration
.git-blame-ignore-revs, .gitattributes
Established git blame exclusion for formatting commit; unified line-ending strategy to LF globally whilst enabling CRLF for Windows batch/PowerShell scripts; added GML linguist metadata for YYP project files.
Project Manifest
ChapterMaster.yyp, options/main/options_main.yy
Purged scr_arti_descr script reference from project registry; disabled instance change allowance in main options.
Artifact Description Subsystem
scripts/scr_arti_descr/*, scripts/scr_add_artifact/scr_add_artifact.gml, scripts/scr_librarium/scr_librarium.gml
Migrated artifact description generation logic from scr_arti_descr into ArtifactStruct methods—implemented get_description() and assign_text_from_tag_match(); deleted scr_arti_descr module entirely; updated scr_librarium to invoke new get_description() method with exception handling; refactored artifact combat instance creation to employ instance_create_depth.
Console Styling Configuration
stitch.config.json
Appended warning and error pattern matching rules to gameConsoleStyle for enhanced log-level visibility.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title exceeds the 50-character limit at 57 characters and conflates multiple distinct changes (refactor, crash fix, chores) without clear scope delineation. Refactor the title to meet the 50-character limit with a single, focused change. Consider: 'refactor: artifact description code' or split into separate PRs.
Description check ❓ Inconclusive The pull request description adequately outlines key changes but omits the required 'Testing done' section and provides only a Discord link reference without substantive context. Tech-Priest must elaborate on testing procedures performed for the artifact refactor and crash fix, and clarify the Discord reference with direct context or resolution details.
✅ 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.

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

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.

❤️ Share

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

@github-actions github-actions bot added Size: Big Type: Refactor Rewriting/restructuring code, while keeping general behavior labels Feb 4, 2026
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: 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 | 🔵 Trivial

The machine spirit perceives an outstanding vow, Tech-Priest.

The TODO comment //TODO make a proper artifact struct remains inscribed. Given the significant refactoring performed in this PR—consolidating description generation into ArtifactStruct—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

📥 Commits

Reviewing files that changed from the base of the PR and between 57687d4 and 25936e3.

📒 Files selected for processing (9)
  • .git-blame-ignore-revs
  • .gitattributes
  • ChapterMaster.yyp
  • options/main/options_main.yy
  • scripts/scr_add_artifact/scr_add_artifact.gml
  • scripts/scr_arti_descr/scr_arti_descr.gml
  • scripts/scr_arti_descr/scr_arti_descr.yy
  • scripts/scr_librarium/scr_librarium.gml
  • stitch.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.gml
  • scripts/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.gml
  • stitch.config.json
  • options/main/options_main.yy
  • scripts/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 .yy files are deleted, their paths should also be deleted from the project .yyp file, otherwise the game will crash.

  • When any script or sprite .yy files are created, their paths should be added to the project .yyp file, 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.gml
  • scripts/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_ncombat instance 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.

@EttyKitty EttyKitty merged commit 8878aff into Adeptus-Dominus:main Feb 4, 2026
6 checks passed
@EttyKitty EttyKitty deleted the pr/stitch branch February 4, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: JSON Changes to external JSON files or their under-the-hood functionality Size: Big Type: CI Continuous Integration changes Type: Refactor Rewriting/restructuring code, while keeping general behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant