5180 fichiers 38.5 Mo 0 téléchargements 208 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / api / avatar / FootballGateLook.ts
FootballGateLook.ts 1.1 Ko Télécharger le fichier
/**
 * The football gate (clothing change furni) editor, as AIR's FurnitureClothingChangeWidgetHandler:
 * it opens on the look the gate stored for the chosen gender (`furniture_clothing_boy` / `_girl`),
 * or on these looks when the gate has none, in the normal torso and legs tabs.
 */
export const DEFAULT_MALE_FOOTBALL_GATE_LOOK = 'hd-99999-99999.lg-270-62';
export const DEFAULT_FEMALE_FOOTBALL_GATE_LOOK = 'hd-99999-99999.ch-630-62.lg-695-62';

/** The look the gate editor opens on for `gender` ('M' or 'F'). */
export const getFootballGateLook = (gender: string, boyLook: string | null | undefined, girlLook: string | null | undefined): string => {
    if (gender === 'F') return girlLook || DEFAULT_FEMALE_FOOTBALL_GATE_LOOK;

    return boyLook || DEFAULT_MALE_FOOTBALL_GATE_LOOK;
};

/** Who may edit a gate: the room owner, an any-room controller, or anyone with rights in the room (controller level 1+). */
export const canEditFootballGate = (isRoomOwner: boolean, isAnyRoomController: boolean, controllerLevel: number): boolean =>
    !!isRoomOwner || !!isAnyRoomController || (controllerLevel ?? 0) >= 1;
15Sujets
1Dépôts
20Membres
2En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser