Backfill icons too in the Gamedata bundle sync
CI / check (push) Successful in 38s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m28s

Extend the post-import backfill to also copy missing _icon.png files
into /var/www/Gamedata/icons (in addition to nitros into
bundled/furniture) so all imported furniture shows an icon in-game.
Report copied nitros and icons separately in the API/SSE responses.
This commit is contained in:
openhands committed 2026-08-18 20:35:48 +02:00
1 parent bcd24bfca4
commit b4021f6b42
4 files changed
+99 -54

No files matched your search

+8 -6
View File
@@ -22,7 +22,7 @@ import {
importSingleFurni,
reconcileImportedOfferIds,
resetCatalogPageCache,
syncNitrosToGamedataBundle,
syncAssetsToGamedataBundle,
} from "@/lib/services/furni-import";
import { getOfficialHabboFurnidata } from "@/lib/services/habbo-furnidata-cache";
import { listFurniture } from "@/lib/services/habbofurni";
@@ -413,7 +413,7 @@ export const POST = withAdmin(
const ownership = await ensureFurniOwnership();
// Backfill any missing nitros into the emulator's Gamedata bundle
const nitrosSynced = await syncNitrosToGamedataBundle();
const assetsSynced = await syncAssetsToGamedataBundle();
const succeeded = results.filter((r) => r.ok).length;
const failed = results.filter((r) => !r.ok).length;
@@ -425,7 +425,8 @@ export const POST = withAdmin(
results,
offerIdsFixed: reconciled.fixed,
ownershipFixed: ownership.fixed,
nitrosSynced: nitrosSynced.copied,
nitrosSynced: assetsSynced.copiedNitros,
iconsSynced: assetsSynced.copiedIcons,
});
}
@@ -481,8 +482,8 @@ export const POST = withAdmin(
// Keep asset + furnidata folders readable by the web server
const ownership = await ensureFurniOwnership();
// Backfill any missing nitros into the emulator's Gamedata bundle
const nitrosSynced = await syncNitrosToGamedataBundle();
// Backfill any missing nitros and icons into the emulator's Gamedata bundle
const assetsSynced = await syncAssetsToGamedataBundle();
logAudit({
userId: ctx.session.user.id,
@@ -506,7 +507,8 @@ export const POST = withAdmin(
catalogItemId: result.catalogItemId,
offerIdsFixed: reconciled.fixed,
ownershipFixed: ownership.fixed,
nitrosSynced: nitrosSynced.copied,
nitrosSynced: assetsSynced.copiedNitros,
iconsSynced: assetsSynced.copiedIcons,
spriteCount: result.spriteCount,
warnings: result.warnings,
});