SceneLink: Add a special case for "go home"#2569
Conversation
| enum Target { | ||
| ## The scene specified in [member SceneLink.next_scene]. | ||
| SPECIFIED_SCENE, | ||
| ## The scene from [const ThreadbareProjectSettings.HOME_SCENE], typically | ||
| ## Fray's End. Use this at the end of quests. | ||
| HOME_SCENE, | ||
| } |
There was a problem hiding this comment.
I was considering just a "go home" boolean to override the specific scene, but this is more future-proof, it covers potential new special cases. So 👍
Previously, the last scene of every quest (and Sokoban trio) hardcoded the path (or rather UID) to Fray's End. I want to make a stripped-back version of the repo that does not contain Fray's End or any StoryQuests or LoreQuests as a StoryQuest kit; yet the last scene of the template quest hardcodes the UID to Fray's End. I want to make it possible to change the scene that follows a quest being completed without modifying every quest in the game. Add a flag to SceneLink (represented with an `enum` with two values for future extensibility and self-documentation reasons) which, if set, means that the link points to the "home scene" configured in the project settings rather than a specific path/UID. Update the final scene of all quests, and all Sokoban trios, to use this new flag rather than hardcoding the Fray's End UID, with one exception. I kept the explicit reference to Fray's End in `scenes/quests/lore_quests/quest_000/6_grappling/tutorial_grappling.tscn` because it also sets a particular spawn point, and doing that doesn't make sense with a generic "home scene" link. Helps #2563
9dd6e4d to
4fef79d
Compare
|
Play this branch at https://play.threadbare.game/branches/endlessm/wjt/scenelink-add-a-special-case-for-go-home/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
manuq
left a comment
There was a problem hiding this comment.
Looks great. The only caveat I see is that by using the home scene there is no way to specify the spawn point.
In the description I read:
I kept the explicit reference to Fray's End in
scenes/quests/lore_quests/quest_000/6_grappling/tutorial_grappling.tscn
because it also sets a particular spawn point, and doing that doesn't
make sense with a generic "home scene" link.
Seems a conscious design decision, so 👍
|
Ah... Actually that's not entirely intentional, I thought it worked for the spawn points in Fray's End. But perhaps I should disable the spawn point property entirely in "go home" mode. |
|
Works for me.
I think you were testing a version of this branch without #2567 - which fixed exactly that pre-existing problem of the spawn point path choices not getting listed for Cinematic. |
That is great! Yes probably I did |




Previously, the last scene of every quest (and Sokoban trio) hardcoded
the path (or rather UID) to Fray's End.
I want to make a stripped-back version of the repo that does not contain
Fray's End or any StoryQuests or LoreQuests as a StoryQuest kit; yet the
last scene of the template quest hardcodes the UID to Fray's End. I want
to make it possible to change the scene that follows a quest being
completed without modifying every quest in the game.
Add a flag to SceneLink (represented with an
enumwith two values forfuture extensibility and self-documentation reasons) which, if set,
means that the link points to the "home scene" configured in the project
settings rather than a specific path/UID.
Update the final scene of all quests, and all Sokoban trios, to use this
new flag rather than hardcoding the Fray's End UID, with one exception.
I kept the explicit reference to Fray's End in
scenes/quests/lore_quests/quest_000/6_grappling/tutorial_grappling.tscnbecause it also sets a particular spawn point, and doing that doesn't
make sense with a generic "home scene" link.
Helps #2563