feat(maps): live publish hot-reload without server restart (#11) - #346
Open
Aduersarius wants to merge 1 commit into
Open
feat(maps): live publish hot-reload without server restart (#11)#346Aduersarius wants to merge 1 commit into
Aduersarius wants to merge 1 commit into
Conversation
…fi#11) Publish promotes drafts then notifies the game server to apply published overrides in-process, relocate players trapped on new walls, and tell clients to invalidate map cache so changes appear without reconnecting.
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.
Summary
Implements OpenAO #11: publishing a construction-mode map applies live without restarting the game server, notifies players on that map, relocates anyone trapped on newly blocked tiles, and invalidates the client map cache so graphics/blocks refresh without reconnecting.
Closes #11
How it works
POST /admin/game-data/maps/:mapNum/publishstill promotes draft → published in Postgres.POST /internal/maps/:mapNum/hot-reload(auth viaTOKEN_AUTH) whenGAME_SERVER_INTERNAL_URLis set.blockMapdeltas, relocates stuck players to the nearest walkable tile, and emits[MAP_LIVE_RELOAD] map=N version=V.mapValueCache, and re-applies/maps/:id/overridesin place.GM fallback:
/recargarmapa [n]and/recargarmapas.Differentiation vs #74
Focused #11 PR (not a 6-issue mega-bundle). Adds publish→live notify, player unstuck, and client cache invalidation, which #74's GM-only
/recargarmapapath does not cover.Test plan
npx tsx --test server/src/tests/mapLivePublish.test.ts(nearest walkable, draft filter, blocked deltas, marker parse)GAME_SERVER_INTERNAL_URLpointing at running game server → player on map sees blocks/graphics update; standing on new wall gets relocated/maps/:id/overridesnever returns draft rowsGrantFox OpenAO bounty submission for #11.