Skip to content

Commit

Permalink
fix bot imports
Browse files Browse the repository at this point in the history
  • Loading branch information
SYBIOTE committed Jan 29, 2024
1 parent f74bc07 commit 055ee58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
9 changes: 4 additions & 5 deletions src/functions/BotHookSystem.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { useEffect } from 'react'
import { isDev } from '@etherealengine/common/src/config'
import { EngineState } from '@etherealengine/engine/src/EngineState'
import { XRState } from '@etherealengine/engine/src/xr/XRState'
import { getState } from '@etherealengine/hyperflux'

import { BotHookFunctions } from './botHookFunctions'
import { sendXRInputData, simulateXR } from './xrBotHookFunctions'
import { defineSystem } from '@etherealengine/ecs/src/SystemFunctions'
import { SimulationSystemGroup } from '@etherealengine/ecs/src/SystemGroups'
import { sendXRInputData } from './xrBotHookFunctions'
import { EngineState } from '@etherealengine/engine/src/ecs/classes/EngineState'
import { defineSystem } from '@etherealengine/engine/src/ecs/functions/SystemFunctions'
import { SimulationSystemGroup } from '@etherealengine/engine/src/ecs/functions/SystemGroups'

const setupBotKey = 'ee.bot.setupBotKey'

Expand Down
11 changes: 6 additions & 5 deletions src/functions/botHookFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { MathUtils, Quaternion, Vector3 } from 'three'

import { iterativeMapToObject } from '@etherealengine/common/src/utils/mapToObject'
import { Engine } from '@etherealengine/ecs/src/Engine'
import { EngineState } from '@etherealengine/engine/src/EngineState'
import { getComponent } from '@etherealengine/ecs/src/ComponentFunctions'

import { TransformComponent } from '@etherealengine/engine/src/transform/components/TransformComponent'
import { getState } from '@etherealengine/hyperflux'

Expand All @@ -23,7 +21,10 @@ import {
} from './xrBotHookFunctions'
import { XRState } from '@etherealengine/engine/src/xr/XRState'
import { NetworkState } from '@etherealengine/engine/src/networking/NetworkState'
import { SceneState } from '@etherealengine/engine/src/scene/Scene'
import { EngineState } from '@etherealengine/engine/src/ecs/classes/EngineState'
import { Engine } from '@etherealengine/engine/src/ecs/classes/Engine'
import { SceneState } from '@etherealengine/engine/src/ecs/classes/Scene'
import { getComponent } from '@etherealengine/engine/src/ecs/functions/ComponentFunctions'

export const BotHookFunctions = {
[BotHooks.IsBot]:isBot,
Expand Down Expand Up @@ -61,7 +62,7 @@ export function worldNetworkReady() {
}

export function sceneLoaded() {
return getState(SceneState).sceneLoaded
return getState(SceneState).activeScene != null
}

export function getPlayerPosition() {
Expand Down
2 changes: 1 addition & 1 deletion src/functions/xrBotHookFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import { Quaternion, Vector3 } from 'three'

import { EngineState } from '@etherealengine/engine/src/EngineState'
import { XRAction, XRState } from '@etherealengine/engine/src/xr/XRState'
import { dispatchAction, getMutableState } from '@etherealengine/hyperflux'
import { requestXRSession } from '@etherealengine/engine/src/xr/XRSessionFunctions'

import { WebXREventDispatcher } from '../../webxr-emulator/WebXREventDispatcher'
import { EngineState } from '@etherealengine/engine/src/ecs/classes/EngineState'

export async function overrideXR() {
// inject the webxr polyfill from the webxr emulator source - this is a script added by the bot
Expand Down

0 comments on commit 055ee58

Please sign in to comment.