mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-08-19 18:43:53 +08:00
update: thanks
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
/** 特别鸣谢分组 */
|
||||
export type SpecialThanksGroup = 1 | 2
|
||||
export enum SpecialThanksGroup {
|
||||
G1 = 1,
|
||||
G2 = 2,
|
||||
}
|
||||
|
||||
/** 特别鸣谢 */
|
||||
export type SpecialThanks = {
|
||||
|
||||
@@ -2,6 +2,8 @@ import { useCallback } from 'react'
|
||||
import { atom, useSetAtom, useAtomValue } from 'jotai'
|
||||
import type { PullOptions, PullCharaOpt, UniqueGenCfg } from '@remake/core'
|
||||
export interface Config {
|
||||
/** 功能锁 */
|
||||
features: number
|
||||
/** 游戏锁定天赋数量 */
|
||||
lock: number
|
||||
/** 游戏可选天赋数量 */
|
||||
|
||||
@@ -15,6 +15,7 @@ export enum Step {
|
||||
Play = 'play',
|
||||
Summary = 'summary',
|
||||
Achv = 'achv',
|
||||
Thanks = 'thanks',
|
||||
}
|
||||
|
||||
export enum Mode {
|
||||
@@ -192,3 +193,14 @@ export const useGoHome = () => {
|
||||
const setStep = useSetAtom(stepAtom)
|
||||
return useCallback(() => setStep(Step.Idle), [setStep])
|
||||
}
|
||||
|
||||
export const useGoThanks = () => {
|
||||
const setStep = useSetAtom(stepAtom)
|
||||
return useCallback(() => setStep(Step.Thanks), [setStep])
|
||||
}
|
||||
|
||||
export const useFeatures = () => {
|
||||
const { features } = useConfig()
|
||||
const [{ times }] = useProfile()
|
||||
return times >= features
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user