Skip to content

fix(molang): recognize attachable owning entity context - #740

Merged
DaanV2 merged 1 commit into
Blockception:mainfrom
Jason10191019999:fix/attachable-owning-entity
Oct 18, 2026
Merged

DaanV2 merged 1 commit into
Blockception:mainfrom
Jason10191019999:fix/attachable-owning-entity

Conversation

@Jason10191019999

Copy link
Copy Markdown
Contributor

Problem

Attachable validation incorrectly reports context.owning_entity and its shorthand c.owning_entity as undefined, even though the engine provides this context.

Changes

  • Add owning_entity to the built-in Attachables.Contexts data.
  • Add a regression test that runs both the full and shorthand forms through the Molang diagnoser.

This does not relax validation for custom contexts that still require definitions.

Validation

  • Focused Molang diagnoser suite: 20 passed, including the new regression test.
  • npm run build - passed.
  • npm run lint - completed with 0 errors; existing warnings remain.
  • Full npm test - 3569 passed and 1 skipped. Four snapshot failures remain in files-test/files.test.ts because of command-text offsets. I reproduced the same four failures with this change stashed, confirming that they are unrelated to this PR.

Fixes #739

@DaanV2
DaanV2 enabled auto-merge (squash) October 18, 2026 17:02
@DaanV2
DaanV2 merged commit 54ac6f2 into Blockception:main Oct 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attachable context context.owning_entity reported as undefined

2 participants