isaacscript-common 1.2.85 → 1.2.86

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.
@@ -43,11 +43,13 @@ function ____exports.logAllFlags(flags, flagEnum, description)
43
43
  end
44
44
  ____exports.log(("Logging all " .. description) .. "flags:")
45
45
  local hasNoFlags = true
46
+ local i = 1
46
47
  for key, value in pairs(flagEnum) do
47
48
  if hasFlag(nil, flags, value) then
48
- ____exports.log((((" Has flag: " .. tostring(key)) .. " (") .. tostring(value)) .. ")")
49
+ ____exports.log((((((" " .. tostring(i)) .. ") Has flag: ") .. tostring(key)) .. " (") .. tostring(value)) .. ")")
49
50
  hasNoFlags = false
50
51
  end
52
+ i = i + 1
51
53
  end
52
54
  if hasNoFlags then
53
55
  ____exports.log(" n/a (no flags)")
@@ -63,13 +65,15 @@ function ____exports.logAllGameStateFlags()
63
65
  local game = Game()
64
66
  ____exports.log("Logging all game state flags:")
65
67
  local hasNoFlags = true
68
+ local i = 1
66
69
  for key, value in pairs(GameStateFlag) do
67
70
  local gameStateFlag = value
68
71
  local flagValue = game:GetStateFlag(gameStateFlag)
69
72
  if flagValue then
70
- ____exports.log((((" Has flag: " .. key) .. " (") .. tostring(value)) .. ")")
73
+ ____exports.log((((((" " .. tostring(i)) .. ") Has flag: ") .. key) .. " (") .. tostring(value)) .. ")")
71
74
  hasNoFlags = false
72
75
  end
76
+ i = i + 1
73
77
  end
74
78
  if hasNoFlags then
75
79
  ____exports.log(" n/a (no flags)")
@@ -83,12 +87,14 @@ function ____exports.logAllSeedEffects()
83
87
  local seeds = game:GetSeeds()
84
88
  ____exports.log("Logging all seed effects:")
85
89
  local hasNoSeedEffects = true
90
+ local i = 1
86
91
  for key, value in pairs(SeedEffect) do
87
92
  local seedEffect = value
88
93
  if seeds:HasSeedEffect(seedEffect) then
89
- ____exports.log((((" " .. key) .. " (") .. tostring(value)) .. ")")
94
+ ____exports.log((((((" " .. tostring(i)) .. ") ") .. key) .. " (") .. tostring(value)) .. ")")
90
95
  hasNoSeedEffects = false
91
96
  end
97
+ i = i + 1
92
98
  end
93
99
  if hasNoSeedEffects then
94
100
  ____exports.log(" n/a (no seed effects)")
@@ -1,6 +1,18 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  import { HealthType } from "../types/HealthType";
3
- import { PlayerIndex } from "../types/PlayerIndex";
3
+ /**
4
+ * PlayerIndex is a specific type of string; see the documentation for the [[`getPlayerIndex`]]
5
+ * function. Mods can signify that data structures handle EntityPlayers by using this type:
6
+ *
7
+ * ```
8
+ * const myPlayerMap = new Map<PlayerIndex, string>();
9
+ * ```
10
+ *
11
+ * This type is branded for extra type safety.
12
+ */
13
+ export declare type PlayerIndex = int & {
14
+ __playerIndexBrand: unknown;
15
+ };
4
16
  export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType | int): void;
5
17
  export declare function addTrinketCostume(player: EntityPlayer, trinketType: TrinketType | int): void;
6
18
  /** Iterates over all players and checks if any player is close enough to the specified position. */
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export { deployJSONRoom, deployRandomJSONRoom, emptyRoom, } from "./features/dep
4
4
  export { disableAllInputs, disableAllInputsExceptFor, disableMovementInputs, disableShootingInputs, enableAllInputs, enableAllInputsExceptFor, } from "./features/disableInputs";
5
5
  export { forgottenSwitch } from "./features/forgottenSwitch";
6
6
  export { getCollectibleItemPoolType } from "./features/getCollectibleItemPoolType";
7
- export { isPonyActive } from "./features/isPonyActive";
8
7
  export { preventCollectibleRotate } from "./features/preventCollectibleRotate";
9
8
  export { runInNGameFrames, runInNRenderFrames, runNextGameFrame, runNextRenderFrame, } from "./features/runInNFrames";
10
9
  export * from "./features/saveDataManager/exports";
@@ -93,7 +92,6 @@ export * from "./types/PickingUpItem";
93
92
  export * from "./types/PillEffectClass";
94
93
  export * from "./types/PillEffectType";
95
94
  export * from "./types/PlayerHealth";
96
- export * from "./types/PlayerIndex";
97
95
  export * from "./types/PocketItemDescription";
98
96
  export * from "./types/PocketItemType";
99
97
  export * from "./types/TrinketSituation";
package/dist/index.lua CHANGED
@@ -49,11 +49,6 @@ do
49
49
  local getCollectibleItemPoolType = ____getCollectibleItemPoolType.getCollectibleItemPoolType
50
50
  ____exports.getCollectibleItemPoolType = getCollectibleItemPoolType
51
51
  end
52
- do
53
- local ____isPonyActive = require("features.isPonyActive")
54
- local isPonyActive = ____isPonyActive.isPonyActive
55
- ____exports.isPonyActive = isPonyActive
56
- end
57
52
  do
58
53
  local ____preventCollectibleRotate = require("features.preventCollectibleRotate")
59
54
  local preventCollectibleRotate = ____preventCollectibleRotate.preventCollectibleRotate
@@ -79,8 +79,6 @@ local ____forgottenSwitch = require("features.forgottenSwitch")
79
79
  local forgottenSwitchInit = ____forgottenSwitch.forgottenSwitchInit
80
80
  local ____getCollectibleItemPoolType = require("features.getCollectibleItemPoolType")
81
81
  local getCollectibleItemPoolTypeInit = ____getCollectibleItemPoolType.getCollectibleItemPoolTypeInit
82
- local ____isPonyActive = require("features.isPonyActive")
83
- local isPonyActiveInit = ____isPonyActive.isPonyActiveInit
84
82
  local ____preventCollectibleRotate = require("features.preventCollectibleRotate")
85
83
  local preventCollectibleRotateInit = ____preventCollectibleRotate.preventCollectibleRotateInit
86
84
  local ____runInNFrames = require("features.runInNFrames")
@@ -139,7 +137,6 @@ function initFeatures(self, mod)
139
137
  preventCollectibleRotateInit(nil, mod)
140
138
  runInNFramesInit(nil, mod)
141
139
  sirenHelpersInit(nil, mod)
142
- isPonyActiveInit(nil, mod)
143
140
  end
144
141
  function ____exports.upgradeMod(self, modVanilla, verbose)
145
142
  if verbose == nil then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.85",
3
+ "version": "1.2.86",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",