diff --git a/tgui/packages/tgui/interfaces/CasSim.tsx b/tgui/packages/tgui/interfaces/CasSim.tsx index ba5990bd81ce..cac23cde1833 100644 --- a/tgui/packages/tgui/interfaces/CasSim.tsx +++ b/tgui/packages/tgui/interfaces/CasSim.tsx @@ -3,7 +3,6 @@ import { Box, Button, Section, ProgressBar, NoticeBox, Stack } from '../componen interface CasSimData { configuration: any; - looking: 0 | 1; dummy_mode: string; worldtime: number; nextdetonationtime: number; @@ -21,7 +20,7 @@ export const CasSim = (_props, context) => { const timeLeft = data.nextdetonationtime - data.worldtime; const timeLeftPct = timeLeft / data.detonation_cooldown; - const canDetonate = timeLeft < 0 && data.configuration && data.looking; + const canDetonate = timeLeft < 0 && data.configuration && simulationView; return ( diff --git a/tgui/packages/tgui/interfaces/DemoSim.jsx b/tgui/packages/tgui/interfaces/DemoSim.tsx similarity index 92% rename from tgui/packages/tgui/interfaces/DemoSim.jsx rename to tgui/packages/tgui/interfaces/DemoSim.tsx index b1a6b3349afe..87dfa81236be 100644 --- a/tgui/packages/tgui/interfaces/DemoSim.jsx +++ b/tgui/packages/tgui/interfaces/DemoSim.tsx @@ -2,8 +2,16 @@ import { useBackend, useLocalState } from '../backend'; import { Button, Section, ProgressBar, NoticeBox, Box, Stack } from '../components'; import { Window } from '../layouts'; +interface DemoSimData { + configuration: any; + dummy_mode: string; + worldtime: number; + nextdetonationtime: number; + detonation_cooldown: number; +} + export const DemoSim = (_props, context) => { - const { act, data } = useBackend(context); + const { act, data } = useBackend(context); const [simulationView, setSimulationView] = useLocalState( context, 'simulation_view', @@ -13,7 +21,7 @@ export const DemoSim = (_props, context) => { const timeLeft = data.nextdetonationtime - data.worldtime; const timeLeftPct = timeLeft / data.detonation_cooldown; - const canDetonate = timeLeft < 0 && data.configuration && data.looking; + const canDetonate = timeLeft < 0 && data.configuration && simulationView; return (