democratizedspace / democratizedspace/dspace

refactor QuestChatOption.svelte to reuse a component for Goto and Finish

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
4
Forks
2
Avg merge
5h 34m
Merged PRs (30d)
4

Description

Motivation: the ability to block finishing a quest on obtaining some item from a process. Right now the only workaround is blocking behind another Goto option that takes you to a new dialogue step.

example (implement this change to close this bug):

```json
{
"id": "charge",
"text": "Now all that's left is starting the charging process! Push the big button and energy will flow from the Sun into that battery! Isn't technology amazing? Once you've started the charge, feel free to finish the quest! You'll get a reward for your hard work!",
"options": [
{
"type": "process",
"process": "solar-200Wh",
"text": "Let there be light!"
},
{
"type": "finish",
"text": "You've made my day, Orion! Thanks so much!!"
}
]
}
```

```json
{
"id": "solar-200Wh",
"title": "Generate 200 Wh of electricity using solar",
"requireItems": [
{
"id": "81",
"count": 1
}
],
"consumeItems": [
],
"createItems": [
{
"id": "22",
"count": 200
},
{
"id": "61",
"count": 200

}
],
"duration": "1h"
},
```

`solar-200Wh` grants 200 `dSolar` (id = "61"). Gate the `"type": "finish"` option on 200 dSolar.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.