(lightbulb) Looking for info on the NEXUS faction in the game? It's in the Warzone Encyclopaedia

.fn

Defines helper functions available to all NEXUS subroutines (and external scripts).

 

Syntax

// call a function called "myFunc"
var returnValue = ("myFunc" in NEXUS) ? NEXUS.myFunc(params) : alternative;
 
// if you're sure the function exists, simplify that to:
var returnValue = NEXUS.myFunc(params);

// add a new function to all instances of NEXUS
NEXUS.fn.myFunc = someFunction;
 
// add a new function to a specific instance of NEXUS
myNEXUS.myFunc = someFunction;

Ready-made NEXUS.fn functions

You can install bundles of ready-made functions using Fn Subroutines.

Calling NEXUS.fn functions

The following memory banks can access 'NEXUS.fn' via 'this':

An example follows:

var returnValue = this.whatever(params);

For all other memory banks, and all external code, use the following:

var returnValue = NEXUS.whatever(params);

It's probably best to always use 'NEXUS' instead of 'this' because using 'NEXUS' makes code easier to understand.

Contents

Assimilate:

 

API Browser

Observe:

  • NEXUS()The API namespace for NEXUS, that doubles up as a function for triggering tasks.
    • .infiltrate()Infiltrates core systems so that NEXUS can absorb them.
    • .suffix()Determines the appropriate event key suffix based on the passed in object.
    • .fnDefines helper functions available to all NEXUS subroutines (and external scripts).
    • .actions
    • .classify()Classifies an object using the installed taxonomy in order to derive an "Object Key".
    • .defaultStores various defaults for NEXUS subroutines.