Spaces:
Sleeping
Sleeping
test
Browse files- convex/aiTown/game.ts +2 -3
convex/aiTown/game.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import { Infer, v } from 'convex/values';
|
|
|
|
| 2 |
import { Doc, Id } from '../_generated/dataModel';
|
| 3 |
import {
|
| 4 |
ActionCtx,
|
|
@@ -26,14 +27,12 @@ import { HistoricalObject } from '../engine/historicalObject';
|
|
| 26 |
import { AgentDescription, serializedAgentDescription } from './agentDescription';
|
| 27 |
import { parseMap, serializeMap } from '../util/object';
|
| 28 |
import { LOBBY_SIZE } from '../constants';
|
| 29 |
-
import { useMutation, useQuery } from 'convex/react';
|
| 30 |
import { api } from '../_generated/api';
|
| 31 |
|
| 32 |
-
const stopAllowed = useQuery(api.testing.stopAllowed) ?? false;
|
| 33 |
const defaultWorld = useQuery(api.world.defaultWorldStatus);
|
| 34 |
|
| 35 |
const frozen = defaultWorld?.status === 'stoppedByDeveloper';
|
| 36 |
-
|
| 37 |
const unfreeze = useMutation(api.testing.resume);
|
| 38 |
const freeze = useMutation(api.testing.stop);
|
| 39 |
|
|
|
|
| 1 |
import { Infer, v } from 'convex/values';
|
| 2 |
+
import { useMutation, useQuery } from 'convex/react';
|
| 3 |
import { Doc, Id } from '../_generated/dataModel';
|
| 4 |
import {
|
| 5 |
ActionCtx,
|
|
|
|
| 27 |
import { AgentDescription, serializedAgentDescription } from './agentDescription';
|
| 28 |
import { parseMap, serializeMap } from '../util/object';
|
| 29 |
import { LOBBY_SIZE } from '../constants';
|
|
|
|
| 30 |
import { api } from '../_generated/api';
|
| 31 |
|
|
|
|
| 32 |
const defaultWorld = useQuery(api.world.defaultWorldStatus);
|
| 33 |
|
| 34 |
const frozen = defaultWorld?.status === 'stoppedByDeveloper';
|
| 35 |
+
console.log("Frozen : ", frozen)
|
| 36 |
const unfreeze = useMutation(api.testing.resume);
|
| 37 |
const freeze = useMutation(api.testing.stop);
|
| 38 |
|