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
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postPressurePlateRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postPressurePlateRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postPressurePlateRenderFire(self, pressurePlate)
11
+ local gridEntityVariant = pressurePlate:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, pressurePlate)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostPressurePlateUpdateRegisterParameters = [
3
+ callback: (pressurePlate: GridEntityPressurePlate) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postPressurePlateUpdateHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postPressurePlateUpdateRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postPressurePlateUpdateFire(self, pressurePlate)
11
+ local gridEntityVariant = pressurePlate:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, pressurePlate)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostRockRenderRegisterParameters = [
3
+ callback: (rock: GridEntityRock) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postRockRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postRockRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postRockRenderFire(self, rock)
11
+ local gridEntityVariant = rock:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, rock)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostRockUpdateRegisterParameters = [
3
+ callback: (rock: GridEntityRock) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postRockUpdateHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postRockUpdateRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postRockUpdateFire(self, rock)
11
+ local gridEntityVariant = rock:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, rock)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -1,4 +1,6 @@
1
- /// <reference types="isaac-typescript-definitions" />
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostSacrificeRegisterParameters = [
3
- callback: (player: EntityPlayer, numSacrifices: int) => void
3
+ callback: (player: EntityPlayer, numSacrifices: int) => void,
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
4
6
  ];
@@ -8,9 +8,21 @@ function ____exports.postSacrificeRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postSacrificeFire(self, player, numSacrifices)
11
+ local character = player:GetPlayerType()
11
12
  for ____, ____value in ipairs(subscriptions) do
12
13
  local callback = ____value[1]
13
- callback(nil, player, numSacrifices)
14
+ local playerVariant = ____value[2]
15
+ local callbackCharacter = ____value[3]
16
+ do
17
+ if playerVariant ~= nil and playerVariant ~= player.Variant then
18
+ goto __continue5
19
+ end
20
+ if callbackCharacter ~= nil and callbackCharacter ~= character then
21
+ goto __continue5
22
+ end
23
+ callback(nil, player, numSacrifices)
24
+ end
25
+ ::__continue5::
14
26
  end
15
27
  end
16
28
  return ____exports
@@ -1,5 +1,5 @@
1
1
  import { SlotVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostSlotAnimationChangedRegisterParameters = [
3
- callback: (slot: Entity, previousAnimation: string, currentAnimation: string) => void,
3
+ callback: (slot: EntitySlot, previousAnimation: string, currentAnimation: string) => void,
4
4
  slotVariant?: SlotVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { SlotVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostSlotDestroyedRegisterParameters = [
3
- callback: (slot: Entity) => void,
3
+ callback: (slot: EntitySlot) => void,
4
4
  slotVariant?: SlotVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { SlotVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostSlotInitRegisterParameters = [
3
- callback: (slot: Entity) => void,
3
+ callback: (slot: EntitySlot) => void,
4
4
  slotVariant?: SlotVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { SlotVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostSlotRenderRegisterParameters = [
3
- callback: (slot: Entity) => void,
3
+ callback: (slot: EntitySlot) => void,
4
4
  slotVariant?: SlotVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { SlotVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostSlotUpdateRegisterParameters = [
3
- callback: (slot: Entity) => void,
3
+ callback: (slot: EntitySlot) => void,
4
4
  slotVariant?: SlotVariant
5
5
  ];
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostSpikesRenderRegisterParameters = [
3
+ callback: (spikes: GridEntitySpikes) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postSpikesRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postSpikesRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postSpikesRenderFire(self, spikes)
11
+ local gridEntityVariant = spikes:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, spikes)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostSpikesUpdateRegisterParameters = [
3
+ callback: (spikes: GridEntitySpikes) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postSpikesUpdateHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postSpikesUpdateRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postSpikesUpdateFire(self, spikes)
11
+ local gridEntityVariant = spikes:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, spikes)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostTNTRenderRegisterParameters = [
3
+ callback: (tnt: GridEntityTNT) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postTNTRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postTNTRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postTNTRenderFire(self, tnt)
11
+ local gridEntityVariant = tnt:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, tnt)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostTNTUpdateRegisterParameters = [
3
+ callback: (tnt: GridEntityTNT) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postTNTUpdateHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postTNTUpdateRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postTNTUpdateFire(self, tnt)
11
+ local gridEntityVariant = tnt:GetVariant()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackGridEntityVariant = ____value[2]
15
+ do
16
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
17
+ goto __continue5
18
+ end
19
+ callback(nil, tnt)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -1,5 +1,6 @@
1
- import { PlayerVariant } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PreBerserkDeathRegisterParameters = [
3
3
  callback: (player: EntityPlayer) => boolean | void,
4
- playerVariant?: PlayerVariant
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
5
6
  ];
@@ -8,13 +8,18 @@ function ____exports.preBerserkDeathRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.preBerserkDeathFire(self, player)
11
+ local character = player:GetPlayerType()
11
12
  for ____, ____value in ipairs(subscriptions) do
12
13
  local callback = ____value[1]
13
14
  local playerVariant = ____value[2]
15
+ local callbackCharacter = ____value[3]
14
16
  do
15
17
  if playerVariant ~= nil and playerVariant ~= player.Variant then
16
18
  goto __continue5
17
19
  end
20
+ if callbackCharacter ~= nil and callbackCharacter ~= character then
21
+ goto __continue5
22
+ end
18
23
  callback(nil, player)
19
24
  end
20
25
  ::__continue5::
@@ -1,4 +1,6 @@
1
- /// <reference types="isaac-typescript-definitions" />
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PreCustomReviveRegisterParameters = [
3
- callback: (player: EntityPlayer) => int | void
3
+ callback: (player: EntityPlayer) => int | void,
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
4
6
  ];
@@ -8,12 +8,24 @@ function ____exports.preCustomReviveRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.preCustomReviveFire(self, player)
11
+ local character = player:GetPlayerType()
11
12
  for ____, ____value in ipairs(subscriptions) do
12
13
  local callback = ____value[1]
13
- local revivalType = callback(nil, player)
14
- if revivalType ~= nil then
15
- return revivalType
14
+ local playerVariant = ____value[2]
15
+ local callbackCharacter = ____value[3]
16
+ do
17
+ if playerVariant ~= nil and playerVariant ~= player.Variant then
18
+ goto __continue5
19
+ end
20
+ if callbackCharacter ~= nil and callbackCharacter ~= character then
21
+ goto __continue5
22
+ end
23
+ local revivalType = callback(nil, player)
24
+ if revivalType ~= nil then
25
+ return revivalType
26
+ end
16
27
  end
28
+ ::__continue5::
17
29
  end
18
30
  return nil
19
31
  end
@@ -1,7 +1,11 @@
1
1
  import { CollectibleType, ItemType, TrinketType } from "isaac-typescript-definitions";
2
- import { PickingUpItem } from "../../types/PickingUpItem";
3
- export declare type PreItemPickupRegisterParameters = [
4
- callback: (player: EntityPlayer, pickingUpItem: PickingUpItem) => void,
5
- itemType?: ItemType,
6
- itemID?: CollectibleType | TrinketType
2
+ import { PickingUpItem, PickingUpItemCollectible, PickingUpItemTrinket } from "../../types/PickingUpItem";
3
+ export declare type PreItemPickupRegisterParameters = [callback: (player: EntityPlayer, pickingUpItem: PickingUpItem) => void] | [
4
+ callback: (player: EntityPlayer, pickingUpItem: PickingUpItemCollectible) => void,
5
+ itemType: ItemType.PASSIVE | ItemType.ACTIVE | ItemType.FAMILIAR,
6
+ collectibleType?: CollectibleType
7
+ ] | [
8
+ callback: (player: EntityPlayer, pickingUpItem: PickingUpItemTrinket) => void,
9
+ itemType: ItemType.TRINKET,
10
+ trinketType?: TrinketType
7
11
  ];
@@ -11,12 +11,12 @@ function ____exports.preItemPickupFire(self, player, pickingUpItem)
11
11
  for ____, ____value in ipairs(subscriptions) do
12
12
  local callback = ____value[1]
13
13
  local itemType = ____value[2]
14
- local itemID = ____value[3]
14
+ local subType = ____value[3]
15
15
  do
16
16
  if itemType ~= nil and itemType ~= pickingUpItem.itemType then
17
17
  goto __continue5
18
18
  end
19
- if itemID ~= nil and itemID ~= pickingUpItem.subType then
19
+ if subType ~= nil and subType ~= pickingUpItem.subType then
20
20
  goto __continue5
21
21
  end
22
22
  callback(nil, player, pickingUpItem)
@@ -1,6 +1,6 @@
1
- declare type FactoryFunction<K, V, A extends unknown[]> = (k: K, ...extraArgs: A) => V;
2
- declare type FirstArg<K, V, A extends unknown[]> = Iterable<[K, V]> | V | FactoryFunction<K, V, A>;
3
- declare type SecondArg<K, V, A extends unknown[]> = V | FactoryFunction<K, V, A>;
1
+ declare type FactoryFunction<V, A extends unknown[]> = (...extraArgs: A) => V;
2
+ declare type FirstArg<K, V, A extends unknown[]> = Iterable<[K, V]> | V | FactoryFunction<V, A>;
3
+ declare type SecondArg<V, A extends unknown[]> = V | FactoryFunction<V, A>;
4
4
  /**
5
5
  * An extended Map with some new methods:
6
6
  *
@@ -44,8 +44,8 @@ declare type SecondArg<K, V, A extends unknown[]> = V | FactoryFunction<K, V, A>
44
44
  * first:
45
45
  *
46
46
  * ```ts
47
- * const factoryFunction = (_key: string, arg2: boolean) => arg2 ? 0 : 1;
48
- * const defaultMapWithExtraArgs = new DefaultMap<string, string, [arg2: boolean]>(factoryFunction);
47
+ * const factoryFunction = (arg: boolean) => arg ? 0 : 1;
48
+ * const defaultMapWithExtraArgs = new DefaultMap<string, string, [arg: boolean]>(factoryFunction);
49
49
  * ```
50
50
  */
51
51
  export declare class DefaultMap<K, V, A extends unknown[] = []> extends Map<K, V> {
@@ -55,7 +55,7 @@ export declare class DefaultMap<K, V, A extends unknown[] = []> extends Map<K, V
55
55
  * See the DefaultMap documentation:
56
56
  * https://isaacscript.github.io/isaacscript-common/classes/types_DefaultMap.DefaultMap.html
57
57
  */
58
- constructor(iterableOrDefaultValueOrDefaultValueFactory: FirstArg<K, V, A>, defaultValueOrDefaultValueFactory?: SecondArg<K, V, A>);
58
+ constructor(iterableOrDefaultValueOrDefaultValueFactory: FirstArg<K, V, A>, defaultValueOrDefaultValueFactory?: SecondArg<V, A>);
59
59
  /**
60
60
  * If the key exists, this will return the same thing as the `get` method. Otherwise, it will set
61
61
  * a default value to the key, and then return the default value.
@@ -65,11 +65,11 @@ export declare class DefaultMap<K, V, A extends unknown[] = []> extends Map<K, V
65
65
  * Returns the default value to be used for a new key. (If a factory function was provided during
66
66
  * instantiation, this will execute the factory function.)
67
67
  */
68
- getDefaultValue(key: K, ...extraArgs: A): V;
68
+ getDefaultValue(...extraArgs: A): V;
69
69
  /**
70
70
  * Helper method for cloning the map. Returns either the default value or a reference to the
71
71
  * factory function.
72
72
  */
73
- getConstructorArg(): V | FactoryFunction<K, V, A>;
73
+ getConstructorArg(): V | FactoryFunction<V, A>;
74
74
  }
75
75
  export {};
@@ -59,16 +59,16 @@ function DefaultMap.prototype.getAndSetDefault(self, key, ...)
59
59
  if value ~= nil then
60
60
  return value
61
61
  end
62
- local defaultValue = self:getDefaultValue(key, ...)
62
+ local defaultValue = self:getDefaultValue(...)
63
63
  self:set(key, defaultValue)
64
64
  return defaultValue
65
65
  end
66
- function DefaultMap.prototype.getDefaultValue(self, key, ...)
66
+ function DefaultMap.prototype.getDefaultValue(self, ...)
67
67
  if self.defaultValue ~= nil then
68
68
  return self.defaultValue
69
69
  end
70
70
  if self.defaultValueFactory ~= nil then
71
- return self:defaultValueFactory(key, ...)
71
+ return self:defaultValueFactory(...)
72
72
  end
73
73
  return error("A DefaultMap was incorrectly instantiated.")
74
74
  end
@@ -1,4 +1,4 @@
1
- import { ItemPoolType, LevelStage, PlayerType, RoomType } from "isaac-typescript-definitions";
1
+ import { ItemPoolType, LevelStage, RoomType } from "isaac-typescript-definitions";
2
2
  /**
3
3
  * The distance of the laser when Azazel does not have any range up items yet. For more info, see
4
4
  * the documentation for the `getAzazelBrimstoneDistance` function.
@@ -70,16 +70,17 @@ export declare const MAX_PLAYER_HEART_CONTAINERS = 18;
70
70
  */
71
71
  export declare const MAX_PLAYER_SPEED_IN_UNITS = 9.8;
72
72
  export declare const MAX_PLAYER_TRINKET_SLOTS: number;
73
+ export declare const FIRST_ROOM_TYPE = RoomType.DEFAULT;
73
74
  export declare const MAX_ROOM_TYPE: RoomType;
74
75
  /**
75
76
  * The maximum speed stat that a player can have. Any additional speed beyond this will not take
76
77
  * effect.
77
78
  */
78
79
  export declare const MAX_SPEED_STAT = 2;
80
+ export declare const FIRST_STAGE = LevelStage.BASEMENT_1;
79
81
  export declare const MAX_STAGE: LevelStage;
80
82
  /** Corresponds to the maximum value for `EntityPlayer.SamsonBerserkCharge`. */
81
83
  export declare const MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000;
82
- export declare const MAX_VANILLA_CHARACTER: PlayerType;
83
84
  export declare const NUM_DIMENSIONS: number;
84
85
  export declare const SECOND_IN_MILLISECONDS = 1000;
85
86
  export declare const MINUTE_IN_MILLISECONDS: number;
@@ -3,7 +3,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
3
3
  local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
4
4
  local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
5
5
  local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
6
- local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
7
6
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
8
7
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
9
8
  local ____enums = require("functions.enums")
@@ -29,11 +28,12 @@ ____exports.MAX_NUM_INPUTS = 4
29
28
  ____exports.MAX_PLAYER_HEART_CONTAINERS = 18
30
29
  ____exports.MAX_PLAYER_SPEED_IN_UNITS = 9.8
31
30
  ____exports.MAX_PLAYER_TRINKET_SLOTS = getEnumLength(nil, TrinketSlot)
31
+ ____exports.FIRST_ROOM_TYPE = RoomType.DEFAULT
32
32
  ____exports.MAX_ROOM_TYPE = getLastEnumValue(nil, RoomType)
33
33
  ____exports.MAX_SPEED_STAT = 2
34
+ ____exports.FIRST_STAGE = LevelStage.BASEMENT_1
34
35
  ____exports.MAX_STAGE = getLastEnumValue(nil, LevelStage)
35
36
  ____exports.MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000
36
- ____exports.MAX_VANILLA_CHARACTER = getLastEnumValue(nil, PlayerType)
37
37
  ____exports.NUM_DIMENSIONS = getEnumLength(nil, Dimension) - 1
38
38
  ____exports.SECOND_IN_MILLISECONDS = 1000
39
39
  ____exports.MINUTE_IN_MILLISECONDS = 60 * ____exports.SECOND_IN_MILLISECONDS
@@ -1,19 +1,25 @@
1
- import { CollectibleType, PillColor, PlayerType } from "isaac-typescript-definitions";
1
+ import { Card, CollectibleType, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
2
+ export declare const FIRST_CARD = Card.FOOL;
2
3
  export declare const NUM_CARDS: number;
3
- export declare const MAX_CARD: number;
4
+ export declare const MAX_CARD: Card;
4
5
  export declare const NUM_VANILLA_CARDS: number;
5
- export declare const MAX_VANILLA_CARD: number;
6
+ export declare const MAX_VANILLA_CARD: Card;
7
+ export declare const FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;
6
8
  export declare const NUM_COLLECTIBLE_TYPES: number;
7
- export declare const MAX_COLLECTIBLE_TYPE: number;
9
+ export declare const MAX_COLLECTIBLE_TYPE: CollectibleType;
8
10
  export declare const NUM_VANILLA_COLLECTIBLE_TYPES: CollectibleType;
9
11
  export declare const MAX_VANILLA_COLLECTIBLE_TYPE: CollectibleType;
12
+ export declare const FIRST_PILL_EFFECT = PillEffect.BAD_GAS;
10
13
  export declare const NUM_PILL_EFFECTS: number;
11
- export declare const MAX_PILL_EFFECT: number;
14
+ export declare const MAX_PILL_EFFECT: PillEffect;
12
15
  export declare const NUM_VANILLA_PILL_EFFECTS: number;
13
- export declare const MAX_VANILLA_PILL_EFFECT: number;
16
+ export declare const MAX_VANILLA_PILL_EFFECT: PillEffect;
17
+ export declare const FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY;
14
18
  export declare const NUM_TRINKET_TYPES: number;
15
- export declare const MAX_TRINKET_TYPE: number;
19
+ export declare const MAX_TRINKET_TYPE: TrinketType;
16
20
  export declare const NUM_VANILLA_TRINKET_TYPES: number;
17
- export declare const MAX_VANILLA_TRINKET_TYPE: number;
18
- export declare const MAX_VANILLA_PLAYER_TYPE: PlayerType;
21
+ export declare const MAX_VANILLA_TRINKET_TYPE: TrinketType;
22
+ export declare const FIRST_CHARACTER = PlayerType.ISAAC;
23
+ export declare const MAX_VANILLA_CHARACTER: PlayerType;
24
+ export declare const FIRST_PILL_COLOR = PillColor.BLUE_BLUE;
19
25
  export declare const MAX_NORMAL_PILL_COLOR = PillColor.WHITE_YELLOW;
@@ -11,22 +11,28 @@ local itemConfig = ____cachedClasses.itemConfig
11
11
  local ____enums = require("functions.enums")
12
12
  local getEnumLength = ____enums.getEnumLength
13
13
  local getLastEnumValue = ____enums.getLastEnumValue
14
+ ____exports.FIRST_CARD = Card.FOOL
14
15
  ____exports.NUM_CARDS = itemConfig:GetCards().Size - 1
15
16
  ____exports.MAX_CARD = ____exports.NUM_CARDS
16
17
  ____exports.NUM_VANILLA_CARDS = getEnumLength(nil, Card) - 1
17
18
  ____exports.MAX_VANILLA_CARD = ____exports.NUM_VANILLA_CARDS
19
+ ____exports.FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
18
20
  ____exports.NUM_COLLECTIBLE_TYPES = itemConfig:GetCollectibles().Size - 1
19
21
  ____exports.MAX_COLLECTIBLE_TYPE = ____exports.NUM_COLLECTIBLE_TYPES
20
22
  ____exports.NUM_VANILLA_COLLECTIBLE_TYPES = getLastEnumValue(nil, CollectibleType)
21
23
  ____exports.MAX_VANILLA_COLLECTIBLE_TYPE = ____exports.NUM_VANILLA_COLLECTIBLE_TYPES
24
+ ____exports.FIRST_PILL_EFFECT = PillEffect.BAD_GAS
22
25
  ____exports.NUM_PILL_EFFECTS = itemConfig:GetPillEffects().Size - 1
23
26
  ____exports.MAX_PILL_EFFECT = ____exports.NUM_PILL_EFFECTS
24
27
  ____exports.NUM_VANILLA_PILL_EFFECTS = getEnumLength(nil, PillEffect)
25
28
  ____exports.MAX_VANILLA_PILL_EFFECT = ____exports.NUM_VANILLA_PILL_EFFECTS
29
+ ____exports.FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY
26
30
  ____exports.NUM_TRINKET_TYPES = itemConfig:GetTrinkets().Size - 1
27
31
  ____exports.MAX_TRINKET_TYPE = ____exports.NUM_TRINKET_TYPES
28
32
  ____exports.NUM_VANILLA_TRINKET_TYPES = getEnumLength(nil, TrinketType) - 1
29
33
  ____exports.MAX_VANILLA_TRINKET_TYPE = ____exports.NUM_VANILLA_TRINKET_TYPES
30
- ____exports.MAX_VANILLA_PLAYER_TYPE = getLastEnumValue(nil, PlayerType)
34
+ ____exports.FIRST_CHARACTER = PlayerType.ISAAC
35
+ ____exports.MAX_VANILLA_CHARACTER = getLastEnumValue(nil, PlayerType)
36
+ ____exports.FIRST_PILL_COLOR = PillColor.BLUE_BLUE
31
37
  ____exports.MAX_NORMAL_PILL_COLOR = PillColor.WHITE_YELLOW
32
38
  return ____exports