anchorIfPresent
anchorIfPresent<
Of>(handle):OptionalSystemHandle<Of>
Anchors to handle only where its system runs, and skips the anchor
where it does not: where the game lists no plugin of that name, or
omits the system. It exists for a plugin that runs with or without
another and must sit on one side of it when both run: rounds()
scores before npcs()’s conversations where a game lists both, with
before: [anchorIfPresent(npcs.systems.converse)], and runs alone where
it lists no npcs(). Without it, an anchor to a system that does not
run throws as the world is made. A listed plugin that lacks the system,
or runs it under another phase, still throws. Like any handle, it never
adds the plugin to a world.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Of extends "input" | "motion" | "rules" | "physics" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
handle |
SystemHandle<Of> |