xxscreeps-mod-client 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/backend.js +2 -2
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -33,7 +33,7 @@ SCREEPS_MOD_CLIENT_MOUNT_PATH=/play npx xxscreeps start
33
33
 
34
34
  ## How it works
35
35
 
36
- The mod resolves the client bundle from its [`screeps-client`](../screeps-client) dependency at runtime — no separate build step is needed. The shipped bundle is built with `base=/` (absolute asset URLs at the server root), which means non-default mount paths require a custom build of `screeps-client` with a matching base.
36
+ The mod resolves the client bundle from its [`screeps-client`](../screeps-client) dependency at runtime — no separate build step is needed. The shipped bundle is built with `base=./`, but the client resolves some assets (e.g. the sprite atlas under `themes/`) against the server root `/`. Mounting anywhere other than `/` therefore breaks those asset URLs and requires a custom build of `screeps-client` with a matching base — which is why the mount path defaults to `/`.
37
37
 
38
38
  ## xxscreeps mode
39
39
 
package/backend.js CHANGED
@@ -54,8 +54,8 @@ function normalizeMount(input) {
54
54
  return p === '' ? '/' : p
55
55
  }
56
56
 
57
- const mountPath = normalizeMount(process.env.SCREEPS_MOD_CLIENT_MOUNT_PATH ?? '/client')
58
- const rootRedirect = readBool('SCREEPS_MOD_CLIENT_ROOT_REDIRECT', true)
57
+ const mountPath = normalizeMount(process.env.SCREEPS_MOD_CLIENT_MOUNT_PATH ?? '/')
58
+ const rootRedirect = readBool('SCREEPS_MOD_CLIENT_ROOT_REDIRECT', mountPath !== '/')
59
59
 
60
60
  // Paths that should never be handled by the client mod, even when mounted at '/'.
61
61
  // Can be overridden via SCREEPS_MOD_CLIENT_EXCLUDE (comma-separated prefixes).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xxscreeps-mod-client",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "xxscreeps mod that serves the screeps-client and connects it to the same server.",
5
5
  "type": "module",
6
6
  "xxscreeps": true,
@@ -23,7 +23,7 @@
23
23
  "node": ">=20"
24
24
  },
25
25
  "dependencies": {
26
- "screeps-client": "^0.12.1"
26
+ "screeps-client": "^0.12.2"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "xxscreeps": "*"