decord/alpha/source/modules/dice_roll/DiceRollUtils.tsx

31 lines
814 B
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 12047
// Function ID: 12048
// Name: DiceRollUtils
2026-10-03 08:58:59 +00:00
// Dependencies: [1126, 2]
2026-07-20 16:05:17 +00:00
// Exports: getBarText
2026-10-09 10:00:15 +00:00
// Module 12047 (DiceRollUtils)
2026-10-03 08:58:59 +00:00
import intl3 from "intl" /* 1126 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("modules/dice_roll/DiceRollUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getBarText = function getBarText(flag, results) {
2026-10-03 08:58:59 +00:00
let str;
const tmp = flag;
if (tmp) {
const intl2 = intl3.intl;
str = intl2.string(intl3.t["x/FIRX"]);
2026-07-20 16:05:17 +00:00
} else {
str = "";
if (null != results) {
2026-10-03 08:58:59 +00:00
const intl = intl3.intl;
const formatToPlainString = intl.formatToPlainString;
const obj = { total: results.reduce((acc, item) => acc + item, 0) };
2026-10-03 08:58:59 +00:00
const xU4pF1 = intl3.t.xU4pF1;
str = formatToPlainString(xU4pF1, obj);
2026-07-20 16:05:17 +00:00
}
}
return str;
};