Repository navigation
Web map icons come from each server's own mod pack - #427
Merged
Merged
Conversation
…he default pack and then the newest exported pack; a missing icon names the pack
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.
The web map drew every icon from the controller's default mod pack. When that pack has no exported icons (pve7's default is the stock "Space Age 2.1" pack) every planet on the server cards showed "?", even though each server runs a pack whose icons were exported.
modPackIdfrom the instance'sfactorio.mod_pack_id(lib/platform-tree.ts,shared/dto.ts,web/gateway/gateway-graph.ts).web/icons.tsxaddsIconPackScope.InstanceNodewraps each card in its server's pack, so the planet strip, gateway art and platform rows use it.shared/icon-pack.tspicks the pack: the scoped pack if it has exported metadata, else the default pack if it has, else the most recently updated exported pack. Pages that are not about one server (the transfer logs) use the same order without a scope.Checks:
build-plugin.ps1 test: 1019 pass, 0 fail (new:icon-pack.test.cjsselection order, deleted and metadata-less packs, deterministic ties;platform-tree-planetscarriesmodPackId).build-plugin.ps1 lint: OK.build-plugin.ps1 -Target all: node build,tsc -p tsconfig.browser.json --noEmitand the webpack bundle succeed.