updated profile and centralized functions
This commit is contained in:
+4
-26
@@ -15,7 +15,8 @@ const {
|
||||
} = require("./cookieEconomy");
|
||||
|
||||
const {
|
||||
trackProfileEvent
|
||||
trackProfileEvent,
|
||||
recordGameOutcome
|
||||
} = require("./profileSystem");
|
||||
|
||||
const HEIST_COOLDOWN =
|
||||
@@ -255,12 +256,10 @@ async function resolveCookieHeist(
|
||||
throw error;
|
||||
}
|
||||
|
||||
await trackProfileEvent(
|
||||
await recordGameOutcome(
|
||||
interaction,
|
||||
playerId,
|
||||
{
|
||||
type:
|
||||
"game_result",
|
||||
game:
|
||||
"heist",
|
||||
result:
|
||||
@@ -280,15 +279,6 @@ async function resolveCookieHeist(
|
||||
}
|
||||
);
|
||||
|
||||
await trackProfileEvent(
|
||||
interaction,
|
||||
playerId,
|
||||
{
|
||||
type:
|
||||
"cookie_gain",
|
||||
amount
|
||||
}
|
||||
);
|
||||
|
||||
const [
|
||||
playerAfter,
|
||||
@@ -444,12 +434,10 @@ async function resolveCookieHeist(
|
||||
throw error;
|
||||
}
|
||||
|
||||
await trackProfileEvent(
|
||||
await recordGameOutcome(
|
||||
interaction,
|
||||
playerId,
|
||||
{
|
||||
type:
|
||||
"game_result",
|
||||
game:
|
||||
"heist",
|
||||
result:
|
||||
@@ -459,16 +447,6 @@ async function resolveCookieHeist(
|
||||
}
|
||||
);
|
||||
|
||||
await trackProfileEvent(
|
||||
interaction,
|
||||
playerId,
|
||||
{
|
||||
type:
|
||||
"cookie_loss",
|
||||
amount:
|
||||
penalty
|
||||
}
|
||||
);
|
||||
|
||||
const [
|
||||
playerAfter,
|
||||
|
||||
Reference in New Issue
Block a user