20 lines
474 B
TypeScript
20 lines
474 B
TypeScript
|
|
import { create } from 'zustand'
|
||
|
|
|
||
|
|
export interface ToolState {
|
||
|
|
launchOptions: string[]
|
||
|
|
launchIndex: number
|
||
|
|
powerPlan: number
|
||
|
|
init: () => void
|
||
|
|
}
|
||
|
|
|
||
|
|
const useToolStore = create<ToolState>()((/* set */) => ({
|
||
|
|
launchOptions: ["-novid -nojoy -high -freq 120 -tickrate 128", "", ""],
|
||
|
|
launchIndex: 0,
|
||
|
|
powerPlan: 0,
|
||
|
|
init: () => {
|
||
|
|
console.log('init')
|
||
|
|
},
|
||
|
|
// increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
|
||
|
|
}))
|
||
|
|
|
||
|
|
export default useToolStore
|