@hytopia.com/examples 1.0.34 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai-agents/index.ts +1 -1
- package/ai-agents/package.json +1 -1
- package/big-world/index.ts +1 -1
- package/big-world/package.json +1 -1
- package/block-entity/index.ts +1 -1
- package/block-entity/package.json +1 -1
- package/child-entity/index.ts +1 -1
- package/child-entity/package.json +1 -1
- package/custom-ui/index.ts +1 -1
- package/custom-ui/package.json +1 -1
- package/entity-animations/index.ts +1 -1
- package/entity-animations/package.json +1 -1
- package/entity-controller/index.ts +1 -1
- package/entity-controller/package.json +1 -1
- package/entity-spawn/index.ts +1 -1
- package/entity-spawn/package.json +1 -1
- package/frontiers-rpg-game/src/GameManager.ts +3 -3
- package/frontiers-rpg-game/src/items/ItemRegistry.ts +2 -2
- package/frontiers-rpg-game/src/quests/QuestRegistry.ts +2 -2
- package/frontiers-rpg-game/src/regions/chitter-forest/ChitterForestRegion.ts +1 -1
- package/frontiers-rpg-game/src/regions/hearthwilds/HearthwildsRegion.ts +1 -1
- package/frontiers-rpg-game/src/regions/ratkin-nest/RatkinNestRegion.ts +1 -1
- package/frontiers-rpg-game/src/regions/stalkhaven/StalkhavenRegion.ts +1 -1
- package/frontiers-rpg-game/src/regions/stalkhaven-port/StalkhavenPortRegion.ts +1 -1
- package/frontiers-rpg-game/src/regions/weavers-hollow/WeaversHollowRegion.ts +1 -1
- package/hole-in-wall-game/index.ts +1 -1
- package/hole-in-wall-game/package.json +1 -1
- package/hygrounds/classes/GameManager.ts +1 -1
- package/hygrounds/index.ts +1 -1
- package/hygrounds/package.json +1 -1
- package/lighting/index.ts +1 -1
- package/lighting/package.json +1 -1
- package/mobile-controls/index.ts +1 -1
- package/mobile-controls/package.json +1 -1
- package/package.json +1 -1
- package/particles/index.ts +1 -1
- package/pathfinding/index.ts +1 -1
- package/pathfinding/package.json +1 -1
- package/payload-game/index.ts +1 -1
- package/payload-game/package.json +1 -1
- package/player-persistence/index.ts +1 -1
- package/player-persistence/package.json +1 -1
- package/wall-dodge-game/index.ts +1 -1
- package/wall-dodge-game/package.json +1 -1
- package/world-switching/index.ts +2 -2
- package/world-switching/package.json +1 -1
- package/zombies-fps/index.ts +1 -1
- package/zombies-fps/package.json +1 -1
- /package/frontiers-rpg-game/assets/models/environment/{Skull-broken.gltf → skull-broken.gltf} +0 -0
- /package/frontiers-rpg-game/assets/models/environment/{Skull-flower.gltf → skull-flower.gltf} +0 -0
- /package/frontiers-rpg-game/assets/models/environment/{Skull.gltf → skull.gltf} +0 -0
package/ai-agents/index.ts
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
Vector3,
|
|
33
33
|
} from "hytopia";
|
|
34
34
|
|
|
35
|
-
import worldMap from "./assets/map.json";
|
|
35
|
+
import worldMap from "./assets/map.json" with { type: "json" };
|
|
36
36
|
import { FollowBehavior } from "./src/behaviors/FollowBehavior";
|
|
37
37
|
import { BaseAgent } from "./src/BaseAgent";
|
|
38
38
|
import { PathfindingBehavior } from "./src/behaviors/PathfindingBehavior";
|
package/ai-agents/package.json
CHANGED
package/big-world/index.ts
CHANGED
package/big-world/package.json
CHANGED
package/block-entity/index.ts
CHANGED
package/child-entity/index.ts
CHANGED
package/custom-ui/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PlayerUIEvent,
|
|
8
8
|
} from 'hytopia';
|
|
9
9
|
|
|
10
|
-
import worldMap from './assets/map.json';
|
|
10
|
+
import worldMap from './assets/map.json' with { type: 'json' } ;
|
|
11
11
|
|
|
12
12
|
// Simple map for player -> singular controlled entity
|
|
13
13
|
const playerEntityMap = new Map<Player, DefaultPlayerEntity>();
|
package/custom-ui/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import MyEntityController from './MyEntityController';
|
|
8
8
|
|
|
9
|
-
import worldMap from './assets/map.json';
|
|
9
|
+
import worldMap from './assets/map.json' with { type: 'json' } ;
|
|
10
10
|
|
|
11
11
|
startServer(world => {
|
|
12
12
|
// Uncomment this to visualize physics vertices, will cause noticable lag.
|
package/entity-spawn/index.ts
CHANGED
|
@@ -33,11 +33,11 @@ export default class GameManager {
|
|
|
33
33
|
return this._regions.get(id);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
public loadItems(): void {
|
|
37
|
-
ItemRegistry.initializeItems();
|
|
36
|
+
public async loadItems(): Promise<void> {
|
|
37
|
+
await ItemRegistry.initializeItems();
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
public loadQuests(): void {
|
|
40
|
+
public async loadQuests(): Promise<void> {
|
|
41
41
|
QuestRegistry.initializeQuests();
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -9,10 +9,10 @@ export default class ItemRegistry {
|
|
|
9
9
|
return this.itemRegistry.get(itemId);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
public static initializeItems(): void {
|
|
12
|
+
public static async initializeItems(): Promise<void> {
|
|
13
13
|
console.log('Loading items...');
|
|
14
14
|
|
|
15
|
-
const ItemClasses =
|
|
15
|
+
const ItemClasses = (await import('./ItemClasses')).default; // lazy load to avoid circular dependencies
|
|
16
16
|
let loadedCount = 0;
|
|
17
17
|
|
|
18
18
|
for (const ItemClass of ItemClasses) {
|
|
@@ -40,10 +40,10 @@ export default class QuestRegistry {
|
|
|
40
40
|
return data?.interaction.enabledForInteractor(interactor) ? data.option : undefined;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
public static initializeQuests(): void {
|
|
43
|
+
public static async initializeQuests(): Promise<void> {
|
|
44
44
|
console.log('Loading quests...');
|
|
45
45
|
|
|
46
|
-
const QuestClasses =
|
|
46
|
+
const QuestClasses = (await import('./QuestClasses')).default; // lazy load to avoid circular dependencies
|
|
47
47
|
const npcIdCounters = new Map<typeof BaseEntity, number>();
|
|
48
48
|
let loadedCount = 0;
|
|
49
49
|
|
|
@@ -18,7 +18,7 @@ import RatkinWarriorEntity from '../../entities/enemies/RatkinWarriorEntity';
|
|
|
18
18
|
// Spawner Forageables
|
|
19
19
|
import RottenLogEntity from '../../entities/forageables/RottenLogEntity';
|
|
20
20
|
|
|
21
|
-
import chitterForestMap from '../../../assets/maps/chitter-forest.json';
|
|
21
|
+
import chitterForestMap from '../../../assets/maps/chitter-forest.json' with { type: 'json' } ;
|
|
22
22
|
|
|
23
23
|
export default class ChitterForestRegion extends GameRegion {
|
|
24
24
|
public constructor() {
|
|
@@ -4,7 +4,7 @@ import Spawner from '../../systems/Spawner';
|
|
|
4
4
|
import PortalEntity from '../../entities/PortalEntity';
|
|
5
5
|
import type { WanderOptions } from '../../entities/BaseEntity';
|
|
6
6
|
|
|
7
|
-
import hearthwildsMap from '../../../assets/maps/hearthwilds.json';
|
|
7
|
+
import hearthwildsMap from '../../../assets/maps/hearthwilds.json' with { type: 'json' } ;
|
|
8
8
|
|
|
9
9
|
// NPCs
|
|
10
10
|
import ArchivesBookshelf1Entity from './npcs/ArchivesBookshelf1Entity';
|
|
@@ -25,7 +25,7 @@ import WeaverBroodlingEntity from '../../entities/enemies/WeaverBroodlingEntity'
|
|
|
25
25
|
// Spawner Forageables
|
|
26
26
|
import DecayingPileEntity from '../../entities/forageables/DecayingPileEntity';
|
|
27
27
|
|
|
28
|
-
import ratkinNestMap from '../../../assets/maps/ratkin-nest.json';
|
|
28
|
+
import ratkinNestMap from '../../../assets/maps/ratkin-nest.json' with { type: 'json' } ;
|
|
29
29
|
|
|
30
30
|
export default class RatkinNestRegion extends GameRegion {
|
|
31
31
|
public constructor() {
|
|
@@ -13,7 +13,7 @@ import BlacksmithArdenEntity from './npcs/BlacksmithArdenEntity';
|
|
|
13
13
|
import HealerMycelisEntity from './npcs/HealerMycelisEntity';
|
|
14
14
|
import MerchantFinnEntity from './npcs/MerchantFinnEntity';
|
|
15
15
|
|
|
16
|
-
import stalkhavenMap from '../../../assets/maps/stalkhaven.json';
|
|
16
|
+
import stalkhavenMap from '../../../assets/maps/stalkhaven.json' with { type: 'json' } ;
|
|
17
17
|
|
|
18
18
|
export default class StalkhavenRegion extends GameRegion {
|
|
19
19
|
public constructor() {
|
|
@@ -4,7 +4,7 @@ import PortalEntity from '../../entities/PortalEntity';
|
|
|
4
4
|
import BoatRepairmanSidEntity from './npcs/BoatRepairmanSidEntity';
|
|
5
5
|
import PirateCaptainShroudEntity from './npcs/PirateCaptainShroudEntity';
|
|
6
6
|
|
|
7
|
-
import stalkhavenPortMap from '../../../assets/maps/stalkhaven-port.json';
|
|
7
|
+
import stalkhavenPortMap from '../../../assets/maps/stalkhaven-port.json' with { type: 'json' } ;
|
|
8
8
|
|
|
9
9
|
export default class StalkhavenRegion extends GameRegion {
|
|
10
10
|
public constructor() {
|
|
@@ -3,7 +3,7 @@ import GameRegion from '../../GameRegion';
|
|
|
3
3
|
import Spawner from '../../systems/Spawner';
|
|
4
4
|
import PortalEntity from '../../entities/PortalEntity';
|
|
5
5
|
|
|
6
|
-
import weaversHollowMap from '../../../assets/maps/weavers-hollow.json';
|
|
6
|
+
import weaversHollowMap from '../../../assets/maps/weavers-hollow.json' with { type: 'json' } ;
|
|
7
7
|
|
|
8
8
|
import SpiderWebEntity from '../../entities/enemies/SpiderWebEntity';
|
|
9
9
|
import QueenWeaverEntity from '../../entities/enemies/QueenWeaverEntity';
|
package/hygrounds/index.ts
CHANGED
package/hygrounds/package.json
CHANGED
package/lighting/index.ts
CHANGED
package/lighting/package.json
CHANGED
package/mobile-controls/index.ts
CHANGED
package/package.json
CHANGED
package/particles/index.ts
CHANGED
package/pathfinding/index.ts
CHANGED
package/pathfinding/package.json
CHANGED
package/payload-game/index.ts
CHANGED
package/wall-dodge-game/index.ts
CHANGED
package/world-switching/index.ts
CHANGED
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
// We'll use 2 maps in this example, 1 for each unique world.
|
|
33
|
-
import world1Map from './assets/maps/world1.json';
|
|
34
|
-
import world2Map from './assets/maps/world2.json';
|
|
33
|
+
import world1Map from './assets/maps/world1.json' with { type: 'json' } ;
|
|
34
|
+
import world2Map from './assets/maps/world2.json' with { type: 'json' } ;
|
|
35
35
|
|
|
36
36
|
// The server always starts with a created default world passed in the startServer callback.
|
|
37
37
|
startServer(defaultWorld => {
|
package/zombies-fps/index.ts
CHANGED
package/zombies-fps/package.json
CHANGED
/package/frontiers-rpg-game/assets/models/environment/{Skull-broken.gltf → skull-broken.gltf}
RENAMED
|
File without changes
|
/package/frontiers-rpg-game/assets/models/environment/{Skull-flower.gltf → skull-flower.gltf}
RENAMED
|
File without changes
|
|
File without changes
|