handlers: item inventory — equip, favourite, sell, mix, and tutorial seeding - #33
Open
Seltraeh wants to merge 1 commit into
Open
handlers: item inventory — equip, favourite, sell, mix, and tutorial seeding#33Seltraeh wants to merge 1 commit into
Seltraeh wants to merge 1 commit into
Conversation
…seeding Implements the item inventory against the user_items table. ItemSphereEqp equips and unequips spheres, moving them between the warehouse and the unit's two sphere slots. ItemSell converts stacks to zel using the per-item price from item_mst. ItemFavorite persists the lock flag. ItemMix credits the compounded result through addUserItem. ItemEdit acknowledges the pre-mission item loadout so preparing a loadout no longer closes the session. Tutorial seeds a single starter potion through CreateUser, so a new account grows its inventory naturally instead of receiving a hardcoded response. UserInfo now builds warehouse_info, equip_info, item_dictionary_info and item_favorite from the table, replacing the hardcoded potion and its TODO. Stacks decrement rather than delete so instance ids stay stable across sells; zero-quantity rows are filtered off the wire but still feed the item dictionary, so a species stays in the encyclopedia once seen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
handlers: item inventory — equip, favourite, sell, mix, and tutorial seeding
Branch:
split/04-itemsBase:
devMerge position: 04 of 13
First gameplay PR. Implements the item inventory against
user_items.What's included
ItemSphereEqp0IXGiC9tItemSellqDQerU74item_mstpriceItemFavoriteI8il6EiIItemMix4P5GELTFItemEditruoB7bD8ItemEditmatters more than its size suggests: without it, preparing a mission item loadout closes the session.Tutorial seeds one starter potion through
CreateUser, so a new account grows its inventory naturally rather than receiving a hardcoded response.Design note
Stacks decrement rather than delete, so
instance_idstays stable across sells — the client holds these ids and reusing them causes mismatches. Zero-quantity rows are filtered off the wire but still feed the item dictionary, so a species stays in the encyclopedia once seen.Verification
Tutorial completes with a potion in inventory; equip/unequip round-trips; sell credits zel and leaves the stack row intact at zero.