@@ -2,7 +2,7 @@ import { EuiListGroup, EuiListGroupItem, EuiPanel } from '@elastic/eui';
2
2
import { useRouter } from 'next/router' ;
3
3
import type { ReactNode } from 'react' ;
4
4
import { useCallback , useState } from 'react' ;
5
- import { runInBackground , sleep } from '../../common/async' ;
5
+ import { runInBackground } from '../../common/async' ;
6
6
import { equalsIgnoreCase } from '../../common/string' ;
7
7
import { useLogger } from '../hooks/logger' ;
8
8
@@ -158,28 +158,7 @@ const HomePage: React.FC = (): ReactNode => {
158
158
characterName,
159
159
gameCode,
160
160
} ) ;
161
- //--
162
161
await router . push ( '/grid' ) ;
163
- //--
164
- await sleep ( 2000 ) ;
165
- await window . api . sendCommand ( 'health' ) ;
166
- await sleep ( 1000 ) ;
167
- await window . api . sendCommand ( 'info' ) ;
168
- await sleep ( 1000 ) ;
169
- await window . api . sendCommand ( 'experience' ) ;
170
- await sleep ( 1000 ) ;
171
- await window . api . sendCommand ( 'out' ) ;
172
- await sleep ( 1000 ) ;
173
- await window . api . sendCommand ( 'out' ) ;
174
- await sleep ( 1000 ) ;
175
- await window . api . sendCommand ( 'perceive' ) ;
176
- await sleep ( 10_000 ) ;
177
- await window . api . sendCommand ( 'spell' ) ;
178
- await sleep ( 1000 ) ;
179
- await window . api . sendCommand ( 'go bank' ) ;
180
- await sleep ( 1000 ) ;
181
- await window . api . sendCommand ( 'go window' ) ;
182
- //--
183
162
} ,
184
163
[ logger , router ]
185
164
) ;
@@ -197,56 +176,6 @@ const HomePage: React.FC = (): ReactNode => {
197
176
[ playCharacter ]
198
177
) ;
199
178
200
- // useEffect(() => {
201
- // window.api.onMessage(
202
- // 'game:connect',
203
- // (_event, { accountName, characterName, gameCode }) => {
204
- // logger.info('game:connect', { accountName, characterName, gameCode });
205
- // }
206
- // );
207
-
208
- // return () => {
209
- // window.api.removeAllListeners('game:connect');
210
- // };
211
- // }, [logger]);
212
-
213
- // useEffect(() => {
214
- // window.api.onMessage(
215
- // 'game:disconnect',
216
- // (_event, { accountName, characterName, gameCode }) => {
217
- // logger.info('game:disconnect', {
218
- // accountName,
219
- // characterName,
220
- // gameCode,
221
- // });
222
- // }
223
- // );
224
-
225
- // return () => {
226
- // window.api.removeAllListeners('game:disconnect');
227
- // };
228
- // }, [logger]);
229
-
230
- // useEffect(() => {
231
- // window.api.onMessage('game:error', (_event, error: Error) => {
232
- // logger.error('game:error', { error });
233
- // });
234
-
235
- // return () => {
236
- // window.api.removeAllListeners('game:error');
237
- // };
238
- // }, [logger]);
239
-
240
- // useEffect(() => {
241
- // window.api.onMessage('game:event', (_event, gameEvent) => {
242
- // logger.info('game:event', { gameEvent });
243
- // gameEventsSubject$.next(gameEvent);
244
- // });
245
-
246
- // return () => {
247
- // window.api.removeAllListeners('game:event');
248
- // };
249
- // }, [logger, gameEventsSubject$]);
250
179
const accountName = 'xxx' ;
251
180
const accountPassword = 'xxx' ;
252
181
const characterName = 'xxx' ;
0 commit comments