Skip to content

Fix running Storybook scene directly#2205

Merged
manuq merged 1 commit into
mainfrom
wjt/fix-running-storybook-scene-directly
May 18, 2026
Merged

Fix running Storybook scene directly#2205
manuq merged 1 commit into
mainfrom
wjt/fix-running-storybook-scene-directly

Conversation

@wjt
Copy link
Copy Markdown
Member

@wjt wjt commented May 16, 2026

Previously the default value for Storybook.quest_directory was
res://scenes/quests/story_quests.

In commit 226ff24 I moved the call to _enumerate_quests() (which
scans that folder to feast on the quests within) from _ready() (which
is only called once the node enters the tree – but the Elder wants to
check if there are any quests before showing the book) to the setter of
the quest_directory property.

This broke running the scene directly because of a GDScript quirk that
it's taken me nearly two years to notice: setters are not called for
default values!

The StoryQuest Elder only works because it explicitly re-sets the
quest_directory property rather than relying on the default.

Change the default value in the script to empty string. Set it to
res://scenes/quests/story_quests in storybook.tscn instead.

Previously the default value for `Storybook.quest_directory` was
`res://scenes/quests/story_quests`.

In commit 226ff24 I moved the call to `_enumerate_quests()` (which
scans that folder to feast on the quests within) from `_ready()` (which
is only called once the node enters the tree – but the Elder wants to
check if there are any quests before showing the book) to the setter of
the `quest_directory` property.

This broke running the scene directly because of a GDScript quirk that
it's taken me nearly two years to notice: setters are not called for
default values!

The StoryQuest Elder only works because it explicitly re-sets the
`quest_directory` property rather than relying on the default.

Change the default value in the script to empty string. Set it to
`res://scenes/quests/story_quests` in storybook.tscn instead.
@wjt wjt requested a review from a team as a code owner May 16, 2026 18:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

Test build no longer available.

Copy link
Copy Markdown
Collaborator

@manuq manuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good to know for me as well.

@manuq manuq merged commit 90f5f93 into main May 18, 2026
6 checks passed
@manuq manuq deleted the wjt/fix-running-storybook-scene-directly branch May 18, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants