Practical guide
Control a world-indicator lens
Discover and toggle host-owned world markers without moving simulation authority into Lua or rendering.
Procedure
- Call world_indicators.channels and show controls only for channels returned to the current package origin.
- Use a stable channel ID and world_indicators.is_visible to reflect its current per-session state.
- Change visibility from an explicit package action with world_indicators.set_visible.
- Treat indicator labels and values as detached presentation facts; do not infer write authority from them.
- Use Safe Mode when a development lens interferes with normal presentation; development-only channels are hidden with the development packages.
Example
local channel_id = "development.resource-activity"
local visible = world_indicators.is_visible(channel_id)
function handle_action(action_id)
if action_id == "addon.resource-activity.toggle" then
world_indicators.set_visible(channel_id, not visible)
end
end
Constraints and recovery
- Channel identities are compiled stable contracts. Packages discover and toggle channels but cannot register arbitrary simulation owners.
- The resource-activity channel is development-only and defaults to hidden.
- Indicator composition visits a bounded owner window only while its channel is visible.
- Indicator records are rebuilt from committed Resource, Supply, Work, and World facts; they are not saved as gameplay state.
Related symbols
world_indicators.channelsworld_indicators.is-visibleworld_indicators.set-visibleerror.indicator-channel-authorityerror.indicator-channel-unavailable