Class

RezQuest

RezQuest()

Constructor

# new RezQuest()

Tracks the progression of a storyline or quest through discrete stages.

Mixes In:

View Source rez_plot.js, line 138

Extends

Methods

# notifySubscribers(event, paramsopt)

Fires the named event on every current subscriber, sorted by descending priority attribute (highest first, default 0).

Parameters:
Name Type Attributes Default Description
event string

The event name to fire on each subscriber

params Object <optional>
{}

Additional parameters passed to the event handler. A source key is automatically added pointing to the notifying element.

Mixes In:

View Source rez_mixins.js, line 47

# subscribe(refOrId)

Adds a game object as a subscriber. The object will receive event notifications when HasSubscribers#notifySubscribers is called. Throws if refOrId cannot be resolved to a known game object ID.

Parameters:
Name Type Description
refOrId string | Object

A game object reference or element ID to add as a subscriber

Mixes In:

View Source rez_mixins.js, line 27

# unsubscribe(refOrId)

Removes a previously added subscriber. Has no effect if the object is not currently subscribed. Throws if refOrId cannot be resolved to a known game object ID.

Parameters:
Name Type Description
refOrId string | Object

A game object reference or element ID to remove

Mixes In:

View Source rez_mixins.js, line 37

# static accepted()

Advances the quest state from mentioned to accepted

View Source rez_plot.js, line 172

  • event:quest_did_update

# static achieved()

Advances the quest state from accepted to achieved

View Source rez_plot.js, line 185

  • event:quest_did_update

# static botched()

Changes the quest state from mentioned|accepted|achieved to botched

View Source rez_plot.js, line 211

  • event:quest_did_update

# static completed()

Advances the quest state from achieved to completed

View Source rez_plot.js, line 198

  • event:quest_did_update

# static constructor(id, attributes)

Creates a new RezQuest.

Parameters:
Name Type Description
id string

Unique identifier for this quest

attributes Object

Initial attributes

View Source rez_plot.js, line 147

# static mentioned()

Advances the quest state from unknown to mentioned

View Source rez_plot.js, line 159

  • event:quest_did_update

# static unbotched()

Returns the quest state from botched to its previous good state

View Source rez_plot.js, line 225

  • event:quest_did_update