Skip to content

Web map icons come from each server's own mod pack - #427

Merged
solarcloud7 merged 1 commit into
mainfrom
feat/icon-pack-per-instance
Oct 18, 2026
Merged

solarcloud7 merged 1 commit into
mainfrom
feat/icon-pack-per-instance

Conversation

@solarcloud7

Copy link
Copy Markdown
Owner

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.

  • The controller's instance card data carries modPackId from the instance's factorio.mod_pack_id (lib/platform-tree.ts, shared/dto.ts, web/gateway/gateway-graph.ts).
  • web/icons.tsx adds IconPackScope. InstanceNode wraps each card in its server's pack, so the planet strip, gateway art and platform rows use it.
  • shared/icon-pack.ts picks 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.
  • A missing icon's tooltip names the pack ("icons are not exported for mod pack …" or "no icon in mod pack …") instead of a bare "?".

Checks:

  • build-plugin.ps1 test: 1019 pass, 0 fail (new: icon-pack.test.cjs selection order, deleted and metadata-less packs, deterministic ties; platform-tree-planets carries modPackId).
  • build-plugin.ps1 lint: OK. build-plugin.ps1 -Target all: node build, tsc -p tsconfig.browser.json --noEmit and the webpack bundle succeed.
  • Not run: a browser check. The development cluster cannot reproduce this (its instances have no pack of their own and its default pack is exported); the reproduction is pve7, after a release.

…he default pack and then the newest exported pack; a missing icon names the pack
@solarcloud7
solarcloud7 merged commit fffeb61 into main Oct 18, 2026
7 checks passed
@solarcloud7
solarcloud7 deleted the feat/icon-pack-per-instance branch October 18, 2026 22:03
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