Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

SLua uses a different event model than LSL and does not support LSL's state machine. The events state_entry and state_exit are LSL-specific and should not appear in SLua reference documentation. The timer event is supported in SLua and has been retained.

Changes

  • Modified scripts/generate-docs.js: Added lslOnlyEvents filter to skip state machine events (state_entry and state_exit) during SLua documentation generation
  • Removed files: Deleted state_entry.mdx and state_exit.mdx from src/content/docs/script/slua-reference/events/
  • Retained: timer.mdx in SLua documentation as this event is supported

LSL documentation retains all 43 events. SLua documentation now correctly shows 41 events (excluding only state_entry and state_exit).

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>Remove state_entry and state_exit from SLua documentation</issue_title>
<issue_description>SLua does not use LSL's state machine model. The state_entry and state_exit events are LSL-specific and should likely be removed from the SLua reference documentation.

Possible solution:

  • Omit state_entry, state_exit and timer events when generating SLua event pages using generate-docs.js
  • Remove respective event *.mdx pages</issue_description>

Comments on the Issue (you are @copilot in this section)

Original prompt

This section details on the original issue you should resolve

<issue_title>Remove state_entry and state_exit from SLua documentation</issue_title>
<issue_description>SLua does not use LSL's state machine model. The state_entry and state_exit events are LSL-specific and should likely be removed from the SLua reference documentation.

Possible solution:

  • Omit state_entry, state_exit and timer events when generating SLua event pages using generate-docs.js
  • Remove respective event *.mdx pages</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 21, 2025 18:28
- Modified generate-docs.js to skip state_entry, state_exit, and timer when generating SLua event pages
- Removed existing state_entry.mdx, state_exit.mdx, and timer.mdx from SLua reference
- These events are LSL-specific and don't apply to SLua's event model
- LSL documentation still includes all 43 events; SLua now has 40 events

Co-authored-by: bennettgoble <[email protected]>
Store event count in a variable to avoid duplicate Object.keys() calls

Co-authored-by: bennettgoble <[email protected]>
Copilot AI changed the title [WIP] Remove state_entry and state_exit from SLua documentation Remove LSL-specific state machine events from SLua documentation Nov 21, 2025
Copilot AI requested a review from bennettgoble November 21, 2025 18:35
Copy link
Contributor

@bennettgoble bennettgoble left a comment

Choose a reason for hiding this comment

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

@copilot add the timer event back, we want to keep this in slua documentation.

Keep timer event in SLua docs; only exclude state_entry and state_exit which are specific to LSL's state machine model

Co-authored-by: bennettgoble <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 21, 2025

@copilot add the timer event back, we want to keep this in slua documentation.

Done. The timer event has been added back to SLua documentation. Only state_entry and state_exit are now excluded from SLua docs. (commit 702d096)

Updated example usage and notes for the timer event in SLua/Luau.
@bennettgoble bennettgoble marked this pull request as ready for review November 21, 2025 19:11
@bennettgoble bennettgoble merged commit f87511b into main Nov 21, 2025
1 check passed
@bennettgoble bennettgoble deleted the copilot/remove-state-entry-exit-docs branch November 21, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove state_entry and state_exit from SLua documentation

2 participants