feat: add lifetime total tracking (step 8)

Accumulate lifetimeTotal on every positive PLAYER_MONEY delta and
persist to SavedVariables so it survives /reload and Reset. Display
a 'Lifetime: Xg Ys Zc' label on the HUD frame. Also fix missing
closing 'end' in SlashCmdList closure.
This commit is contained in:
bepis
2026-10-19 21:28:51 +11:00
parent 9a30efa170
commit f7e32111f1
3 changed files with 128 additions and 12 deletions
Regular → Executable
+2 -2
View File
@@ -42,7 +42,7 @@ Each step should be independently testable in game before moving on.
4. **Frame:** Movable frame with labels for earned gold and per-hour rate. No drag yet. ✅ DONE
5. **Drag and save position:** Drag support + save point on `OnDragStop` + restore on login.
6. **Reset button:** On-frame button that zeroes session counters and resets `sessionStart`.
7. **Slash command:** `/gt` toggle, `/gt reset` wired to the same reset logic.
8. **Lifetime total:** Add `sessionEarned` to `lifetimeTotal` on `PLAYER_LOGOUT`.
7. **Slash command:** `/gt` toggle, `/gt reset` wired to the same reset logic. ✅ DONE
8. **Lifetime total:** Accumulate `lifetimeTotal` on every positive `PLAYER_MONEY` delta (robust against Reset), persist to SavedVariables. ✅ DONE
9. **Polish:** Format display cleanly, add a tooltip, test across a /reload.