mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
chore(web): move skill check into dev draw tools
This commit is contained in:
11
web/src/features/dev/debug/skillcheck.ts
Normal file
11
web/src/features/dev/debug/skillcheck.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
import { GameDifficulty } from '../../skillcheck';
|
||||
|
||||
export const debugSkillCheck = () => {
|
||||
debugData<GameDifficulty | GameDifficulty[]>([
|
||||
{
|
||||
action: 'startSkillCheck',
|
||||
data: ['easy', 'easy', 'hard'],
|
||||
},
|
||||
]);
|
||||
};
|
||||
@@ -20,6 +20,7 @@ import { debugCustomNotification, debugNotification } from './debug/notification
|
||||
import { debugCircleProgressbar, debugProgressbar } from './debug/progress';
|
||||
import { debugTextUI } from './debug/textui';
|
||||
import { debugSettings } from './debug/settings';
|
||||
import { debugSkillCheck } from './debug/skillcheck';
|
||||
|
||||
const Dev: React.FC = () => {
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
@@ -82,6 +83,10 @@ const Dev: React.FC = () => {
|
||||
<Button isFullWidth onClick={() => debugTextUI()}>
|
||||
Show TextUI
|
||||
</Button>
|
||||
<Divider />
|
||||
<Button isFullWidth onClick={() => debugSkillCheck()}>
|
||||
Run skill check
|
||||
</Button>
|
||||
</VStack>
|
||||
</DrawerBody>
|
||||
</DrawerContent>
|
||||
|
||||
@@ -10,7 +10,7 @@ interface CustomGameDifficulty {
|
||||
speedMultiplier: number;
|
||||
}
|
||||
|
||||
type GameDifficulty = 'easy' | 'medium' | 'hard' | CustomGameDifficulty;
|
||||
export type GameDifficulty = 'easy' | 'medium' | 'hard' | CustomGameDifficulty;
|
||||
|
||||
export interface SkillCheckProps {
|
||||
angle: number;
|
||||
@@ -28,13 +28,6 @@ const difficultyOffsets = {
|
||||
hard: 25,
|
||||
};
|
||||
|
||||
debugData([
|
||||
{
|
||||
action: 'startSkillCheck',
|
||||
data: ['hard'],
|
||||
},
|
||||
]);
|
||||
|
||||
const SkillCheck: React.FC = () => {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const dataRef = useRef<GameDifficulty | GameDifficulty[] | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user