Skip to content

handlers: town facilities and locations with upgrade persistence - #35

Open
Seltraeh wants to merge 1 commit into
decompfrontier:devfrom
Seltraeh:split/06-town
Open

handlers: town facilities and locations with upgrade persistence#35
Seltraeh wants to merge 1 commit into
decompfrontier:devfrom
Seltraeh:split/06-town

Conversation

@Seltraeh

@Seltraeh Seltraeh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

handlers: town facilities and locations with upgrade persistence

Branch: split/06-town
Base: dev
Merge position: 06 of 13

Part of the PR #28 split. Each PR branches from dev and contains only its
own changes, so this diff is exactly one subsystem. The set is designed to be
merged in numeric order; merging all 13 reproduces PR #28 byte for byte
(verified against tree 79a4e065).

Later PRs in the series touch Handlers.hpp, GmeControllerHandlers.cpp and
UserInfo.cpp too, so once earlier ones land this branch may need a rebase.
Those conflicts are always additions on both sides — keep both. Maintainer
edits are enabled, so feel free to push the rebase directly to this branch.

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) and EventTokenInfo (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.

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.
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.

1 participant