generated from nhcarrigan/template
fix: integer formatting, exploration durations, runestone preview, and gold achievement tracking
Closes #199 Closes #203 Closes #204 Closes #219 Closes #220 Closes #231 Closes #232
This commit is contained in:
@@ -62,7 +62,10 @@ import {
|
||||
computePartyCombatPower,
|
||||
} from "../engine/tick.js";
|
||||
import { updateChallengeProgress } from "../utils/dailyChallenges.js";
|
||||
import { formatNumber as formatNumberUtil } from "../utils/format.js";
|
||||
import {
|
||||
formatInteger as formatIntegerUtil,
|
||||
formatNumber as formatNumberUtil,
|
||||
} from "../utils/format.js";
|
||||
import { logError } from "../utils/logError.js";
|
||||
import { sendNotification } from "../utils/notification.js";
|
||||
import { playSound } from "../utils/sound.js";
|
||||
@@ -461,6 +464,11 @@ interface GameContextValue {
|
||||
*/
|
||||
formatNumber: (value: number)=> string;
|
||||
|
||||
/**
|
||||
* Format a whole-number value without decimal places.
|
||||
*/
|
||||
formatInteger: (value: number)=> string;
|
||||
|
||||
/**
|
||||
* Buy a prestige upgrade from the runestone shop.
|
||||
*/
|
||||
@@ -2359,6 +2367,13 @@ export const GameProvider = ({
|
||||
[ numberFormat ],
|
||||
);
|
||||
|
||||
const formatInteger = useCallback(
|
||||
(value: number) => {
|
||||
return formatIntegerUtil(value);
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
const contextValue = useMemo<GameContextValue>(() => {
|
||||
return {
|
||||
apotheosis,
|
||||
@@ -2397,6 +2412,7 @@ export const GameProvider = ({
|
||||
flushBossLoreToasts,
|
||||
forceSync,
|
||||
forceUnlocks,
|
||||
formatInteger,
|
||||
formatNumber,
|
||||
handleClick,
|
||||
inGuild,
|
||||
@@ -2443,6 +2459,7 @@ export const GameProvider = ({
|
||||
bossError,
|
||||
completedQuestToasts,
|
||||
failedQuestToasts,
|
||||
formatInteger,
|
||||
formatNumber,
|
||||
buyAdventurer,
|
||||
buyEchoUpgrade,
|
||||
|
||||
Reference in New Issue
Block a user