hytopia 0.9.3 → 0.9.5-prerelease
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/scripts.js +25 -3
- package/docs/server.blocktypeoptions.lightlevel.md +1 -1
- package/docs/server.blocktypeoptions.md +1 -1
- package/package.json +1 -1
- package/server.api.json +1 -1
- package/server.d.ts +1 -1
- package/server.js +2 -2
package/bin/scripts.js
CHANGED
@@ -175,7 +175,7 @@ function installProjectDependencies() {
|
|
175
175
|
description: 'My HYTOPIA project',
|
176
176
|
main: 'index.ts',
|
177
177
|
scripts: {
|
178
|
-
|
178
|
+
start: 'hytopia start'
|
179
179
|
}
|
180
180
|
}, null, 2));
|
181
181
|
|
@@ -235,7 +235,7 @@ function displayInitSuccessMessage() {
|
|
235
235
|
logDivider();
|
236
236
|
console.log('✅ HYTOPIA PROJECT INITIALIZED SUCCESSFULLY!');
|
237
237
|
console.log(' ');
|
238
|
-
console.log('💡 1. Start your development server by running the command `hytopia
|
238
|
+
console.log('💡 1. Start your development server by running the command `hytopia start`');
|
239
239
|
console.log('🎮 2. Play your game by opening: https://hytopia.com/play/?join=localhost:8080');
|
240
240
|
logDivider();
|
241
241
|
}
|
@@ -524,8 +524,30 @@ function copyDirectoryContents(srcDir, destDir, options = { recursive: true }) {
|
|
524
524
|
if (!fs.existsSync(srcDir)) return false;
|
525
525
|
|
526
526
|
try {
|
527
|
+
if (!fs.existsSync(destDir)) {
|
528
|
+
fs.mkdirSync(destDir, { recursive: true });
|
529
|
+
}
|
530
|
+
|
527
531
|
fs.readdirSync(srcDir).forEach(item => {
|
528
|
-
|
532
|
+
const srcPath = path.join(srcDir, item);
|
533
|
+
const destPath = path.join(destDir, item);
|
534
|
+
const stat = fs.statSync(srcPath);
|
535
|
+
|
536
|
+
if (stat.isDirectory()) {
|
537
|
+
// If destination dir exists, merge contents; else copy whole dir
|
538
|
+
if (fs.existsSync(destPath) && fs.statSync(destPath).isDirectory()) {
|
539
|
+
fs.mkdirSync(destPath, { recursive: true });
|
540
|
+
fs.readdirSync(srcPath).forEach(child => {
|
541
|
+
const childSrc = path.join(srcPath, child);
|
542
|
+
const childDest = path.join(destPath, child);
|
543
|
+
fs.cpSync(childSrc, childDest, { recursive: true, force: false });
|
544
|
+
});
|
545
|
+
} else {
|
546
|
+
fs.cpSync(srcPath, destPath, { recursive: true, force: false });
|
547
|
+
}
|
548
|
+
} else {
|
549
|
+
fs.cpSync(srcPath, destPath, options);
|
550
|
+
}
|
529
551
|
});
|
530
552
|
return true;
|
531
553
|
} catch {
|
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -5543,7 +5543,7 @@
|
|
5543
5543
|
{
|
5544
5544
|
"kind": "PropertySignature",
|
5545
5545
|
"canonicalReference": "server!BlockTypeOptions#lightLevel:member",
|
5546
|
-
"docComment": "/**\n * The light emission level.\n */\n",
|
5546
|
+
"docComment": "/**\n * The light emission level, between 0 and 15.\n */\n",
|
5547
5547
|
"excerptTokens": [
|
5548
5548
|
{
|
5549
5549
|
"kind": "Content",
|
package/server.d.ts
CHANGED
@@ -662,7 +662,7 @@ export declare interface BlockTypeOptions {
|
|
662
662
|
halfExtents?: Vector3Like;
|
663
663
|
/** Whether the block type is a liquid. */
|
664
664
|
isLiquid?: boolean;
|
665
|
-
/** The light emission level. */
|
665
|
+
/** The light emission level, between 0 and 15. */
|
666
666
|
lightLevel?: number;
|
667
667
|
/** The name of the block type. */
|
668
668
|
name: string;
|