feat(clone): add hotel field to clone source presets
- CloneSource interface now has a hotel field (maps to habbo_gamedata_hotel) - DEFAULT_SOURCES presets include their associated hotel (it/com) - When cloning from a source with a hotel configured, habbo_gamedata_hotel is set automatically so official furnidata enrichment uses the correct locale - Clone source form UI now has a hotel select dropdown - Source list shows the hotel label when configured - Clone API route passes hotel through to upsertSource
This commit is contained in:
1 parent
79b82e0a31
commit
936053cca6
5 files changed
+53
-1
No files matched your search
@@ -7,6 +7,7 @@ export interface CloneSource {
|
||||
furnidataUrl: string;
|
||||
nitroBaseUrl: string;
|
||||
iconBaseUrl: string;
|
||||
hotel: string;
|
||||
}
|
||||
|
||||
const KEY = "clone_sources";
|
||||
@@ -23,6 +24,7 @@ export const DEFAULT_SOURCES: CloneSource[] = [
|
||||
"https://raw.githubusercontent.com/Izzxt/habbo-resource/master/gamedata/furnidata.json",
|
||||
nitroBaseUrl: "",
|
||||
iconBaseUrl: "",
|
||||
hotel: "it",
|
||||
},
|
||||
{
|
||||
id: "default-wibbo",
|
||||
@@ -30,6 +32,7 @@ export const DEFAULT_SOURCES: CloneSource[] = [
|
||||
furnidataUrl: "https://assets.wibbo.org/gamedata/FurnitureData.json",
|
||||
nitroBaseUrl: "https://assets.wibbo.org/bundled/furniture",
|
||||
iconBaseUrl: "https://assets.wibbo.org/icons",
|
||||
hotel: "com",
|
||||
},
|
||||
{
|
||||
id: "default-hubba",
|
||||
@@ -37,6 +40,7 @@ export const DEFAULT_SOURCES: CloneSource[] = [
|
||||
furnidataUrl: "https://nitro.hubba.cc/gamedata/FurnitureData.json",
|
||||
nitroBaseUrl: "https://nitro.hubba.cc/bundled/furniture",
|
||||
iconBaseUrl: "",
|
||||
hotel: "com",
|
||||
},
|
||||
{
|
||||
id: "default-sodaho",
|
||||
@@ -44,6 +48,7 @@ export const DEFAULT_SOURCES: CloneSource[] = [
|
||||
furnidataUrl: "https://assets.sodaho.tel/gamedata/FurnitureData.json",
|
||||
nitroBaseUrl: "",
|
||||
iconBaseUrl: "",
|
||||
hotel: "com",
|
||||
},
|
||||
{
|
||||
id: "default-leet",
|
||||
@@ -51,6 +56,7 @@ export const DEFAULT_SOURCES: CloneSource[] = [
|
||||
furnidataUrl: "https://www.leet.ws/gamedata/furnidata.json",
|
||||
nitroBaseUrl: "https://www.leet.ws/nitro/bundled/furniture",
|
||||
iconBaseUrl: "https://www.leet.ws/nitro/icons",
|
||||
hotel: "com",
|
||||
},
|
||||
{
|
||||
id: "default-hubbly",
|
||||
@@ -58,6 +64,7 @@ export const DEFAULT_SOURCES: CloneSource[] = [
|
||||
furnidataUrl: "https://www.hubbly.pw/gamedata/furnidata.json",
|
||||
nitroBaseUrl: "https://www.hubbly.pw/nitro/bundled/furniture",
|
||||
iconBaseUrl: "https://www.hubbly.pw/nitro/icons",
|
||||
hotel: "com",
|
||||
},
|
||||
{
|
||||
id: "default-habbletcity",
|
||||
@@ -65,6 +72,7 @@ export const DEFAULT_SOURCES: CloneSource[] = [
|
||||
furnidataUrl: "https://www.habblet.city/gamedata/furnidata.json",
|
||||
nitroBaseUrl: "https://www.habblet.city/nitro/bundled/furniture",
|
||||
iconBaseUrl: "https://www.habblet.city/nitro/icons",
|
||||
hotel: "com",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -96,6 +104,7 @@ export async function upsertSource(
|
||||
furnidataUrl: src.furnidataUrl.trim(),
|
||||
nitroBaseUrl: src.nitroBaseUrl.trim().replace(/\/+$/, ""),
|
||||
iconBaseUrl: src.iconBaseUrl.trim().replace(/\/+$/, ""),
|
||||
hotel: (src.hotel ?? "").trim(),
|
||||
};
|
||||
const idx = sources.findIndex((s) => s.id === entry.id);
|
||||
if (idx >= 0) sources[idx] = entry;
|
||||
|
||||
Reference in new issue
Block a user