Files
discord-decomp/modules/game_detection/calculateSteamReviewScoreDescription.tsx
T
2026-11-01 12:12:55 +02:00

59 lines
1.5 KiB
TypeScript

// Metro module 8522 (f8523).
import { SteamReviewScoreDescription } from "./GameDetectionTypes";
export function calculateSteamReviewScoreDescription(a0, a1, a2) {
let r21, POSITIVE;
let r0 = 50;
const r3 = a2 ? 0 : 50;
let r1 = 500;
const r2 = a2 ? 100 : 500;
if (a2) {
r0 = 0;
}
if (a2) {
r1 = 100;
}
L38: {
if (a0 != null && (a1 != null && !(a1 < 10))) {
if (a0 >= 80) {
L35: {
if (a1 < r3) {
POSITIVE = SteamReviewScoreDescription.POSITIVE;
} else {
if (!(a1 < r2) && !(a0 < 95)) {
POSITIVE = SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE;
break L35;
}
POSITIVE = SteamReviewScoreDescription.VERY_POSITIVE;
}
}
r21 = POSITIVE;
break L38;
}
if (a0 >= 70) {
r21 = SteamReviewScoreDescription.MOSTLY_POSITIVE;
break L38;
}
if (a0 >= 40) {
r21 = SteamReviewScoreDescription.MIXED;
break L38;
}
if (a0 >= 20) {
r21 = SteamReviewScoreDescription.MOSTLY_NEGATIVE;
break L38;
}
if (a1 < r0) {
r21 = SteamReviewScoreDescription.NEGATIVE;
break L38;
}
if (a1 < r1) {
r21 = SteamReviewScoreDescription.VERY_NEGATIVE;
break L38;
}
r21 = SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE;
} else {
r21 = SteamReviewScoreDescription.NO_USER_REVIEWS;
}
}
return r21;
}