Points are the core currency of every HADOS dice tournament. Each player’s score is stored as a decimal number in Firestore, and the full ranking is recalculated and saved in a single atomic batch write every time any score changes. This guarantees that the leaderboard is always consistent — no manual sorting or refresh is required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/VasquezRivero92/HabboCafe/llms.txt
Use this file to discover all available pages before exploring further.
Who Can Modify Points
Access to point-management tools is controlled by thecanModifyPoints() check in the app. The following roles pass this check:
| Role | Scope |
|---|---|
global_admin | Can modify points in any Dado |
dado_admin | Can modify points in their own Dado |
intermediario | Can modify points in the Dado they are assigned to |
jugador role see the leaderboard in read-only mode. The “Cargar puntos” button, the “Crear Usuario” button, and all quick-add action columns are hidden for them.
The role displayed in the top-right corner of the navbar reflects your active role in the currently selected Dado, not your global role. If you are a Global Admin viewing a specific Dado, you see
global admin. If you are a jugador in that Dado, you see jugador — even if you have a higher role elsewhere.Method 1 — Quick-Add Buttons
The fastest way to award or deduct points is to use the inline quick-add buttons that appear in List and Grid view modes when you have the right role. List view shows a+10 and +50 button in the Acciones column of every player row.
Grid view shows four buttons on each player card: +10, +50, -10, and -50.
Clicking any of these buttons immediately calls handleQuickAddPoints, which:
- Adds the chosen amount to the player’s current
pointsvalue (floored at0). - Rounds the result to one decimal place using
toFixed(1). - Triggers
updateRanksAndSaveto re-sort and batch-write the entire Dado’s rankings.
Method 2 — Cargar Puntos Modal
For precise adjustments — including fractional values or deductions — use the “Cargar Puntos” modal, opened by clicking the “Cargar puntos” button in the filter bar above the leaderboard.Open the modal
Click the “Cargar puntos” button (purple accent colour) in the action bar above the leaderboard. The modal “Cargar Puntos a Usuario” opens.
Search for the player
Click the “Seleccionar Usuario” combobox and start typing the player’s Habbo username. The dropdown filters in real time and shows each player’s current points next to their avatar thumbnail. Click the desired player to select them.
Enter the points value
Type the number of points to add into the “Puntos a Cargar” field. The field accepts:
- Integers — e.g.
25 - Decimals — e.g.
15.5 - Negative values — e.g.
-10to subtract points
Review the live preview
As soon as a valid number is entered, a preview box appears showing:
Puntos actuales: X → Nuevo total: YThe new total is calculated as
currentPoints + enteredValue, rounded to one decimal place. Verify this before confirming.How Rankings Are Recalculated
After every point change — whether from a quick-add button or the modal — HADOS runsupdateRanksAndSave:
- All players in the active Dado are sorted descending by points.
- Each player’s
previousRankis set to their currentcurrentRankbefore the update. - Each player’s
currentRankis set to their new position (index + 1). - All updates are submitted as a single Firestore batch write, so no partial states are visible to other users.
- The
lastUpdatedTextdisplay value resets to “hace unos instantes”.
Points Precision
All point values are stored and displayed to one decimal place. The calculationparseFloat((value).toFixed(1)) is applied on every write, so:
15is stored and shown as15(or15.0internally)15.55entered by the user becomes15.6after rounding0.04added to0becomes0(rounds to0.0)
es-ES locale formatter, so large values appear with period-separated thousands — e.g. 1.250 for twelve hundred and fifty points.