RouteRegionButtonUI

Overview

Per-region button that highlights adjacent (or sea-connected) nodes and fades them to guide selection. Disables nodes already in the path or not reachable; grays out regions with Presence. fileciteturn22file5

Behavior

  • Registers UpdateUI() on updateRouteUI.
  • If this node is already selected → lock color to routeSelectedNodeColor, stop fade, disable button.
  • Else compute adjacency to the last selected node:
    • Adjacent if directly connected or both have sea connections and seaRoutesEnabled is true → enable + start AdjacentFadeEffect with per-connection phase offset.
    • Otherwise disable; color = gray when region has Presence, else startingColor. fileciteturn22file5

Cleanup

Stops coroutines and unregisters on destroy. fileciteturn22file5