mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36: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 { debugCircleProgressbar, debugProgressbar } from './debug/progress';
|
||||||
import { debugTextUI } from './debug/textui';
|
import { debugTextUI } from './debug/textui';
|
||||||
import { debugSettings } from './debug/settings';
|
import { debugSettings } from './debug/settings';
|
||||||
|
import { debugSkillCheck } from './debug/skillcheck';
|
||||||
|
|
||||||
const Dev: React.FC = () => {
|
const Dev: React.FC = () => {
|
||||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||||
@@ -82,6 +83,10 @@ const Dev: React.FC = () => {
|
|||||||
<Button isFullWidth onClick={() => debugTextUI()}>
|
<Button isFullWidth onClick={() => debugTextUI()}>
|
||||||
Show TextUI
|
Show TextUI
|
||||||
</Button>
|
</Button>
|
||||||
|
<Divider />
|
||||||
|
<Button isFullWidth onClick={() => debugSkillCheck()}>
|
||||||
|
Run skill check
|
||||||
|
</Button>
|
||||||
</VStack>
|
</VStack>
|
||||||
</DrawerBody>
|
</DrawerBody>
|
||||||
</DrawerContent>
|
</DrawerContent>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ interface CustomGameDifficulty {
|
|||||||
speedMultiplier: number;
|
speedMultiplier: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
type GameDifficulty = 'easy' | 'medium' | 'hard' | CustomGameDifficulty;
|
export type GameDifficulty = 'easy' | 'medium' | 'hard' | CustomGameDifficulty;
|
||||||
|
|
||||||
export interface SkillCheckProps {
|
export interface SkillCheckProps {
|
||||||
angle: number;
|
angle: number;
|
||||||
@@ -28,13 +28,6 @@ const difficultyOffsets = {
|
|||||||
hard: 25,
|
hard: 25,
|
||||||
};
|
};
|
||||||
|
|
||||||
debugData([
|
|
||||||
{
|
|
||||||
action: 'startSkillCheck',
|
|
||||||
data: ['hard'],
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const SkillCheck: React.FC = () => {
|
const SkillCheck: React.FC = () => {
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const dataRef = useRef<GameDifficulty | GameDifficulty[] | null>(null);
|
const dataRef = useRef<GameDifficulty | GameDifficulty[] | null>(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user