decord/source/modules/game_detection/calculateSteamReviewScoreDescription.tsx

63 lines
2.2 KiB
TypeScript
Raw Normal View History

// Module ID: 8756
// Function ID: 8757
2026-07-20 16:05:17 +00:00
// Name: calculateSteamReviewScoreDescription
// Dependencies: [1934, 2]
2026-07-20 16:05:17 +00:00
// Exports: calculateSteamReviewScoreDescription
// Module 8756 (calculateSteamReviewScoreDescription)
import GameDetectionTypes from "GameDetectionTypes" /* 1934 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("modules/game_detection/calculateSteamReviewScoreDescription.tsx");
2026-07-20 16:05:17 +00:00
export const calculateSteamReviewScoreDescription = function calculateSteamReviewScoreDescription(rating, ratingCount, isRecentRating) {
let num = 50;
let num2 = 50;
if (isRecentRating) {
num2 = 0;
}
let num3 = 500;
let num4 = 500;
if (isRecentRating) {
num4 = 100;
}
if (isRecentRating) {
num = 0;
}
if (isRecentRating) {
num3 = 100;
}
if (null != rating) {
if (null != ratingCount) {
if (ratingCount >= 10) {
if (rating >= 80) {
if (ratingCount < num2) {
let VERY_POSITIVE = GameDetectionTypes.SteamReviewScoreDescription.POSITIVE;
2026-07-20 16:05:17 +00:00
} else {
if (ratingCount >= num4) {
if (rating >= 95) {
VERY_POSITIVE = GameDetectionTypes.SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE;
2026-07-20 16:05:17 +00:00
}
}
VERY_POSITIVE = GameDetectionTypes.SteamReviewScoreDescription.VERY_POSITIVE;
2026-07-20 16:05:17 +00:00
}
} else if (rating >= 70) {
let NO_USER_REVIEWS = GameDetectionTypes.SteamReviewScoreDescription.MOSTLY_POSITIVE;
2026-07-20 16:05:17 +00:00
} else if (rating >= 40) {
NO_USER_REVIEWS = GameDetectionTypes.SteamReviewScoreDescription.MIXED;
2026-07-20 16:05:17 +00:00
} else if (rating >= 20) {
NO_USER_REVIEWS = GameDetectionTypes.SteamReviewScoreDescription.MOSTLY_NEGATIVE;
2026-07-20 16:05:17 +00:00
} else if (ratingCount < num) {
NO_USER_REVIEWS = GameDetectionTypes.SteamReviewScoreDescription.NEGATIVE;
2026-07-20 16:05:17 +00:00
} else if (ratingCount < num3) {
NO_USER_REVIEWS = GameDetectionTypes.SteamReviewScoreDescription.VERY_NEGATIVE;
2026-07-20 16:05:17 +00:00
} else {
NO_USER_REVIEWS = GameDetectionTypes.SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE;
2026-07-20 16:05:17 +00:00
}
}
return NO_USER_REVIEWS;
}
}
NO_USER_REVIEWS = GameDetectionTypes.SteamReviewScoreDescription.NO_USER_REVIEWS;
2026-07-20 16:05:17 +00:00
};