What it does
scripts
Scripts tab for the System Tools inspector — script registry list,
case-insensitive filter, selected-script source preview (truncated at
30 lines), and the list of entities currently using the selected
script. Refreshes at 2 Hz from the getScriptRegistryTable and
getBehaviorSourcesTable globals.
Exports
M.build(_state) -> any— build the zui widget tree for the tab.M.onCallback(callbackId: string, data, _state) -> boolean— handle filter input and row selection.M.label: string— tab title.M.refresh: number— refresh cadence in seconds (0.5).
Usage
local Scripts = require("@builtin::modules.engine.editor.system_tools.tabs.scripts")
local widget = Scripts.build(state)
Scripts.onCallback("scripts-select-myScript", nil, state)
Notes
- Filter is a substring match on the lowercased script name.
- Selecting a script invalidates the registry + behaviors caches so the right pane refreshes on the next render.
- Behaviors with
enabled == falseare shown with a(disabled)suffix in the entity-usage list. - Source preview is hard-capped at 30 lines; longer sources are
truncated with a
-- ... (N+ lines)marker.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.