hytopia 0.5.0-dev3 → 0.5.2
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/bin/writeVersion.js +12 -0
- package/examples/hygrounds/classes/GamePlayerEntity.ts +1 -0
- package/examples/player-persistence/package.json +1 -1
- package/examples/world-switching/README.md +3 -0
- package/examples/world-switching/assets/maps/world1.json +2623 -0
- package/examples/world-switching/assets/maps/world2.json +25828 -0
- package/examples/world-switching/bun.lock +598 -0
- package/examples/world-switching/index.ts +102 -0
- package/examples/world-switching/package.json +19 -0
- package/package.json +5 -2
- package/server.js +124 -124
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
// Ran from root as prepublishOnly hook to replace __SDK_DEV_VERSION__ with the actual SDK version.
|
4
|
+
const fs = require('fs');
|
5
|
+
const package = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
|
6
|
+
const server = fs.readFileSync('./server.js', 'utf8');
|
7
|
+
|
8
|
+
if (!server.includes('__DEV_SDK_VERSION__')) {
|
9
|
+
throw new Error('__DEV_SDK_VERSION__ not found in server.js. Please create a fresh build before publishing with: cd ../server && bun run build.');
|
10
|
+
}
|
11
|
+
|
12
|
+
fs.writeFileSync('./server.js', server.replace(/__DEV_SDK_VERSION__/g, package.version));
|
@@ -375,6 +375,7 @@ export default class GamePlayerEntity extends DefaultPlayerEntity {
|
|
375
375
|
this.resetAnimations();
|
376
376
|
|
377
377
|
this.playerController.on(BaseEntityControllerEvent.TICK_WITH_PLAYER_INPUT, this._onTickWithPlayerInput);
|
378
|
+
this.playerController.canSwim = () => false;
|
378
379
|
}
|
379
380
|
|
380
381
|
private _setupPlayerHeadshotCollider(): void {
|