Skip to content

Move inventory to QuestState#2388

Merged
manuq merged 1 commit into
mainfrom
wjt/inventory-in-quest
Jun 16, 2026
Merged

Move inventory to QuestState#2388
manuq merged 1 commit into
mainfrom
wjt/inventory-in-quest

Conversation

@wjt

@wjt wjt commented Jun 16, 2026

Copy link
Copy Markdown
Member

Move inventory to QuestState

Previously the inventory was stored in GlobalState, but was cleared when
starting or abandoning a quest, because the only collectible items are
the threads of Memory, Imagination, and Spirit that are found during
quests.

Move the inventory to the QuestState. Represent it as a separate
resource. I anticipate that we may want a global inventory as well in
future, with items moving from the QuestState to the GlobalState. But I
also think it makes the code easier to read in both places.

Previously the inventory was stored in GlobalState, but was cleared when
starting or abandoning a quest, because the only collectible items are
the threads of Memory, Imagination, and Spirit that are found during
quests.

Move the inventory to the QuestState. Represent it as a separate
resource. I anticipate that we may want a global inventory as well in
future, with items moving from the QuestState to the GlobalState. But I
also think it makes the code easier to read in both places.
@wjt wjt requested review from a team as code owners June 16, 2026 08:44
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/inventory-in-quest/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@manuq manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice cleanup. Yes it makes more sense that the current threads are part of the quest state.

@manuq manuq merged commit 72c71ff into main Jun 16, 2026
7 checks passed
@manuq manuq deleted the wjt/inventory-in-quest branch June 16, 2026 14:22
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