Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetCheckForCircularDependencies

From RoR Wiki

UI Lua API · Interface functions
Version: WAR 1.4.8

Turns load-order tracking for UI module initialization on or off. With it on, circular-dependency errors include the load order.

SetCheckForCircularDependencies(enabled)

Arguments

enabled
boolean – true to track the load order while modules are initialized.

Returns

Nothing.

Details

  • The flag is read by ModulesInitializeAllEnabled and ModuleInitialize. When it is set, the client keeps a list of the modules it is currently initializing.
  • Circular dependencies are detected either way. The flag only changes the error text: with tracking on, the message Error Loading UiMod %s: Circular Dependency detected with %s. Load Order = %s ends with the chain of module names in parentheses, joined by ->. With tracking off it ends with Not Tracked.
  • The flag is off when the client starts. GetCheckForCircularDependencies returns the current value.
  • enabled must be a real boolean. Passing nil or a number raises an Invalid Parameters error.
  • The stock UI never calls this function.

Errors

None besides the Invalid Parameters argument check.

Example

A minimal example built from the signature:

SetCheckForCircularDependencies( true )
ModulesInitializeAllEnabled()

See also