Skip to main content

ValidationFindBlockCycles

Callable

  • ValidationFindBlockCycles(appearance: Item[]): string[][]

  • Finds any block cycles in the given appearance array. Block cycles are groups of items that block each other in a cyclic fashion. Block cycles are represented as an array of group names that comprise the cycle. For example: ["ItemArms", "ItemDevices", "ItemArms"] This indicates that the item in the ItemArms group blocks the item in the ItemDevices group, and vice versa. This function returns an array of such block cycles, or an empty array if none were found. Be advised that cyclic block checking is relatively expensive, so should only be run when needed - don't run it every frame!


    Parameters

    • appearance: Item[]

      The appearance array to check

    Returns string[][]

    • A list of block cycles, each cycle being represented as an array of group names.