mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Add version system, tax tracking, lottery winner DMs, fmtEuro, audit fixes
- Version system: per-plugin versions via Versioned interface, crash_log and version_history DB tables, !version command, crash stats in !botinfo - Tax tracking: tax_ledger table, trackTaxPaid across all communityTax and communityPotAdd sites, tax paid display in !stats and !superstatsexplusalpha - Lottery: DM winners with winning ticket details and matched numbers bolded - fmtEuro: generic currency formatter with thousand separators across all economy display paths - Audit fixes: streak_decayed column for Streak Survivor achievement, combat_narrative empty-phase guard, crafting success rate integer division, RecordCrash nil-DB guard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2564,7 +2564,8 @@ func (p *UnoPlugin) multiPlayerWins2(game *unoMultiGame, winner *unoMultiPlayer)
|
||||
}
|
||||
}
|
||||
totalPot := game.ante * float64(humanCount+game.botAntes)
|
||||
p.euro.Credit(winner.userID, totalPot, "uno_multi_win")
|
||||
net, _ := communityTax(winner.userID, totalPot, 0.05)
|
||||
p.euro.Credit(winner.userID, net, "uno_multi_win")
|
||||
|
||||
p.recordMultiGame(game, winner.userID, "sudden_death_win")
|
||||
p.cleanupMultiGame(game)
|
||||
@@ -2614,9 +2615,10 @@ func (p *UnoPlugin) multiPlayerWins(game *unoMultiGame, winner *unoMultiPlayer)
|
||||
}
|
||||
}
|
||||
totalPot := game.ante * float64(humanCount+game.botAntes)
|
||||
net, _ := communityTax(winner.userID, totalPot, 0.05)
|
||||
|
||||
name := p.DisplayName(winner.userID)
|
||||
p.euro.Credit(winner.userID, totalPot, "uno_multi_win")
|
||||
p.euro.Credit(winner.userID, net, "uno_multi_win")
|
||||
|
||||
p.SendMessage(game.roomID, fmt.Sprintf(
|
||||
"🎉 **%s wins Multiplayer UNO!**\nPot: €%d | Turns: %d\n\n%s",
|
||||
|
||||
Reference in New Issue
Block a user