hytopia 0.14.42 → 0.14.43

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.
@@ -95,7 +95,7 @@ Description
95
95
 
96
96
  </td><td>
97
97
 
98
- PlayerCosmeticSlot\[\]
98
+ [PlayerCosmeticSlot](./server.playercosmeticslot.md)<!-- -->\[\]
99
99
 
100
100
 
101
101
  </td><td>
@@ -13,5 +13,5 @@ export type DefaultPlayerEntityOptions = {
13
13
  cosmeticHiddenSlots?: PlayerCosmeticSlot[];
14
14
  } & PlayerEntityOptions;
15
15
  ```
16
- **References:** [PlayerEntityOptions](./server.playerentityoptions.md)
16
+ **References:** [PlayerCosmeticSlot](./server.playercosmeticslot.md)<!-- -->, [PlayerEntityOptions](./server.playerentityoptions.md)
17
17
 
package/docs/server.md CHANGED
@@ -1767,6 +1767,17 @@ The cosmetics of a player.
1767
1767
  An equipped item of a player's cosmetics.
1768
1768
 
1769
1769
 
1770
+ </td></tr>
1771
+ <tr><td>
1772
+
1773
+ [PlayerCosmeticSlot](./server.playercosmeticslot.md)
1774
+
1775
+
1776
+ </td><td>
1777
+
1778
+ The slots used for player cosmetics.
1779
+
1780
+
1770
1781
  </td></tr>
1771
1782
  <tr><td>
1772
1783
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCosmeticSlot](./server.playercosmeticslot.md)
4
+
5
+ ## PlayerCosmeticSlot type
6
+
7
+ The slots used for player cosmetics.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type PlayerCosmeticSlot = 'ALL' | 'BACK' | 'HEAD' | 'LEFT_ARM' | 'LEFT_FOOT' | 'LEFT_HAND' | 'LEFT_ITEM' | 'LEFT_LEG' | 'RIGHT_ARM' | 'RIGHT_FOOT' | 'RIGHT_HAND' | 'RIGHT_ITEM' | 'RIGHT_LEG' | 'TORSO';
13
+ ```
@@ -9,7 +9,7 @@ The entry point for running game setup and starting the game server.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export declare function startServer(init: ((() => void) | ((world: World) => void))): void;
12
+ export declare function startServer(init: ((() => void | Promise<void>) | ((world: World) => void | Promise<void>))): void;
13
13
  ```
14
14
 
15
15
  ## Parameters
@@ -37,12 +37,12 @@ init
37
37
 
38
38
  </td><td>
39
39
 
40
- ((() =&gt; void) \| ((world: [World](./server.world.md)<!-- -->) =&gt; void))
40
+ ((() =&gt; void \| Promise&lt;void&gt;) \| ((world: [World](./server.world.md)<!-- -->) =&gt; void \| Promise&lt;void&gt;))
41
41
 
42
42
 
43
43
  </td><td>
44
44
 
45
- A function that initializes the game. The function can take no parameters to just initialize game logic, or it can accept a world parameter. If it accepts a world parameter, a default world will be automatically created and passed to the function.
45
+ A function that initializes the game. The function can take no parameters to just initialize game logic, or it can accept a world parameter. If it accepts a world parameter, a default world will be automatically created and passed to the function. The init function can be async - the server will wait for it to complete before accepting connections.
46
46
 
47
47
 
48
48
  </td></tr>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.14.42",
3
+ "version": "0.14.43",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./server.mjs",
package/server.api.json CHANGED
@@ -11814,7 +11814,7 @@
11814
11814
  {
11815
11815
  "kind": "Reference",
11816
11816
  "text": "PlayerCosmeticSlot",
11817
- "canonicalReference": "server!~PlayerCosmeticSlot:type"
11817
+ "canonicalReference": "server!PlayerCosmeticSlot:type"
11818
11818
  },
11819
11819
  {
11820
11820
  "kind": "Content",
@@ -13756,7 +13756,7 @@
13756
13756
  {
13757
13757
  "kind": "Reference",
13758
13758
  "text": "PlayerCosmeticSlot",
13759
- "canonicalReference": "server!~PlayerCosmeticSlot:type"
13759
+ "canonicalReference": "server!PlayerCosmeticSlot:type"
13760
13760
  },
13761
13761
  {
13762
13762
  "kind": "Content",
@@ -37987,6 +37987,32 @@
37987
37987
  "endIndex": 2
37988
37988
  }
37989
37989
  },
37990
+ {
37991
+ "kind": "TypeAlias",
37992
+ "canonicalReference": "server!PlayerCosmeticSlot:type",
37993
+ "docComment": "/**\n * The slots used for player cosmetics.\n *\n * @public\n */\n",
37994
+ "excerptTokens": [
37995
+ {
37996
+ "kind": "Content",
37997
+ "text": "export type PlayerCosmeticSlot = "
37998
+ },
37999
+ {
38000
+ "kind": "Content",
38001
+ "text": "'ALL' | 'BACK' | 'HEAD' | 'LEFT_ARM' | 'LEFT_FOOT' | 'LEFT_HAND' | 'LEFT_ITEM' | 'LEFT_LEG' | 'RIGHT_ARM' | 'RIGHT_FOOT' | 'RIGHT_HAND' | 'RIGHT_ITEM' | 'RIGHT_LEG' | 'TORSO'"
38002
+ },
38003
+ {
38004
+ "kind": "Content",
38005
+ "text": ";"
38006
+ }
38007
+ ],
38008
+ "fileUrlPath": "src/worlds/entities/DefaultPlayerEntity.ts",
38009
+ "releaseTag": "Public",
38010
+ "name": "PlayerCosmeticSlot",
38011
+ "typeTokenRange": {
38012
+ "startIndex": 1,
38013
+ "endIndex": 2
38014
+ }
38015
+ },
37990
38016
  {
37991
38017
  "kind": "Class",
37992
38018
  "canonicalReference": "server!PlayerEntity:class",
@@ -48781,7 +48807,7 @@
48781
48807
  {
48782
48808
  "kind": "Function",
48783
48809
  "canonicalReference": "server!startServer:function(1)",
48784
- "docComment": "/**\n * The entry point for running game setup and starting the game server.\n *\n * @remarks\n *\n * This function should always be called first when initializing your game. It will internally handle initialization of the physics engine and other systems required systems. All of your game setup logic should be executed in the init function.\n *\n * @param init - A function that initializes the game. The function can take no parameters to just initialize game logic, or it can accept a world parameter. If it accepts a world parameter, a default world will be automatically created and passed to the function.\n *\n * @public\n */\n",
48810
+ "docComment": "/**\n * The entry point for running game setup and starting the game server.\n *\n * @remarks\n *\n * This function should always be called first when initializing your game. It will internally handle initialization of the physics engine and other systems required systems. All of your game setup logic should be executed in the init function.\n *\n * @param init - A function that initializes the game. The function can take no parameters to just initialize game logic, or it can accept a world parameter. If it accepts a world parameter, a default world will be automatically created and passed to the function. The init function can be async - the server will wait for it to complete before accepting connections.\n *\n * @public\n */\n",
48785
48811
  "excerptTokens": [
48786
48812
  {
48787
48813
  "kind": "Content",
@@ -48789,7 +48815,16 @@
48789
48815
  },
48790
48816
  {
48791
48817
  "kind": "Content",
48792
- "text": "((() => void) | ((world: "
48818
+ "text": "((() => void | "
48819
+ },
48820
+ {
48821
+ "kind": "Reference",
48822
+ "text": "Promise",
48823
+ "canonicalReference": "!Promise:interface"
48824
+ },
48825
+ {
48826
+ "kind": "Content",
48827
+ "text": "<void>) | ((world: "
48793
48828
  },
48794
48829
  {
48795
48830
  "kind": "Reference",
@@ -48798,7 +48833,16 @@
48798
48833
  },
48799
48834
  {
48800
48835
  "kind": "Content",
48801
- "text": ") => void))"
48836
+ "text": ") => void | "
48837
+ },
48838
+ {
48839
+ "kind": "Reference",
48840
+ "text": "Promise",
48841
+ "canonicalReference": "!Promise:interface"
48842
+ },
48843
+ {
48844
+ "kind": "Content",
48845
+ "text": "<void>))"
48802
48846
  },
48803
48847
  {
48804
48848
  "kind": "Content",
@@ -48815,8 +48859,8 @@
48815
48859
  ],
48816
48860
  "fileUrlPath": "src/GameServer.ts",
48817
48861
  "returnTypeTokenRange": {
48818
- "startIndex": 5,
48819
- "endIndex": 6
48862
+ "startIndex": 9,
48863
+ "endIndex": 10
48820
48864
  },
48821
48865
  "releaseTag": "Public",
48822
48866
  "overloadIndex": 1,
@@ -48825,7 +48869,7 @@
48825
48869
  "parameterName": "init",
48826
48870
  "parameterTypeTokenRange": {
48827
48871
  "startIndex": 1,
48828
- "endIndex": 4
48872
+ "endIndex": 8
48829
48873
  },
48830
48874
  "isOptional": false
48831
48875
  }
package/server.d.ts CHANGED
@@ -4754,7 +4754,7 @@ export declare type PlayerCosmeticsEquippedItem = {
4754
4754
  };
4755
4755
 
4756
4756
  /** The slots used for player cosmetics. @public */
4757
- declare type PlayerCosmeticSlot = 'ALL' | 'BACK' | 'HEAD' | 'LEFT_ARM' | 'LEFT_FOOT' | 'LEFT_HAND' | 'LEFT_ITEM' | 'LEFT_LEG' | 'RIGHT_ARM' | 'RIGHT_FOOT' | 'RIGHT_HAND' | 'RIGHT_ITEM' | 'RIGHT_LEG' | 'TORSO';
4757
+ export declare type PlayerCosmeticSlot = 'ALL' | 'BACK' | 'HEAD' | 'LEFT_ARM' | 'LEFT_FOOT' | 'LEFT_HAND' | 'LEFT_ITEM' | 'LEFT_LEG' | 'RIGHT_ARM' | 'RIGHT_FOOT' | 'RIGHT_HAND' | 'RIGHT_ITEM' | 'RIGHT_LEG' | 'TORSO';
4758
4758
 
4759
4759
  /**
4760
4760
  * Represents an entity controlled by a player in a world.
@@ -6173,10 +6173,12 @@ export declare interface SpdMatrix3 extends SdpMatrix3 {
6173
6173
  * @param init - A function that initializes the game. The function can take no parameters
6174
6174
  * to just initialize game logic, or it can accept a world parameter. If it accepts a world
6175
6175
  * parameter, a default world will be automatically created and passed to the function.
6176
+ * The init function can be async - the server will wait for it to complete before
6177
+ * accepting connections.
6176
6178
  *
6177
6179
  * @public
6178
6180
  */
6179
- export declare function startServer(init: ((() => void) | ((world: World) => void))): void;
6181
+ export declare function startServer(init: ((() => void | Promise<void>) | ((world: World) => void | Promise<void>))): void;
6180
6182
 
6181
6183
  /** The inputs that are included in the PlayerInput. @public */
6182
6184
  export declare const SUPPORTED_INPUTS: readonly ["w", "a", "s", "d", "sp", "sh", "tb", "ml", "mr", "q", "e", "r", "f", "z", "x", "c", "v", "u", "i", "o", "j", "k", "l", "n", "m", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "cp", "cy", "iro", "ird", "jd"];