Repository navigation
feat(host): build maps.json and skins.json on the host and serve them - #150
Merged
Merged
Conversation
csm builds both catalogs from the master install's pak01, keeps them in its state dir and rebuilds them when pak01 changes. The platform asks with host.asset set catalog (hosts list catalog.v1). The skin builder is the old Python script in Go; against a real install its output matches the committed skins.json field for field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
csm builds both catalogs from the master install's
pak01_dir.vpkand keeps them in its state folder (catalog/). They are built again only when pak01 changes, that is after a CS2 update. The platform asks for them withhost.assetsetcatalog(filemaps.jsonorskins.json), and hosts that can do this listcatalog.v1in hello. The platform side is in auto-tournament.buildSkinsCatalogis the Python script fromskin_extract.goin Go, using the existing KeyValues parser. Against a real install its output matches the committedskins.jsonfield for field (2128 skins).maps.jsonreusesbuildMapsManifest, with the screenshots and icons read from pak01's file list. It no longer lists four maps the game dropped, which the committed file still carried.Review:
csm/catalog.go, in particular the cache key (pak01's size and mtime), and the newcatalogcheck invalidateCommand.🤖 Generated with Claude Code