Skip to content

Commit

Permalink
Make migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
shomykohai committed Jun 28, 2024
1 parent ca55022 commit e9e655b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
- [🗃 AvailableQuestPool](/api/quest_pool/available_quest_pool.md "🗃 AvailableQuestPool")
- [🗃 ActiveQuestPool](/api/quest_pool/active_quest_pool.md "🗃 ActiveQuestPool")
- [🗃 CompletedQuestPool](/api/quest_pool/completed_quest_pool.md "🗃 CompletedQuestPool")
- [📨 Migrations](/)
- [🔸 1.2.3 to 1.3+](migrate_1.2.3_to_1.3.md)
Binary file added docs/assets/migrations/1.2.3-to-1.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions docs/migrate_1.2.3_to_1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Migrate from v.1.2.3 to 1.3 and up

In version [1.3]() some minor breaking changes happened: quest methods now accepts optional arguments.<br>
This change has led to old quest scripts to break.<br>
Here's how to fix all the errors you may encounter
## QUEST RESOURCE

If you encounter a Parse error when updating:

```diff
- Parser Error: The function signature doesn't match the parent. Parent signature is "start(Dictionary = <default>) -> void".
```
![Parse Error](assets/migrations/1.2.3-to-1.3.png)

Change all your quest scripts, making the following changes:

```gdscript
# script that inherits from Quest
BEFORE
func start() -> void:
...
func update() -> void:
...
func complete() -> void:
...
AFTER
func start(_args: Dictionary = {}) -> void:
...
func update(_args: Dictionary = {}) -> void:
...
func complete(_args: Dictionary = {}) -> void:
...
```

0 comments on commit e9e655b

Please sign in to comment.