feat: auto-repair sprite_id drift after every import
The emulator sends items_base.sprite_id to the client and Nitro resolves the furniture by looking up that id in FurnitureData.json. Legacy rows where sprite_id drifted from the id made the client render a completely different item (e.g. a wired or custom asset instead of the purchased furniture). Add verifyAndFixSpriteIds() which repairs any row whose sprite_id no longer matches its id while the local furnidata carries the item under that id, and run it after every import path (single, batch, batch-regen, clone) next to the offer_id rebuild.
This commit is contained in:
1 parent
92b0ba3b18
commit
984b5bf793
5 files changed
+84
No files matched your search
@@ -12,6 +12,7 @@ import {
|
||||
appendFurniEntry,
|
||||
rebuildCatalogOfferIds,
|
||||
reconcileFurniDataWithItemsBase,
|
||||
verifyAndFixSpriteIds,
|
||||
} from "@/lib/services/furni-data";
|
||||
import {
|
||||
ensureFurniOwnership,
|
||||
@@ -144,6 +145,7 @@ export const POST = withAdmin(
|
||||
await reconcileImportedOfferIds();
|
||||
await reconcileFurniDataWithItemsBase();
|
||||
await rebuildCatalogOfferIds();
|
||||
await verifyAndFixSpriteIds();
|
||||
await verifyAndFixInteractionModesCount();
|
||||
await ensureFurniOwnership();
|
||||
await syncAssetsToGamedataBundle();
|
||||
|
||||
Reference in new issue
Block a user