Add SCUM entity catalog with extracted map and icons

- Import 2492 entity records (2391 items, 54 vehicles, 25 zombies, 12 animals, 10 armed NPCs) with spawn commands and icon names from the SCUM Admin Helper 0.4.0.5 payload.
- Ship the 2604 extracted item/NPC icons plus 4096 terrain, topo, night and building-zone map layers.
- Resolve vehicle icons through the catalog so live-map and trajectory markers cover every known vehicle class.
- Point map geometry and the live map background at the 4096 terrain layer.
This commit is contained in:
npc0-hue
2026-09-15 15:56:44 +08:00
parent 05f5a97ba9
commit 59a8657297
2614 changed files with 2580 additions and 27 deletions
+2 -2
View File
@@ -313,7 +313,7 @@ describe("plugin manifest validation", () => {
const serialized = JSON.stringify(manifest).toLowerCase();
expect(serialized).not.toContain("local-proof");
expect(manifest.version).toBe("0.1.16");
expect(manifest.version).toBe("0.1.17");
expect(installAction.environment?.SERVER_TEMPLATE).toBe("scum-server");
expect(manifest.permissions).toEqual(expect.arrayContaining(["server.game-client.read", "server.game-client.command", "server.game-client.maintenance"]));
expect(manifest.gameClientBridge.commands.map((command) => command.type)).toEqual(expect.arrayContaining([
@@ -510,7 +510,7 @@ describe("plugin manifest validation", () => {
const mapGeometry = JSON.parse(fs.readFileSync(path.join(pluginDir, pack!.dataRefs![1]), "utf8"));
expect(configMaps.maps.map((map: { key: string }) => map.key)).toEqual(expect.arrayContaining(["server-settings", "economy-override", "raid-times", "notifications", "admin-users", "banned-users"]));
expect(giftMetadata).toMatchObject({ databaseUserVersion: 57, catalogSource: { configMapKey: "economy-override" } });
expect(mapGeometry).toMatchObject({ databaseUserVersion: 57, image: { path: "assets/map/scum-map-overview.jpg", width: 256, height: 256 }, runtimeOverride: { kilometersToWorldUnits: 100000 } });
expect(mapGeometry).toMatchObject({ databaseUserVersion: 57, image: { path: "assets/map/scum-map-terrain-4096.webp", width: 4096, height: 4096 }, runtimeOverride: { kilometersToWorldUnits: 100000 } });
});
+2 -2
View File
@@ -287,8 +287,8 @@ describe("SCUM plugin feature module", () => {
expect(view.texts).toContain("地图点详情");
expect(view.texts).toContain("Airfield");
expect(view.texts.join("\n")).toContain("X 800 / Y 900 / Z 10");
expect(pageSource).toContain('new URL("../assets/map/scum-map-overview.jpg", import.meta.url).href');
expect(view.elements.find((element) => element.label === "SCUM 地图图层")?.style?.backgroundImage).toContain("scum-map-overview.jpg");
expect(pageSource).toContain('new URL("../assets/map/scum-map-terrain-4096.webp", import.meta.url).href');
expect(view.elements.find((element) => element.label === "SCUM 地图图层")?.style?.backgroundImage).toContain("scum-map-terrain-4096.webp");
expect(view.inputs.map((input) => input.label)).toEqual(expect.arrayContaining(["启用自定义地图", "地图中心 X", "地图中心 Y", "地图宽度公里", "地图高度公里"]));
const vehicleView = renderAndCollect({ pageKey: "live-map", pageTitle: "实时地图", data: { ...surfaceData, players: [], mapPoints: [], flags: [], mapRegions: [] } });
expect(vehicleView.texts).toEqual(expect.arrayContaining(["锁 已上锁", "scum-user-1", "76561198000000001"]));