Add multi-hotel Habbo gamedata locale in CMS settings.
Local Build and Deploy / deploy (push) Failing after 33s
Local Build and Deploy / deploy (push) Failing after 33s
Furni name suggestions, import enrichment, and badge texts now follow habbo_gamedata_hotel instead of hardcoded habbo.it. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
7bc0845932
commit
d1baaf798a
15 files changed
+275
-65
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { promises as fs } from "node:fs";
|
||||
import { Prisma } from "@/generated/prisma/client";
|
||||
import { getHabboGamedataHotel } from "@/lib/habbo-gamedata-hotel";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import { getFurnitureDataPath } from "@/lib/services/furni-data";
|
||||
|
||||
@@ -128,6 +129,8 @@ export interface CatalogItemsData {
|
||||
furniRevisionMap: Record<number, { classname: string; revision: number }>;
|
||||
interactionTypes: string[];
|
||||
allPages: { id: number; caption: string }[];
|
||||
/** CMS `habbo_gamedata_hotel` — locale used for Suggest names */
|
||||
gamedataHotel: string;
|
||||
}
|
||||
|
||||
export async function loadCatalogItemsData(
|
||||
@@ -160,7 +163,7 @@ export async function loadCatalogItemsData(
|
||||
clubOnly: String(r.club_only ?? "0"),
|
||||
}));
|
||||
|
||||
const [allPages, interactionTypesRaw] = await Promise.all([
|
||||
const [allPages, interactionTypesRaw, gamedataHotel] = await Promise.all([
|
||||
prisma.catalogPages.findMany({
|
||||
orderBy: { caption: "asc" },
|
||||
select: { id: true, caption: true },
|
||||
@@ -168,6 +171,7 @@ export async function loadCatalogItemsData(
|
||||
prisma.$queryRaw<Array<{ interaction_type: string }>>`
|
||||
SELECT DISTINCT interaction_type FROM items_base ORDER BY interaction_type ASC
|
||||
`,
|
||||
getHabboGamedataHotel(),
|
||||
]);
|
||||
|
||||
const interactionTypes = interactionTypesRaw.map((r) =>
|
||||
@@ -319,5 +323,6 @@ export async function loadCatalogItemsData(
|
||||
furniRevisionMap,
|
||||
interactionTypes,
|
||||
allPages,
|
||||
gamedataHotel,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user