snapshot migration subPhase 5.5

This commit is contained in:
DeSqBlocki
2026-08-27 19:50:12 +02:00
parent 9710fc65bf
commit 14a059034c
7 changed files with 154 additions and 126 deletions
+50 -39
View File
@@ -447,56 +447,59 @@ async function steal(interaction) {
* Thief stats. * Thief stats.
*/ */
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
user.id, user.id,
{ {
type: type: "steal_success",
"steal_success", source: "steal",
amount, amount,
targetUserId: targetUserId:
target.id target.id
} }
); );
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
user.id, user.id,
{ {
type: type: "cookie_gain",
"cookie_gain", source: "steal",
amount amount,
targetUserId:
target.id
} }
); );
/* /*
* Victim stats. * Victim stats.
*/ */
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
target.id, target.id,
{ {
type: type: "stolen_from_me",
"stolen_from_me", source: "steal",
amount, amount,
thiefUserId: thiefUserId:
user.id user.id
} }
); );
await trackProfileEvent(
await trackProfileEvent(
interaction, interaction,
target.id, target.id,
{ {
type: type: "cookie_loss",
"cookie_loss", source: "steal",
amount amount,
thiefUserId:
user.id
} }
); );
const [ const [
@@ -653,28 +656,32 @@ async function steal(interaction) {
* Profile tracking. * Profile tracking.
*/ */
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
user.id, user.id,
{ {
type: type: "cookie_loss",
"cookie_loss", source: "steal_penalty",
amount: amount:
penalty penalty,
targetUserId:
target.id
} }
); );
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
target.id, target.id,
{ {
type: type: "cookie_gain",
"cookie_gain", source: "steal_penalty",
amount: amount:
penalty penalty,
thiefUserId:
user.id
} }
); );
const [ const [
@@ -902,30 +909,34 @@ async function give(interaction) {
* Sender lifetime giving. * Sender lifetime giving.
*/ */
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
user.id, user.id,
{ {
type: type: "cookies_given",
"cookies_given", source: "give",
amount amount,
targetUserId:
target.id
} }
); );
/* /*
* Recipient lifetime gain. * Recipient lifetime gain.
*/ */
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
target.id, target.id,
{ {
type: type: "cookie_gain",
"cookie_gain", source: "give",
amount amount,
senderUserId:
user.id
} }
); );
const [ const [
+5 -3
View File
@@ -161,14 +161,16 @@ async function declareBankruptcy(interaction, userId = interaction.user.id) {
}; };
} }
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
userId, userId,
{ {
type: "cookie_gain", type: "cookie_gain",
amount: BANKRUPTCY_GRANT source: "bankruptcy",
amount:
BANKRUPTCY_GRANT
} }
); );
return { return {
ok: true, ok: true,
+10 -3
View File
@@ -269,17 +269,24 @@ async function resolveCookieHeist(
} }
); );
/*
* ============================================================
* HEIST
* ============================================================
*/
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
playerId, playerId,
{ {
type: type: "vault_steal",
"vault_steal", source: "heist",
game: "heist",
result: "win",
amount amount
} }
); );
const [ const [
playerAfter, playerAfter,
vaultAfter vaultAfter
+1
View File
@@ -304,6 +304,7 @@ async function startBlackjack(
game: "blackjack", game: "blackjack",
source, source,
bet, bet,
wager: bet,
allIn, allIn,
previousAllIn, previousAllIn,
previousBet previousBet
+3 -2
View File
@@ -87,14 +87,15 @@ async function collectCookies(
); );
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
userId, userId,
{ {
type: "cookie_gain", type: "cookie_gain",
source: "collect",
amount amount
} }
); );
const balance = await getCookieBalance( const balance = await getCookieBalance(
+3 -2
View File
@@ -495,7 +495,7 @@ async function playRoulette(
const allIn = const allIn =
bet === playerBalance; bet === playerBalance;
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
playerId, playerId,
{ {
@@ -503,11 +503,12 @@ async function playRoulette(
game: "roulette", game: "roulette",
source, source,
bet, bet,
wager: bet,
allIn, allIn,
previousAllIn, previousAllIn,
previousBet previousBet
} }
); );
await interaction.update({ await interaction.update({
embeds: [ embeds: [
+8 -3
View File
@@ -199,16 +199,21 @@ async function playSlots(
throw error; throw error;
} }
await trackProfileEvent( await trackProfileEvent(
interaction, interaction,
playerId, playerId,
{ {
type: "game_start", type: "game_start",
game: "slots", game: "slots",
source, source,
bet bet,
wager: bet,
allIn:
bet === playerBalance,
previousAllIn,
previousBet
} }
); );
await interaction.update({ await interaction.update({
embeds: [ embeds: [