handlers: town facilities and locations with upgrade persistence - #35
Open
Seltraeh wants to merge 1 commit into
Open
handlers: town facilities and locations with upgrade persistence#35Seltraeh wants to merge 1 commit into
Seltraeh wants to merge 1 commit into
Conversation
Implements the town page. TownFacilityUpdate persists the complete facility and location level state the client submits and debits the karma cost. It reads leniently so the envelope keys the client always sends do not fail the parse. TownUpdate and EventTokenInfo are acknowledgement stubs that keep the session alive during in-town navigation and on entering the Event Bazaar. Adds 25042026_CreateUserTownTables for user_town_facilities and user_town_locations. UserInfo emits the three town arrays together. Every entry in town_location_info requires a matching town_location_detail entry: the client dereferences the detail for each location, and an empty detail array crashes the town scene loader. A fresh account has no town rows and sends empty arrays, which the client reads as town-not-available, so this change is inert until a town is provisioned.
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: town facilities and locations with upgrade persistence
Branch:
split/06-townBase:
devMerge position: 06 of 13
Small and inert on fresh accounts.
What's included
TownFacilityUpdate(8v43tz7g) — persists the full facility and location level state the client submits, debits the karma cost. Reads leniently so the envelope keys the client always sends don't fail the parse.TownUpdate(CuQ5oB8U) andEventTokenInfo(f49als4D) — acknowledgement stubs that keep the session alive during in-town navigation and on entering the Event Bazaar.Design note
The three town arrays travel together. The client dereferences the detail entry for every location in the info array, so an empty detail array crashes the town scene loader — hence the synthetic detail entry per location.
Safety
A fresh account has no town rows and sends empty arrays, which the client reads as town-not-available. This PR is inert until a town is provisioned.
Verification
Enter town, upgrade a facility, confirm level and karma persist across a relaunch.