MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / registerAction

Method registerAction

src/monogatari.ts:852–860  ·  view source on GitHub ↗

* @static registerAction - Register an Action to the actions list. All actions * should be registered before calling the init () method so their Mounting * cycle is done correctly. * * @param {Action} action - Action to register. Remember each action must * have an unique ID.

(action: StaticAction, naturalPosition = false)

Source from the content-addressed store, hash-verified

850 * have an unique ID.
851 */
852 static registerAction (action: StaticAction, naturalPosition = false) {
853 action.engine = this.asEngine();
854
855 if (naturalPosition) {
856 this._actions.push (action);
857 } else {
858 this._actions.unshift (action);
859 }
860 }
861
862 /**
863 * @static unregisterAction - Removes an action from the actions list. Any

Callers

nothing calls this directly

Calls 1

asEngineMethod · 0.95

Tested by

no test coverage detected