isaacscript-common 26.3.0 → 26.3.1

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.
@@ -7962,6 +7962,10 @@ export declare function isMoveActionTriggeredOnAnyInput(): boolean;
7962
7962
  * Helper function to detect if there is two or more players currently playing.
7963
7963
  *
7964
7964
  * Specifically, this function looks for unique `ControllerIndex` values across all players.
7965
+ *
7966
+ * This function is not safe to use in the `POST_PLAYER_INIT` callback, because the
7967
+ * `ControllerIndex` will not be set properly. As a workaround, you can use it in the
7968
+ * `POST_PLAYER_INIT_FIRST` callback (or some other callback like `POST_UPDATE`).
7965
7969
  */
7966
7970
  export declare function isMultiplayer(): boolean;
7967
7971
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 26.3.0
3
+ isaacscript-common 26.3.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -45,6 +45,10 @@ export declare function inRange(num: int, start: int, end: int): boolean;
45
45
  * Helper function to detect if there is two or more players currently playing.
46
46
  *
47
47
  * Specifically, this function looks for unique `ControllerIndex` values across all players.
48
+ *
49
+ * This function is not safe to use in the `POST_PLAYER_INIT` callback, because the
50
+ * `ControllerIndex` will not be set properly. As a workaround, you can use it in the
51
+ * `POST_PLAYER_INIT_FIRST` callback (or some other callback like `POST_UPDATE`).
48
52
  */
49
53
  export declare function isMultiplayer(): boolean;
50
54
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/functions/utils.ts"],"names":[],"mappings":";AAMA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAWlE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,oBAAoB,EAAE,MAAM,GAC3B,MAAM,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E,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAE/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAMvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAI5C;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAetC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAI3D;AAED;;;;;;;;;;;;GAYG;AAEH,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAG"}
@@ -82,6 +82,10 @@ end
82
82
  --- Helper function to detect if there is two or more players currently playing.
83
83
  --
84
84
  -- Specifically, this function looks for unique `ControllerIndex` values across all players.
85
+ --
86
+ -- This function is not safe to use in the `POST_PLAYER_INIT` callback, because the
87
+ -- `ControllerIndex` will not be set properly. As a workaround, you can use it in the
88
+ -- `POST_PLAYER_INIT_FIRST` callback (or some other callback like `POST_UPDATE`).
85
89
  function ____exports.isMultiplayer(self)
86
90
  local players = getAllPlayers(nil)
87
91
  local controllerIndexes = __TS__ArrayMap(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "26.3.0",
3
+ "version": "26.3.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -85,6 +85,10 @@ export function inRange(num: int, start: int, end: int): boolean {
85
85
  * Helper function to detect if there is two or more players currently playing.
86
86
  *
87
87
  * Specifically, this function looks for unique `ControllerIndex` values across all players.
88
+ *
89
+ * This function is not safe to use in the `POST_PLAYER_INIT` callback, because the
90
+ * `ControllerIndex` will not be set properly. As a workaround, you can use it in the
91
+ * `POST_PLAYER_INIT_FIRST` callback (or some other callback like `POST_UPDATE`).
88
92
  */
89
93
  export function isMultiplayer(): boolean {
90
94
  const players = getAllPlayers();