Document the Script API surface and update the glossary (#87) #99
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/cinnabar!99
Loading…
Reference in a new issue
No description provided.
Delete branch "script-api-docs-87"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #87. Closes #75.
docs/script-api.mddocuments every name a Script can reach:cinnabar.script/1, the globals,Component.defineand field Kinds, Component instances, lifecycle timing, update ordering,GameObject,transform, reference fields, hot reload, and what is out of scope. Every stated behaviour maps to atests/luautest, and the page ends with that map.The glossary gains Script API, Script Component and the
cinnabar.scriptInterface, revises Script, and carries the Plugin List Order note aboutluauand physics.ADR-0029 records the one decision the parent spec did not state: a reloaded Script's added fields take the new define's default rather than ADR-0020's zero.
Tests are added for the error behaviours the page states that the suite did not yet pin: define outside a load, a duplicate define, an Odin-registered name, non-string names, keys and defaults,
unloadleaving Components running, refused GameObject names, destroyed parents, non-boolean activation, unknown property writes, a destroyed reference target, the shared lookups on an Odin Component, andgameObjecton a destroyed Component.The page lives in the repo rather than the Forgejo wiki so it is reviewed here first. The wiki repo is empty; after merge, copy
docs/script-api.mdto it asScript-API.md.