sokko-g/website/src/features/cards/admin/catalogSettings.js
Shinuwa de7e72fb42 Correct the Cards activation notes and update dev dependencies
Warn against copying PORT into cards.env, state which missing values disable
the game, drop wording that only applied to the feature branch, and take the
non-breaking audit fix for development tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:03:03 +01:00

10 lines
626 B
JavaScript

// Rôle : lit les réglages d'ouverture mythique publiés dans le catalogue pour l'administration.
export function openingSettingFor(catalog, scope, targetId) {
const setting = catalog.mythicOpeningSettings?.find((item) => item.scope === scope && item.targetId === targetId);
return { particleShapeId: setting?.particleShapeId || null, particlePaletteId: setting?.particlePaletteId || null };
}
export function withoutOpeningSetting(catalog, scope, targetId) {
return { ...catalog, mythicOpeningSettings: (catalog.mythicOpeningSettings || []).filter((item) => item.scope !== scope || item.targetId !== targetId) };
}