isaacscript-common 2.0.15 → 2.0.18

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.
Files changed (182) hide show
  1. package/dist/callbacks/itemPickup.lua +3 -3
  2. package/dist/callbacks/postCustomDoorEnter.d.ts +5 -3
  3. package/dist/callbacks/postDoorRender.d.ts +1 -0
  4. package/dist/callbacks/postDoorRender.lua +24 -0
  5. package/dist/callbacks/postDoorUpdate.d.ts +1 -0
  6. package/dist/callbacks/postDoorUpdate.lua +24 -0
  7. package/dist/callbacks/postEffectStateChanged.lua +1 -1
  8. package/dist/callbacks/postFamiliarStateChanged.lua +1 -1
  9. package/dist/callbacks/postGridEntity.lua +5 -4
  10. package/dist/callbacks/postGridEntityRender.d.ts +1 -0
  11. package/dist/callbacks/postGridEntityRender.lua +24 -0
  12. package/dist/callbacks/postItemDischarged.lua +5 -5
  13. package/dist/callbacks/postNPCStateChanged.lua +1 -1
  14. package/dist/callbacks/postPickupStateChanged.lua +1 -1
  15. package/dist/callbacks/postPitRender.d.ts +1 -0
  16. package/dist/callbacks/postPitRender.lua +24 -0
  17. package/dist/callbacks/postPitUpdate.d.ts +1 -0
  18. package/dist/callbacks/postPitUpdate.lua +24 -0
  19. package/dist/callbacks/postPlayerChangeType.lua +1 -1
  20. package/dist/callbacks/postPoopRender.d.ts +1 -0
  21. package/dist/callbacks/postPoopRender.lua +24 -0
  22. package/dist/callbacks/postPoopUpdate.d.ts +1 -0
  23. package/dist/callbacks/postPoopUpdate.lua +24 -0
  24. package/dist/callbacks/postPressurePlateRender.d.ts +1 -0
  25. package/dist/callbacks/postPressurePlateRender.lua +24 -0
  26. package/dist/callbacks/postPressurePlateUpdate.d.ts +1 -0
  27. package/dist/callbacks/postPressurePlateUpdate.lua +24 -0
  28. package/dist/callbacks/postRockRender.d.ts +1 -0
  29. package/dist/callbacks/postRockRender.lua +24 -0
  30. package/dist/callbacks/postRockUpdate.d.ts +1 -0
  31. package/dist/callbacks/postRockUpdate.lua +24 -0
  32. package/dist/callbacks/postSlotRender.lua +1 -1
  33. package/dist/callbacks/postSpikesRender.d.ts +1 -0
  34. package/dist/callbacks/postSpikesRender.lua +24 -0
  35. package/dist/callbacks/postSpikesUpdate.d.ts +1 -0
  36. package/dist/callbacks/postSpikesUpdate.lua +24 -0
  37. package/dist/callbacks/postTNTRender.d.ts +1 -0
  38. package/dist/callbacks/postTNTRender.lua +24 -0
  39. package/dist/callbacks/postTNTUpdate.d.ts +1 -0
  40. package/dist/callbacks/postTNTUpdate.lua +24 -0
  41. package/dist/callbacks/subscriptions/postDoorRender.d.ts +5 -0
  42. package/dist/callbacks/subscriptions/postDoorRender.lua +24 -0
  43. package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +5 -0
  44. package/dist/callbacks/subscriptions/postDoorUpdate.lua +24 -0
  45. package/dist/callbacks/subscriptions/postGridEntityBroken.d.ts +2 -1
  46. package/dist/callbacks/subscriptions/postGridEntityBroken.lua +8 -2
  47. package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts +2 -1
  48. package/dist/callbacks/subscriptions/postGridEntityCollision.lua +5 -0
  49. package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +2 -1
  50. package/dist/callbacks/subscriptions/postGridEntityInit.lua +8 -2
  51. package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +2 -1
  52. package/dist/callbacks/subscriptions/postGridEntityRemove.lua +5 -1
  53. package/dist/callbacks/subscriptions/postGridEntityRender.d.ts +6 -0
  54. package/dist/callbacks/subscriptions/postGridEntityRender.lua +29 -0
  55. package/dist/callbacks/subscriptions/postGridEntityStateChanged.d.ts +2 -1
  56. package/dist/callbacks/subscriptions/postGridEntityStateChanged.lua +8 -2
  57. package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +2 -1
  58. package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +8 -2
  59. package/dist/callbacks/subscriptions/postItemPickup.d.ts +9 -5
  60. package/dist/callbacks/subscriptions/postItemPickup.lua +2 -2
  61. package/dist/callbacks/subscriptions/postPitRender.d.ts +5 -0
  62. package/dist/callbacks/subscriptions/postPitRender.lua +24 -0
  63. package/dist/callbacks/subscriptions/postPitUpdate.d.ts +5 -0
  64. package/dist/callbacks/subscriptions/postPitUpdate.lua +24 -0
  65. package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +3 -2
  66. package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +5 -0
  67. package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +3 -2
  68. package/dist/callbacks/subscriptions/postPlayerChangeType.lua +8 -1
  69. package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +3 -2
  70. package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +5 -0
  71. package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +3 -2
  72. package/dist/callbacks/subscriptions/postPlayerInitLate.lua +5 -0
  73. package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts +3 -2
  74. package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +5 -0
  75. package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +3 -2
  76. package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +5 -0
  77. package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +3 -2
  78. package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +5 -0
  79. package/dist/callbacks/subscriptions/postPoopRender.d.ts +5 -0
  80. package/dist/callbacks/subscriptions/postPoopRender.lua +24 -0
  81. package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +5 -0
  82. package/dist/callbacks/subscriptions/postPoopUpdate.lua +24 -0
  83. package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +5 -0
  84. package/dist/callbacks/subscriptions/postPressurePlateRender.lua +24 -0
  85. package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +5 -0
  86. package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +24 -0
  87. package/dist/callbacks/subscriptions/postRockRender.d.ts +5 -0
  88. package/dist/callbacks/subscriptions/postRockRender.lua +24 -0
  89. package/dist/callbacks/subscriptions/postRockUpdate.d.ts +5 -0
  90. package/dist/callbacks/subscriptions/postRockUpdate.lua +24 -0
  91. package/dist/callbacks/subscriptions/postSacrifice.d.ts +4 -2
  92. package/dist/callbacks/subscriptions/postSacrifice.lua +13 -1
  93. package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts +1 -1
  94. package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +1 -1
  95. package/dist/callbacks/subscriptions/postSlotInit.d.ts +1 -1
  96. package/dist/callbacks/subscriptions/postSlotRender.d.ts +1 -1
  97. package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +1 -1
  98. package/dist/callbacks/subscriptions/postSpikesRender.d.ts +5 -0
  99. package/dist/callbacks/subscriptions/postSpikesRender.lua +24 -0
  100. package/dist/callbacks/subscriptions/postSpikesUpdate.d.ts +5 -0
  101. package/dist/callbacks/subscriptions/postSpikesUpdate.lua +24 -0
  102. package/dist/callbacks/subscriptions/postTNTRender.d.ts +5 -0
  103. package/dist/callbacks/subscriptions/postTNTRender.lua +24 -0
  104. package/dist/callbacks/subscriptions/postTNTUpdate.d.ts +5 -0
  105. package/dist/callbacks/subscriptions/postTNTUpdate.lua +24 -0
  106. package/dist/callbacks/subscriptions/preBerserkDeath.d.ts +3 -2
  107. package/dist/callbacks/subscriptions/preBerserkDeath.lua +5 -0
  108. package/dist/callbacks/subscriptions/preCustomRevive.d.ts +4 -2
  109. package/dist/callbacks/subscriptions/preCustomRevive.lua +15 -3
  110. package/dist/callbacks/subscriptions/preItemPickup.d.ts +9 -5
  111. package/dist/callbacks/subscriptions/preItemPickup.lua +2 -2
  112. package/dist/classes/DefaultMap.d.ts +8 -8
  113. package/dist/classes/DefaultMap.lua +3 -3
  114. package/dist/constants.d.ts +3 -2
  115. package/dist/constants.lua +2 -2
  116. package/dist/constantsMax.d.ts +15 -9
  117. package/dist/constantsMax.lua +7 -1
  118. package/dist/enums/ModCallbackCustom.d.ts +69 -54
  119. package/dist/enums/ModCallbackCustom.lua +84 -54
  120. package/dist/features/debugDisplay.d.ts +7 -0
  121. package/dist/features/debugDisplay.lua +117 -14
  122. package/dist/features/deployJSONRoom.lua +2 -2
  123. package/dist/features/extraConsoleCommands/commands.lua +32 -27
  124. package/dist/features/extraConsoleCommands/commandsDisplay.d.ts +63 -0
  125. package/dist/features/extraConsoleCommands/commandsDisplay.lua +49 -0
  126. package/dist/features/extraConsoleCommands/init.d.ts +2 -2
  127. package/dist/features/extraConsoleCommands/init.lua +12 -1
  128. package/dist/features/getCollectibleItemPoolType.lua +3 -2
  129. package/dist/features/playerInventory.lua +6 -6
  130. package/dist/features/preventCollectibleRotate.lua +7 -2
  131. package/dist/functions/array.lua +1 -1
  132. package/dist/functions/boss.d.ts +2 -3
  133. package/dist/functions/cards.lua +3 -1
  134. package/dist/functions/character.lua +2 -2
  135. package/dist/functions/charge.d.ts +6 -6
  136. package/dist/functions/collectibleCacheFlag.lua +3 -1
  137. package/dist/functions/collectibleSet.lua +3 -1
  138. package/dist/functions/collectibleTag.lua +3 -1
  139. package/dist/functions/collectibles.d.ts +1 -0
  140. package/dist/functions/collectibles.lua +32 -16
  141. package/dist/functions/entity.d.ts +1 -1
  142. package/dist/functions/entitySpecific.d.ts +4 -5
  143. package/dist/functions/entityTypes.d.ts +5 -0
  144. package/dist/functions/entityTypes.lua +10 -0
  145. package/dist/functions/familiars.d.ts +3 -3
  146. package/dist/functions/gridEntity.d.ts +0 -5
  147. package/dist/functions/gridEntity.lua +0 -14
  148. package/dist/functions/gridEntitySpecific.d.ts +18 -0
  149. package/dist/functions/gridEntitySpecific.lua +88 -0
  150. package/dist/functions/log.lua +2 -3
  151. package/dist/functions/npc.lua +3 -1
  152. package/dist/functions/npcTypes.d.ts +3 -0
  153. package/dist/functions/npcTypes.lua +7 -0
  154. package/dist/functions/pickupVariants.d.ts +13 -0
  155. package/dist/functions/pickupVariants.lua +22 -0
  156. package/dist/functions/pickups.lua +3 -1
  157. package/dist/functions/player.d.ts +7 -0
  158. package/dist/functions/player.lua +20 -9
  159. package/dist/functions/playerIndex.d.ts +2 -2
  160. package/dist/functions/rooms.d.ts +2 -3
  161. package/dist/functions/rooms.lua +5 -3
  162. package/dist/functions/run.lua +3 -1
  163. package/dist/functions/stage.d.ts +1 -1
  164. package/dist/functions/stage.lua +6 -5
  165. package/dist/functions/trinketCacheFlag.lua +3 -1
  166. package/dist/functions/trinketSet.lua +3 -1
  167. package/dist/functions/trinkets.lua +7 -3
  168. package/dist/index.d.ts +3 -0
  169. package/dist/index.lua +24 -0
  170. package/dist/initCustomCallbacks.lua +42 -0
  171. package/dist/initFeatures.lua +0 -3
  172. package/dist/maps/cardMap.lua +204 -202
  173. package/dist/maps/pillEffectMap.lua +82 -80
  174. package/dist/objects/callbackRegisterFunctions.lua +45 -0
  175. package/dist/objects/cardDescriptions.lua +1 -1
  176. package/dist/objects/cardNames.lua +1 -1
  177. package/dist/objects/cardTypes.lua +1 -1
  178. package/dist/types/AddCallbackParameterCustom.d.ts +30 -0
  179. package/dist/types/PickingUpItem.d.ts +2 -0
  180. package/dist/types/PickingUpItem.lua +10 -0
  181. package/dist/types/private/TSTLClassMetatable.d.ts +1 -1
  182. package/package.json +3 -3
@@ -5,6 +5,7 @@ local ____exports = {}
5
5
  local ____cachedClasses = require("cachedClasses")
6
6
  local itemConfig = ____cachedClasses.itemConfig
7
7
  local ____constantsMax = require("constantsMax")
8
+ local FIRST_COLLECTIBLE_TYPE = ____constantsMax.FIRST_COLLECTIBLE_TYPE
8
9
  local MAX_COLLECTIBLE_TYPE = ____constantsMax.MAX_COLLECTIBLE_TYPE
9
10
  local ____set = require("functions.set")
10
11
  local copySet = ____set.copySet
@@ -12,7 +13,8 @@ local ____utils = require("functions.utils")
12
13
  local irange = ____utils.irange
13
14
  local COLLECTIBLE_SET = __TS__New(Set)
14
15
  local function initCollectibleSet(self)
15
- for ____, collectibleType in ipairs(irange(nil, 1, MAX_COLLECTIBLE_TYPE)) do
16
+ for ____, collectibleTypeInt in ipairs(irange(nil, FIRST_COLLECTIBLE_TYPE, MAX_COLLECTIBLE_TYPE)) do
17
+ local collectibleType = collectibleTypeInt
16
18
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
17
19
  if itemConfigItem ~= nil then
18
20
  COLLECTIBLE_SET:add(collectibleType)
@@ -9,6 +9,7 @@ local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
9
9
  local ____cachedClasses = require("cachedClasses")
10
10
  local itemConfig = ____cachedClasses.itemConfig
11
11
  local ____constantsMax = require("constantsMax")
12
+ local FIRST_COLLECTIBLE_TYPE = ____constantsMax.FIRST_COLLECTIBLE_TYPE
12
13
  local MAX_COLLECTIBLE_TYPE = ____constantsMax.MAX_COLLECTIBLE_TYPE
13
14
  local ____enums = require("functions.enums")
14
15
  local getEnumValues = ____enums.getEnumValues
@@ -35,7 +36,8 @@ local function initTagMap(self)
35
36
  __TS__New(Set)
36
37
  )
37
38
  end
38
- for ____, collectibleType in ipairs(irange(nil, 1, MAX_COLLECTIBLE_TYPE)) do
39
+ for ____, collectibleTypeInt in ipairs(irange(nil, FIRST_COLLECTIBLE_TYPE, MAX_COLLECTIBLE_TYPE)) do
40
+ local collectibleType = collectibleTypeInt
39
41
  for ____, itemConfigTag in ipairs(getEnumValues(nil, ItemConfigTag)) do
40
42
  do
41
43
  if not ____exports.collectibleHasTag(nil, collectibleType, itemConfigTag) then
@@ -123,6 +123,7 @@ export declare function isPassiveCollectible(collectibleType: CollectibleType):
123
123
  * dynamically know if a modded item will disappear.
124
124
  */
125
125
  export declare function isSingleUseCollectible(collectibleType: CollectibleType): boolean;
126
+ export declare function isValidCollectibleType(collectibleType: CollectibleType): boolean;
126
127
  /**
127
128
  * Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
128
129
  * should remove an item.
@@ -21,8 +21,12 @@ local COLLECTIBLE_NAME_MAP = ____collectibleNameMap.COLLECTIBLE_NAME_MAP
21
21
  local DEFAULT_COLLECTIBLE_NAME = ____collectibleNameMap.DEFAULT_COLLECTIBLE_NAME
22
22
  local ____singleUseActiveCollectibleTypesSet = require("sets.singleUseActiveCollectibleTypesSet")
23
23
  local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = ____singleUseActiveCollectibleTypesSet.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET
24
+ local ____entity = require("functions.entity")
25
+ local getEntityID = ____entity.getEntityID
24
26
  local ____flag = require("functions.flag")
25
27
  local hasFlag = ____flag.hasFlag
28
+ local ____pickupVariants = require("functions.pickupVariants")
29
+ local isCollectible = ____pickupVariants.isCollectible
26
30
  local ____roomData = require("functions.roomData")
27
31
  local getRoomListIndex = ____roomData.getRoomListIndex
28
32
  local ____sprite = require("functions.sprite")
@@ -36,8 +40,9 @@ function initQuestionMarkSprite(self)
36
40
  return sprite
37
41
  end
38
42
  function ____exports.setCollectibleSprite(self, collectible, pngPath)
39
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
40
- error("You cannot set a collectible sprite for pickups of variant: " .. tostring(collectible.Variant))
43
+ if not isCollectible(nil, collectible) then
44
+ local entityID = getEntityID(nil, collectible)
45
+ error("The \"setCollectibleSprite\" function was given a non-collectible: " .. entityID)
41
46
  end
42
47
  local sprite = collectible:GetSprite()
43
48
  if pngPath == nil then
@@ -116,8 +121,9 @@ function ____exports.getCollectibleGfxFilename(self, collectibleType)
116
121
  return itemConfigItem.GfxFileName
117
122
  end
118
123
  function ____exports.getCollectibleIndex(self, collectible)
119
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
120
- error("You cannot get a collectible index for pickups of variant: " .. tostring(collectible.Variant))
124
+ if not isCollectible(nil, collectible) then
125
+ local entityID = getEntityID(nil, collectible)
126
+ error("The \"getCollectibleIndex\" function was given a non-collectible: " .. entityID)
121
127
  end
122
128
  local level = game:GetLevel()
123
129
  local stage = level:GetStage()
@@ -164,8 +170,9 @@ function ____exports.getCollectibleName(self, collectibleType)
164
170
  return DEFAULT_COLLECTIBLE_NAME
165
171
  end
166
172
  function ____exports.getCollectiblePedestalType(self, collectible)
167
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
168
- error("You cannot get the pedestal type for pickups of variant: " .. tostring(collectible.Variant))
173
+ if not isCollectible(nil, collectible) then
174
+ local entityID = getEntityID(nil, collectible)
175
+ error("The \"getCollectiblePedestalType\" function was given a non-collectible: " .. entityID)
169
176
  end
170
177
  local sprite = collectible:GetSprite()
171
178
  return sprite:GetOverlayFrame()
@@ -186,8 +193,9 @@ function ____exports.isActiveCollectible(self, collectibleType)
186
193
  return itemType == ItemType.ACTIVE
187
194
  end
188
195
  function ____exports.isBlindCollectible(self, collectible)
189
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
190
- error("You cannot get check for question mark sprites for pickups of variant: " .. tostring(collectible.Variant))
196
+ if not isCollectible(nil, collectible) then
197
+ local entityID = getEntityID(nil, collectible)
198
+ error("The \"isBlindCollectible\" function was given a non-collectible: " .. entityID)
191
199
  end
192
200
  local sprite = collectible:GetSprite()
193
201
  local animation = sprite:GetAnimation()
@@ -205,32 +213,40 @@ end
205
213
  function ____exports.isSingleUseCollectible(self, collectibleType)
206
214
  return SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET:has(collectibleType)
207
215
  end
216
+ function ____exports.isValidCollectibleType(self, collectibleType)
217
+ local itemConfigItem = itemConfig:GetCollectible(collectibleType)
218
+ return itemConfigItem ~= nil
219
+ end
208
220
  function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
209
221
  local collectibleName = ____exports.getCollectibleName(nil, collectibleType)
210
222
  Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
211
223
  end
212
224
  function ____exports.removeCollectiblePickupDelay(self, collectible)
213
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
214
- error("You cannot remove pickup delay for pickups of variant: " .. tostring(collectible.Variant))
225
+ if not isCollectible(nil, collectible) then
226
+ local entityID = getEntityID(nil, collectible)
227
+ error("The \"removeCollectiblePickupDelay\" function was given a non-collectible: " .. entityID)
215
228
  end
216
229
  collectible.Wait = 0
217
230
  end
218
231
  function ____exports.setCollectibleBlind(self, collectible)
219
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
220
- error("You cannot set a collectible to be blind for pickups of variant: " .. tostring(collectible.Variant))
232
+ if not isCollectible(nil, collectible) then
233
+ local entityID = getEntityID(nil, collectible)
234
+ error("The \"setCollectibleBlind\" function was given a non-collectible: " .. entityID)
221
235
  end
222
236
  ____exports.setCollectibleSprite(nil, collectible, BLIND_ITEM_PNG_PATH)
223
237
  end
224
238
  function ____exports.setCollectibleEmpty(self, collectible)
225
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
226
- error("You cannot set a collectible to be empty for pickups of variant: " .. tostring(collectible.Variant))
239
+ if not isCollectible(nil, collectible) then
240
+ local entityID = getEntityID(nil, collectible)
241
+ error("The \"setCollectibleEmpty\" function was given a non-collectible: " .. entityID)
227
242
  end
228
243
  collectible.SubType = CollectibleType.NULL
229
244
  ____exports.clearCollectibleSprite(nil, collectible)
230
245
  end
231
246
  function ____exports.setCollectibleSubType(self, collectible, newCollectibleType)
232
- if collectible.Variant ~= PickupVariant.COLLECTIBLE then
233
- error("You cannot set a collectible sub-type for pickups of variant: " .. tostring(collectible.Variant))
247
+ if not isCollectible(nil, collectible) then
248
+ local entityID = getEntityID(nil, collectible)
249
+ error("The \"setCollectibleSubType\" function was given a non-collectible: " .. entityID)
234
250
  end
235
251
  if newCollectibleType == CollectibleType.NULL then
236
252
  ____exports.setCollectibleEmpty(nil, collectible)
@@ -98,7 +98,7 @@ export declare function parseEntityTypeVariantString(entityTypeVariantString: st
98
98
  * @param cap Optional. If specified, will only remove the given amount of collectibles.
99
99
  * @returns True if one or more entities were removed, false otherwise.
100
100
  */
101
- export declare function removeAllMatchingEntities(entityType: int, entityVariant?: number, entitySubType?: number, cap?: int | undefined): boolean;
101
+ export declare function removeAllMatchingEntities(entityType: EntityType, entityVariant?: number, entitySubType?: number, cap?: int | undefined): boolean;
102
102
  /**
103
103
  * Helper function to remove all of the entities in the supplied array.
104
104
  *
@@ -1,5 +1,4 @@
1
1
  import { BombVariant, EffectVariant, EntityType, FamiliarVariant, KnifeVariant, LaserVariant, PickupVariant, ProjectileVariant, SlotVariant, TearVariant } from "isaac-typescript-definitions";
2
- import { EntityTypeNonNPC } from "../types/EntityTypeNonNPC";
3
2
  /**
4
3
  * Helper function to get all of the `EntityType.BOMB` in the room.
5
4
  *
@@ -105,7 +104,7 @@ export declare function getProjectiles(projectileVariant?: ProjectileVariant, su
105
104
  * }
106
105
  * ```
107
106
  */
108
- export declare function getSlots(slotVariant?: SlotVariant, subType?: number): Entity[];
107
+ export declare function getSlots(slotVariant?: SlotVariant, subType?: number): EntitySlot[];
109
108
  /**
110
109
  * Helper function to get all of the `EntityType.TEAR` in the room.
111
110
  *
@@ -230,9 +229,9 @@ export declare function spawnLaser(laserVariant: LaserVariant, subType: int, pos
230
229
  /** Helper function to spawn a `EntityType.LASER` (7) with a specific seed. */
231
230
  export declare function spawnLaserWithSeed(laserVariant: LaserVariant, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityLaser;
232
231
  /** Helper function to spawn an NPC. */
233
- export declare function spawnNPC<T extends EntityType>(entityType: T extends EntityTypeNonNPC ? never : T, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityNPC;
232
+ export declare function spawnNPC(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityNPC;
234
233
  /** Helper function to spawn an NPC with a specific seed. */
235
- export declare function spawnNPCWithSeed<T extends EntityType>(entityType: T extends EntityTypeNonNPC ? never : T, variant: int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityNPC;
234
+ export declare function spawnNPCWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityNPC;
236
235
  /** Helper function to spawn a `EntityType.PICKUP` (5). */
237
236
  export declare function spawnPickup(pickupVariant: PickupVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
238
237
  /** Helper function to spawn a `EntityType.PICKUP` (5) with a specific seed. */
@@ -244,7 +243,7 @@ export declare function spawnProjectileWithSeed(projectileVariant: ProjectileVar
244
243
  /** Helper function to spawn a `EntityType.SLOT` (6). */
245
244
  export declare function spawnSlot(slotVariant: SlotVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): Entity;
246
245
  /** Helper function to spawn a `EntityType.SLOT` (6) with a specific seed. */
247
- export declare function spawnSlotWithSeed(slotVariant: int | SlotVariant, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): Entity;
246
+ export declare function spawnSlotWithSeed(slotVariant: SlotVariant, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): Entity;
248
247
  /** Helper function to spawn a `EntityType.TEAR` (2). */
249
248
  export declare function spawnTear(tearVariant: TearVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityTear;
250
249
  /** Helper function to spawn a `EntityType.EntityType` (2) with a specific seed. */
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ /** For EntityType.RAGLING (246) */
3
+ export declare function isSlot(entity: Entity): entity is EntitySlot;
4
+ /** For EntityType.RAGLING (246) */
5
+ export declare function isRagling(npc: EntityNPC): npc is EntityNPCRagling;
@@ -0,0 +1,10 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
4
+ function ____exports.isSlot(self, entity)
5
+ return entity.Type == EntityType.SLOT
6
+ end
7
+ function ____exports.isRagling(self, npc)
8
+ return npc.Type == EntityType.RAGLING
9
+ end
10
+ return ____exports
@@ -1,4 +1,4 @@
1
- /// <reference types="isaac-typescript-definitions" />
1
+ import { CollectibleType, FamiliarVariant } from "isaac-typescript-definitions";
2
2
  /**
3
3
  * Helper function to add and remove familiars based on a target amount that you specify.
4
4
  *
@@ -28,7 +28,7 @@
28
28
  * specified, it will search for existing familiars of all sub-types, and
29
29
  * spawn new familiars with a sub-type of 0.
30
30
  */
31
- export declare function checkFamiliar(player: EntityPlayer, collectibleType: int, targetCount: int, familiarVariant: int, familiarSubType?: int): void;
31
+ export declare function checkFamiliar(player: EntityPlayer, collectibleType: CollectibleType, targetCount: int, familiarVariant: FamiliarVariant, familiarSubType?: int): void;
32
32
  /**
33
33
  * Helper function to add and remove familiars based on the amount of associated collectibles that a
34
34
  * player has.
@@ -56,5 +56,5 @@ export declare function checkFamiliar(player: EntityPlayer, collectibleType: int
56
56
  * specified, it will search for existing familiars of all sub-types, and
57
57
  * spawn new familiars with a sub-type of 0.
58
58
  */
59
- export declare function checkFamiliarFromCollectibles(player: EntityPlayer, collectibleType: int, familiarVariant: int, familiarSubType?: int): void;
59
+ export declare function checkFamiliarFromCollectibles(player: EntityPlayer, collectibleType: CollectibleType, familiarVariant: FamiliarVariant, familiarSubType?: int): void;
60
60
  export declare function isFamiliarThatShootsPlayerTears(familiar: EntityFamiliar): boolean;
@@ -55,11 +55,6 @@ export declare function getTopLeftWall(): GridEntity | undefined;
55
55
  * room shape is.)
56
56
  */
57
57
  export declare function getTopLeftWallGridIndex(): int;
58
- /**
59
- * Helper function to determine if all of the pressure plates in the current room are pushed.
60
- * Returns true if there are no pressure plates in the room.
61
- */
62
- export declare function isAllPressurePlatesPushed(): boolean;
63
58
  export declare function isGridEntityBreakableByExplosion(gridEntity: GridEntity): boolean;
64
59
  /**
65
60
  * Helper function to see if the provided gridEntity is in its respective broken state. See the
@@ -3,14 +3,12 @@ local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
5
5
  local Map = ____lualib.Map
6
- local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
7
6
  local ____exports = {}
8
7
  local getAllGridEntities
9
8
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
10
9
  local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
11
10
  local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
12
11
  local PoopGridEntityVariant = ____isaac_2Dtypescript_2Ddefinitions.PoopGridEntityVariant
13
- local PressurePlateState = ____isaac_2Dtypescript_2Ddefinitions.PressurePlateState
14
12
  local StatueVariant = ____isaac_2Dtypescript_2Ddefinitions.StatueVariant
15
13
  local TrapdoorVariant = ____isaac_2Dtypescript_2Ddefinitions.TrapdoorVariant
16
14
  local ____cachedClasses = require("cachedClasses")
@@ -191,18 +189,6 @@ function ____exports.getTopLeftWall(self)
191
189
  local topLeftWallGridIndex = ____exports.getTopLeftWallGridIndex(nil)
192
190
  return room:GetGridEntity(topLeftWallGridIndex)
193
191
  end
194
- function ____exports.isAllPressurePlatesPushed(self)
195
- local room = game:GetRoom()
196
- local hasPressurePlates = room:HasTriggerPressurePlates()
197
- if not hasPressurePlates then
198
- return true
199
- end
200
- local pressurePlates = ____exports.getGridEntities(nil, GridEntityType.PRESSURE_PLATE)
201
- return __TS__ArrayEvery(
202
- pressurePlates,
203
- function(____, pressurePlate) return pressurePlate.State == PressurePlateState.PRESSURE_PLATE_PRESSED end
204
- )
205
- end
206
192
  function ____exports.isGridEntityBreakableByExplosion(self, gridEntity)
207
193
  local gridEntityType = gridEntity:GetType()
208
194
  local gridEntityVariant = gridEntity:GetVariant()
@@ -0,0 +1,18 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ /** Helper function to get all of the `GridEntityPit` in the room. */
3
+ export declare function getPits(): GridEntityPit[];
4
+ /** Helper function to get all of the `GridEntityPoop` in the room. */
5
+ export declare function getPoops(): GridEntityPoop[];
6
+ /** Helper function to get all of the `GridEntityPressurePlate` in the room. */
7
+ export declare function getPressurePlates(): GridEntityPressurePlate[];
8
+ /** Helper function to get all of the `GridEntityRock` in the room. */
9
+ export declare function getRocks(): GridEntityRock[];
10
+ /** Helper function to get all of the `GridEntitySpikes` in the room. */
11
+ export declare function getSpikes(): GridEntitySpikes[];
12
+ /** Helper function to get all of the `GridEntityTNT` in the room. */
13
+ export declare function getTNT(): GridEntityTNT[];
14
+ /**
15
+ * Helper function to determine if all of the pressure plates in the current room are pushed.
16
+ * Returns true if there are no pressure plates in the room.
17
+ */
18
+ export declare function isAllPressurePlatesPushed(): boolean;
@@ -0,0 +1,88 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
3
+ local ____exports = {}
4
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
5
+ local PressurePlateState = ____isaac_2Dtypescript_2Ddefinitions.PressurePlateState
6
+ local ____cachedClasses = require("cachedClasses")
7
+ local game = ____cachedClasses.game
8
+ local ____gridEntity = require("functions.gridEntity")
9
+ local getGridEntities = ____gridEntity.getGridEntities
10
+ function ____exports.getPits(self)
11
+ local gridEntities = getGridEntities(nil)
12
+ local pits = {}
13
+ for ____, gridEntity in ipairs(gridEntities) do
14
+ local pit = gridEntity:ToPit()
15
+ if pit ~= nil then
16
+ pits[#pits + 1] = pit
17
+ end
18
+ end
19
+ return pits
20
+ end
21
+ function ____exports.getPoops(self)
22
+ local gridEntities = getGridEntities(nil)
23
+ local poops = {}
24
+ for ____, gridEntity in ipairs(gridEntities) do
25
+ local poop = gridEntity:ToPoop()
26
+ if poop ~= nil then
27
+ poops[#poops + 1] = poop
28
+ end
29
+ end
30
+ return poops
31
+ end
32
+ function ____exports.getPressurePlates(self)
33
+ local gridEntities = getGridEntities(nil)
34
+ local pressurePlates = {}
35
+ for ____, gridEntity in ipairs(gridEntities) do
36
+ local pressurePlate = gridEntity:ToPressurePlate()
37
+ if pressurePlate ~= nil then
38
+ pressurePlates[#pressurePlates + 1] = pressurePlate
39
+ end
40
+ end
41
+ return pressurePlates
42
+ end
43
+ function ____exports.getRocks(self)
44
+ local gridEntities = getGridEntities(nil)
45
+ local rocks = {}
46
+ for ____, gridEntity in ipairs(gridEntities) do
47
+ local rock = gridEntity:ToRock()
48
+ if rock ~= nil then
49
+ rocks[#rocks + 1] = rock
50
+ end
51
+ end
52
+ return rocks
53
+ end
54
+ function ____exports.getSpikes(self)
55
+ local gridEntities = getGridEntities(nil)
56
+ local spikes = {}
57
+ for ____, gridEntity in ipairs(gridEntities) do
58
+ local spike = gridEntity:ToSpikes()
59
+ if spike ~= nil then
60
+ spikes[#spikes + 1] = spike
61
+ end
62
+ end
63
+ return spikes
64
+ end
65
+ function ____exports.getTNT(self)
66
+ local gridEntities = getGridEntities(nil)
67
+ local tntArray = {}
68
+ for ____, gridEntity in ipairs(gridEntities) do
69
+ local tnt = gridEntity:ToTNT()
70
+ if tnt ~= nil then
71
+ tntArray[#tntArray + 1] = tnt
72
+ end
73
+ end
74
+ return tntArray
75
+ end
76
+ function ____exports.isAllPressurePlatesPushed(self)
77
+ local room = game:GetRoom()
78
+ local hasPressurePlates = room:HasTriggerPressurePlates()
79
+ if not hasPressurePlates then
80
+ return true
81
+ end
82
+ local pressurePlates = ____exports.getPressurePlates(nil)
83
+ return __TS__ArrayEvery(
84
+ pressurePlates,
85
+ function(____, pressurePlate) return pressurePlate.State == PressurePlateState.PRESSURE_PLATE_PRESSED end
86
+ )
87
+ end
88
+ return ____exports
@@ -10,7 +10,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
10
10
  local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
11
11
  local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
12
12
  local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
13
- local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
14
13
  local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
15
14
  local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
16
15
  local LevelStateFlag = ____isaac_2Dtypescript_2Ddefinitions.LevelStateFlag
@@ -157,7 +156,8 @@ function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
157
156
  if entityTypeFilter ~= nil and entity.Type ~= entityTypeFilter then
158
157
  return
159
158
  end
160
- if not includeBackgroundEffects and entity.Type == EntityType.EFFECT and IGNORE_EFFECT_VARIANTS:has(entity.Variant) then
159
+ local effect = entity:ToEffect()
160
+ if not includeBackgroundEffects and effect ~= nil and IGNORE_EFFECT_VARIANTS:has(effect.Variant) then
161
161
  return
162
162
  end
163
163
  local entityID = getEntityID(nil, entity)
@@ -166,7 +166,6 @@ function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
166
166
  if bomb ~= nil then
167
167
  msg = msg .. " (bomb)"
168
168
  end
169
- local effect = entity:ToEffect()
170
169
  if effect ~= nil then
171
170
  msg = msg .. (" (effect) (State: " .. tostring(effect.State)) .. ")"
172
171
  end
@@ -27,6 +27,8 @@ local getFilteredNewEntities = ____entity.getFilteredNewEntities
27
27
  local ____entitySpecific = require("functions.entitySpecific")
28
28
  local getNPCs = ____entitySpecific.getNPCs
29
29
  local getProjectiles = ____entitySpecific.getProjectiles
30
+ local ____entityTypes = require("functions.entityTypes")
31
+ local isRagling = ____entityTypes.isRagling
30
32
  function ____exports.isAliveExceptionNPC(self, npc)
31
33
  local entityTypeVariant = (tostring(npc.Type) .. ".") .. tostring(npc.Variant)
32
34
  if NON_ALIVE_NPCS_TYPE_VARIANT:has(entityTypeVariant) then
@@ -48,7 +50,7 @@ function ____exports.isDyingEggyWithNoSpidersLeft(self, npc)
48
50
  return npc.State == NpcState.SUICIDE and npc.StateFrame >= EGGY_STATE_FRAME_OF_FINAL_SPIDER
49
51
  end
50
52
  function ____exports.isRaglingDeathPatch(self, npc)
51
- return npc.Type == EntityType.RAGLING and npc.Variant == RaglingVariant.RAG_MANS_RAGLING and npc.State == NpcState.SPECIAL
53
+ return isRagling(nil, npc) and npc.Variant == RaglingVariant.RAG_MANS_RAGLING and npc.State == NpcState.SPECIAL
52
54
  end
53
55
  NON_ALIVE_NPCS_TYPE_VARIANT = __TS__New(
54
56
  Set,
@@ -0,0 +1,3 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ /** For EntityType.RAGLING (246) */
3
+ export declare function isRagling(npc: EntityNPC): npc is EntityNPCRagling;
@@ -0,0 +1,7 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
4
+ function ____exports.isRagling(self, npc)
5
+ return npc.Type == EntityType.RAGLING
6
+ end
7
+ return ____exports
@@ -0,0 +1,13 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ /** For PickupVariant.HEART (10) */
3
+ export declare function isHeart(pickup: EntityPickup): pickup is EntityPickupHeart;
4
+ /** For PickupVariant.COIN (20) */
5
+ export declare function isCoin(pickup: EntityPickup): pickup is EntityPickupCoin;
6
+ /** For PickupVariant.KEY (30) */
7
+ export declare function isKey(pickup: EntityPickup): pickup is EntityPickupKey;
8
+ /** For PickupVariant.BOMB (40) */
9
+ export declare function isBomb(pickup: EntityPickup): pickup is EntityPickupBomb;
10
+ /** For PickupVariant.COLLECTIBLE (100) */
11
+ export declare function isCollectible(pickup: EntityPickup): pickup is EntityPickupCollectible;
12
+ /** For PickupVariant.TRINKET (350) */
13
+ export declare function isTrinket(pickup: EntityPickup): pickup is EntityPickupTrinket;
@@ -0,0 +1,22 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
4
+ function ____exports.isHeart(self, pickup)
5
+ return pickup.Variant == PickupVariant.HEART
6
+ end
7
+ function ____exports.isCoin(self, pickup)
8
+ return pickup.Variant == PickupVariant.COIN
9
+ end
10
+ function ____exports.isKey(self, pickup)
11
+ return pickup.Variant == PickupVariant.KEY
12
+ end
13
+ function ____exports.isBomb(self, pickup)
14
+ return pickup.Variant == PickupVariant.BOMB
15
+ end
16
+ function ____exports.isCollectible(self, pickup)
17
+ return pickup.Variant == PickupVariant.COLLECTIBLE
18
+ end
19
+ function ____exports.isTrinket(self, pickup)
20
+ return pickup.Variant == PickupVariant.TRINKET
21
+ end
22
+ return ____exports
@@ -16,6 +16,8 @@ local ____entitySpecific = require("functions.entitySpecific")
16
16
  local getPickups = ____entitySpecific.getPickups
17
17
  local removeAllPickups = ____entitySpecific.removeAllPickups
18
18
  local spawnPickup = ____entitySpecific.spawnPickup
19
+ local ____pickupVariants = require("functions.pickupVariants")
20
+ local isHeart = ____pickupVariants.isHeart
19
21
  function ____exports.getBatteries(self, matchingSubType)
20
22
  if matchingSubType == nil then
21
23
  matchingSubType = -1
@@ -85,7 +87,7 @@ function ____exports.isChest(self, pickup)
85
87
  return CHEST_PICKUP_VARIANTS:has(pickup.Variant)
86
88
  end
87
89
  function ____exports.isRedHeart(self, pickup)
88
- return pickup.Variant == PickupVariant.HEART and RED_HEART_SUB_TYPES_SET:has(pickup.SubType)
90
+ return isHeart(nil, pickup) and RED_HEART_SUB_TYPES_SET:has(pickup.SubType)
89
91
  end
90
92
  function ____exports.removeAllBatteries(self, batterySubType, cap)
91
93
  return removeAllPickups(nil, PickupVariant.LIL_BATTERY, batterySubType, cap)
@@ -160,6 +160,13 @@ export declare function getPlayersOfType(...characters: PlayerType[]): EntityPla
160
160
  * check for. It only returns the players that have all of the collectibles.
161
161
  */
162
162
  export declare function getPlayersWithCollectible(...collectibleTypes: CollectibleType[]): EntityPlayer[];
163
+ /**
164
+ * Helper function to get only the players that have a certain trinket.
165
+ *
166
+ * This function is variadic, meaning that you can supply as many trinket types as you want to check
167
+ * for. It only returns the players that have all of the trinkets.
168
+ */
169
+ export declare function getPlayersWithTrinket(...trinketTypes: TrinketType[]): EntityPlayer[];
163
170
  /**
164
171
  * Helper function to determine how many heart containers that Tainted Magdalene has that will not
165
172
  * be automatically depleted over time. By default, this is 2, but this function will return 4 so
@@ -398,6 +398,17 @@ function ____exports.getPlayersWithCollectible(self, ...)
398
398
  ) end
399
399
  )
400
400
  end
401
+ function ____exports.getPlayersWithTrinket(self, ...)
402
+ local trinketTypes = {...}
403
+ local players = getPlayers(nil)
404
+ return __TS__ArrayFilter(
405
+ players,
406
+ function(____, player) return __TS__ArrayEvery(
407
+ trinketTypes,
408
+ function(____, trinketType) return player:HasTrinket(trinketType) end
409
+ ) end
410
+ )
411
+ end
401
412
  function ____exports.getTaintedMagdaleneNonTemporaryMaxHearts(self, player)
402
413
  local maxHearts = player:GetMaxHearts()
403
414
  local hasBirthright = player:HasCollectible(CollectibleType.BIRTHRIGHT)
@@ -516,9 +527,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
516
527
  itemPool:RemoveCollectible(collectibleType)
517
528
  end
518
529
  repeat
519
- local ____switch110 = activeSlot
520
- local ____cond110 = ____switch110 == ActiveSlot.PRIMARY
521
- if ____cond110 then
530
+ local ____switch113 = activeSlot
531
+ local ____cond113 = ____switch113 == ActiveSlot.PRIMARY
532
+ if ____cond113 then
522
533
  do
523
534
  if primaryCollectibleType ~= CollectibleType.NULL then
524
535
  player:RemoveCollectible(primaryCollectibleType)
@@ -527,8 +538,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
527
538
  break
528
539
  end
529
540
  end
530
- ____cond110 = ____cond110 or ____switch110 == ActiveSlot.SECONDARY
531
- if ____cond110 then
541
+ ____cond113 = ____cond113 or ____switch113 == ActiveSlot.SECONDARY
542
+ if ____cond113 then
532
543
  do
533
544
  if primaryCollectibleType ~= CollectibleType.NULL then
534
545
  player:RemoveCollectible(primaryCollectibleType)
@@ -543,16 +554,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
543
554
  break
544
555
  end
545
556
  end
546
- ____cond110 = ____cond110 or ____switch110 == ActiveSlot.POCKET
547
- if ____cond110 then
557
+ ____cond113 = ____cond113 or ____switch113 == ActiveSlot.POCKET
558
+ if ____cond113 then
548
559
  do
549
560
  player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
550
561
  player:SetActiveCharge(charge, activeSlot)
551
562
  break
552
563
  end
553
564
  end
554
- ____cond110 = ____cond110 or ____switch110 == ActiveSlot.POCKET_SINGLE_USE
555
- if ____cond110 then
565
+ ____cond113 = ____cond113 or ____switch113 == ActiveSlot.POCKET_SINGLE_USE
566
+ if ____cond113 then
556
567
  do
557
568
  player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
558
569
  break
@@ -51,8 +51,8 @@ export declare function getPlayerIndexVanilla(playerToFind: EntityPlayer): int |
51
51
  * If this is not desired, use the `getAllPlayers` helper function instead.
52
52
  *
53
53
  * @param performCharacterExclusions Whether or not to exclude characters that are not directly
54
- * controlled by the player (i.e. Esau & Tainted Soul). Default is
55
- * false.
54
+ * controlled by the player (i.e. Esau & Tainted Soul). Default is
55
+ * false.
56
56
  */
57
57
  export declare function getPlayers(performCharacterExclusions?: boolean): EntityPlayer[];
58
58
  /**
@@ -53,9 +53,8 @@ export declare function getRoomTypeName(roomType: RoomType): string;
53
53
  * the list.
54
54
  *
55
55
  * @param includeExtraDimensionalRooms Optional. On some floors (e.g. Downpour 2, Mines 2),
56
- * extra-dimensional rooms are automatically be generated and
57
- * can be seen when you iterate over the `RoomList`. Default is
58
- * false.
56
+ * extra-dimensional rooms are automatically be generated and can be
57
+ * seen when you iterate over the `RoomList`. Default is false.
59
58
  */
60
59
  export declare function getRooms(includeExtraDimensionalRooms?: boolean): RoomDescriptor[];
61
60
  /**