Skip to content

Add order push and pop hooks to the rules example - #1703

Draft
NginxL wants to merge 1 commit into
OpenReliant:mainfrom
NginxL:docs/order-hooks-example
Draft

NginxL wants to merge 1 commit into
OpenReliant:mainfrom
NginxL:docs/order-hooks-example

Conversation

@NginxL

@NginxL NginxL commented Dec 5, 2026

Copy link
Copy Markdown

Summary

Refs #749.

Extends the rules example with the missing order lifecycle demonstration:

  • order_push reads e.order and e.target for the player's ship.
  • order_pop shows where an order-ending hook runs.
  • Updates the example index, scripting example table, and "What mods can do" table.

The new handlers only print example output. They do not change orders, damage, or gameplay state.

Verification

  • luau-analyze examples/mods/rules/rules.luau completed. It reports the existing ImplicitReturn warning in the damage hook at lines 28 to 32, not in the new order handlers.
  • make check-files passed.
  • git diff --check passed.

Gaps

I could not run the example in the game. This checkout has no Zig toolchain or game installation, so the hook output and order flow were not observed in a mission. A maintainer smoke test with an order push and pop in flight remains necessary before merging.

AI assistance disclosure

An automated AI coding agent prepared this change. The API fields were checked against the current scripting reference, and the local checks above were run by the agent.

This branch has not been deployed

No deployments
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.

1 participant