# new RezQuest()
Tracks the progression of a storyline or quest through discrete stages.
- Mixes In:
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 |
# 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:
# 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 |
# static botched()
Changes the quest state from mentioned|accepted|achieved to botched
- 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 |
# static unbotched()
Returns the quest state from botched to its previous good state
- event:quest_did_update