isaacscript-common 2.0.16 → 2.0.19

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 (180) 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 +18 -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/playerIndex.d.ts +2 -2
  158. package/dist/functions/rooms.d.ts +2 -3
  159. package/dist/functions/rooms.lua +5 -3
  160. package/dist/functions/run.lua +3 -1
  161. package/dist/functions/stage.d.ts +1 -1
  162. package/dist/functions/stage.lua +6 -5
  163. package/dist/functions/trinketCacheFlag.lua +3 -1
  164. package/dist/functions/trinketSet.lua +3 -1
  165. package/dist/functions/trinkets.lua +7 -3
  166. package/dist/index.d.ts +3 -0
  167. package/dist/index.lua +24 -0
  168. package/dist/initCustomCallbacks.lua +45 -0
  169. package/dist/initFeatures.lua +0 -3
  170. package/dist/maps/cardMap.lua +204 -202
  171. package/dist/maps/pillEffectMap.lua +82 -80
  172. package/dist/objects/callbackRegisterFunctions.lua +45 -0
  173. package/dist/objects/cardDescriptions.lua +1 -1
  174. package/dist/objects/cardNames.lua +1 -1
  175. package/dist/objects/cardTypes.lua +1 -1
  176. package/dist/types/AddCallbackParameterCustom.d.ts +30 -0
  177. package/dist/types/PickingUpItem.d.ts +2 -0
  178. package/dist/types/PickingUpItem.lua +10 -0
  179. package/dist/types/private/TSTLClassMetatable.d.ts +1 -1
  180. package/package.json +3 -3
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostDoorUpdateRegisterParameters = [
3
+ callback: (door: GridEntityDoor) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postDoorUpdateHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postDoorUpdateRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postDoorUpdateFire(self, door)
11
+ local gridEntityVariant = door: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, door)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -1,5 +1,6 @@
1
1
  import { GridEntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostGridEntityBrokenRegisterParameters = [
3
3
  callback: (gridEntity: GridEntity) => void,
4
- gridEntityType?: GridEntityType
4
+ gridEntityType?: GridEntityType,
5
+ gridEntityVariant?: int
5
6
  ];
@@ -8,11 +8,17 @@ function ____exports.postGridEntityBrokenRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postGridEntityBrokenFire(self, gridEntity)
11
+ local gridEntityType = gridEntity:GetType()
12
+ local gridEntityVariant = gridEntity:GetVariant()
11
13
  for ____, ____value in ipairs(subscriptions) do
12
14
  local callback = ____value[1]
13
- local gridEntityType = ____value[2]
15
+ local callbackGridEntityType = ____value[2]
16
+ local callbackGridEntityVariant = ____value[3]
14
17
  do
15
- if gridEntityType ~= nil and gridEntityType ~= gridEntity:GetType() then
18
+ if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
19
+ goto __continue5
20
+ end
21
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
16
22
  goto __continue5
17
23
  end
18
24
  callback(nil, gridEntity)
@@ -1,5 +1,6 @@
1
1
  import { GridEntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostGridEntityCollisionRegisterParameters = [
3
3
  callback: (gridEntity: GridEntity, entity: Entity) => void,
4
- gridEntityType?: GridEntityType
4
+ gridEntityType?: GridEntityType,
5
+ gridEntityVariant?: int
5
6
  ];
@@ -9,13 +9,18 @@ function ____exports.postGridEntityCollisionRegister(self, ...)
9
9
  end
10
10
  function ____exports.postGridEntityCollisionFire(self, gridEntity, entity)
11
11
  local gridEntityType = gridEntity:GetType()
12
+ local gridEntityVariant = gridEntity:GetVariant()
12
13
  for ____, ____value in ipairs(subscriptions) do
13
14
  local callback = ____value[1]
14
15
  local callbackGridEntityType = ____value[2]
16
+ local callbackGridEntityVariant = ____value[3]
15
17
  do
16
18
  if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
17
19
  goto __continue5
18
20
  end
21
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
22
+ goto __continue5
23
+ end
19
24
  callback(nil, gridEntity, entity)
20
25
  end
21
26
  ::__continue5::
@@ -1,5 +1,6 @@
1
1
  import { GridEntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostGridEntityInitRegisterParameters = [
3
3
  callback: (gridEntity: GridEntity) => void,
4
- gridEntityType?: GridEntityType
4
+ gridEntityType?: GridEntityType,
5
+ gridEntityVariant?: int
5
6
  ];
@@ -8,11 +8,17 @@ function ____exports.postGridEntityInitRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postGridEntityInitFire(self, gridEntity)
11
+ local gridEntityType = gridEntity:GetType()
12
+ local gridEntityVariant = gridEntity:GetVariant()
11
13
  for ____, ____value in ipairs(subscriptions) do
12
14
  local callback = ____value[1]
13
- local gridEntityType = ____value[2]
15
+ local callbackGridEntityType = ____value[2]
16
+ local callbackGridEntityVariant = ____value[3]
14
17
  do
15
- if gridEntityType ~= nil and gridEntityType ~= gridEntity:GetType() then
18
+ if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
19
+ goto __continue5
20
+ end
21
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
16
22
  goto __continue5
17
23
  end
18
24
  callback(nil, gridEntity)
@@ -1,5 +1,6 @@
1
1
  import { GridEntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostGridEntityRemoveRegisterParameters = [
3
3
  callback: (gridIndex: int, gridEntityType: GridEntityType) => void,
4
- gridEntityType?: GridEntityType
4
+ gridEntityType?: GridEntityType,
5
+ gridEntityVariant?: int
5
6
  ];
@@ -7,14 +7,18 @@ function ____exports.postGridEntityRemoveRegister(self, ...)
7
7
  local args = {...}
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
- function ____exports.postGridEntityRemoveFire(self, gridIndex, gridEntityType)
10
+ function ____exports.postGridEntityRemoveFire(self, gridIndex, gridEntityType, gridEntityVariant)
11
11
  for ____, ____value in ipairs(subscriptions) do
12
12
  local callback = ____value[1]
13
13
  local callbackGridEntityType = ____value[2]
14
+ local callbackGridEntityVariant = ____value[3]
14
15
  do
15
16
  if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
16
17
  goto __continue5
17
18
  end
19
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
20
+ goto __continue5
21
+ end
18
22
  callback(nil, gridIndex, gridEntityType)
19
23
  end
20
24
  ::__continue5::
@@ -0,0 +1,6 @@
1
+ import { GridEntityType } from "isaac-typescript-definitions";
2
+ export declare type PostGridEntityRenderRegisterParameters = [
3
+ callback: (gridEntity: GridEntity) => void,
4
+ gridEntityType?: GridEntityType,
5
+ gridEntityVariant?: int
6
+ ];
@@ -0,0 +1,29 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postGridEntityRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postGridEntityRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postGridEntityRenderFire(self, gridEntity)
11
+ local gridEntityType = gridEntity:GetType()
12
+ local gridEntityVariant = gridEntity:GetVariant()
13
+ for ____, ____value in ipairs(subscriptions) do
14
+ local callback = ____value[1]
15
+ local callbackGridEntityType = ____value[2]
16
+ local callbackGridEntityVariant = ____value[3]
17
+ do
18
+ if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
19
+ goto __continue5
20
+ end
21
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
22
+ goto __continue5
23
+ end
24
+ callback(nil, gridEntity)
25
+ end
26
+ ::__continue5::
27
+ end
28
+ end
29
+ return ____exports
@@ -1,5 +1,6 @@
1
1
  import { GridEntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostGridEntityStateChangedRegisterParameters = [
3
3
  callback: (gridEntity: GridEntity, oldState: int, newState: int) => void,
4
- gridEntityType?: GridEntityType
4
+ gridEntityType?: GridEntityType,
5
+ gridEntityVariant?: int
5
6
  ];
@@ -8,11 +8,17 @@ function ____exports.postGridEntityStateChangedRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postGridEntityStateChangedFire(self, gridEntity, oldState, newState)
11
+ local gridEntityType = gridEntity:GetType()
12
+ local gridEntityVariant = gridEntity:GetVariant()
11
13
  for ____, ____value in ipairs(subscriptions) do
12
14
  local callback = ____value[1]
13
- local gridEntityType = ____value[2]
15
+ local callbackGridEntityType = ____value[2]
16
+ local callbackGridEntityVariant = ____value[3]
14
17
  do
15
- if gridEntityType ~= nil and gridEntityType ~= gridEntity:GetType() then
18
+ if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
19
+ goto __continue5
20
+ end
21
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
16
22
  goto __continue5
17
23
  end
18
24
  callback(nil, gridEntity, oldState, newState)
@@ -1,5 +1,6 @@
1
1
  import { GridEntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostGridEntityUpdateRegisterParameters = [
3
3
  callback: (gridEntity: GridEntity) => void,
4
- gridEntityType?: GridEntityType
4
+ gridEntityType?: GridEntityType,
5
+ gridEntityVariant?: int
5
6
  ];
@@ -8,11 +8,17 @@ function ____exports.postGridEntityUpdateRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postGridEntityUpdateFire(self, gridEntity)
11
+ local gridEntityType = gridEntity:GetType()
12
+ local gridEntityVariant = gridEntity:GetVariant()
11
13
  for ____, ____value in ipairs(subscriptions) do
12
14
  local callback = ____value[1]
13
- local gridEntityType = ____value[2]
15
+ local callbackGridEntityType = ____value[2]
16
+ local callbackGridEntityVariant = ____value[3]
14
17
  do
15
- if gridEntityType ~= nil and gridEntityType ~= gridEntity:GetType() then
18
+ if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
19
+ goto __continue5
20
+ end
21
+ if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
16
22
  goto __continue5
17
23
  end
18
24
  callback(nil, gridEntity)
@@ -1,7 +1,11 @@
1
1
  import { CollectibleType, ItemType, TrinketType } from "isaac-typescript-definitions";
2
- import { PickingUpItem } from "../../types/PickingUpItem";
3
- export declare type PostItemPickupRegisterParameters = [
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 PostItemPickupRegisterParameters = [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.postItemPickupFire(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)
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostPitRenderRegisterParameters = [
3
+ callback: (pit: GridEntityPit) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postPitRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postPitRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postPitRenderFire(self, pit)
11
+ local gridEntityVariant = pit: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, pit)
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 PostPitUpdateRegisterParameters = [
3
+ callback: (pit: GridEntityPit) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postPitUpdateHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postPitUpdateRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postPitUpdateFire(self, pit)
11
+ local gridEntityVariant = pit: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, pit)
20
+ end
21
+ ::__continue5::
22
+ end
23
+ end
24
+ return ____exports
@@ -1,6 +1,7 @@
1
- import { PlayerVariant } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  import { HealthType } from "../../enums/HealthType";
3
3
  export declare type PostPlayerChangeHealthRegisterParameters = [
4
4
  callback: (player: EntityPlayer, healthType: HealthType, amount: int) => void,
5
- playerVariant?: PlayerVariant
5
+ playerVariant?: PlayerVariant,
6
+ character?: PlayerType
6
7
  ];
@@ -8,13 +8,18 @@ function ____exports.postPlayerChangeHealthRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postPlayerChangeHealthFire(self, player, healthType, amount)
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, healthType, amount)
19
24
  end
20
25
  ::__continue5::
@@ -1,4 +1,5 @@
1
- import { PlayerType } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerChangeTypeRegisterParameters = [
3
- callback: (player: EntityPlayer, oldCharacter: PlayerType, newCharacter: PlayerType) => void
3
+ callback: (player: EntityPlayer, oldCharacter: PlayerType, newCharacter: PlayerType) => void,
4
+ playerVariant?: PlayerVariant
4
5
  ];
@@ -10,7 +10,14 @@ end
10
10
  function ____exports.postPlayerChangeTypeFire(self, player, oldCharacter, newCharacter)
11
11
  for ____, ____value in ipairs(subscriptions) do
12
12
  local callback = ____value[1]
13
- callback(nil, player, oldCharacter, newCharacter)
13
+ local playerVariant = ____value[2]
14
+ do
15
+ if playerVariant ~= nil and playerVariant ~= player.Variant then
16
+ goto __continue5
17
+ end
18
+ callback(nil, player, oldCharacter, newCharacter)
19
+ end
20
+ ::__continue5::
14
21
  end
15
22
  end
16
23
  return ____exports
@@ -1,5 +1,6 @@
1
- import { DamageFlag, PlayerVariant } from "isaac-typescript-definitions";
1
+ import { DamageFlag, PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerFatalDamageRegisterParameters = [
3
3
  callback: (player: EntityPlayer, damageAmount: float, damageFlags: BitFlags<DamageFlag>, damageSource: EntityRef, damageCountdownFrames: int) => boolean | void,
4
- playerVariant?: PlayerVariant
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
5
6
  ];
@@ -8,13 +8,18 @@ function ____exports.postPlayerFatalDamageRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postPlayerFatalDamageFire(self, player, damageAmount, damageFlags, damageSource, damageCountdownFrames)
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
  local shouldSustainDeath = callback(
19
24
  nil,
20
25
  player,
@@ -1,5 +1,6 @@
1
- import { PlayerVariant } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerInitLateRegisterParameters = [
3
3
  callback: (player: EntityPlayer) => void,
4
- playerVariant?: PlayerVariant
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
5
6
  ];
@@ -8,13 +8,18 @@ function ____exports.postPlayerInitLateRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postPlayerInitLateFire(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,5 +1,6 @@
1
- import { PlayerVariant } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerInitReorderedRegisterParameters = [
3
3
  callback: (player: EntityPlayer) => void,
4
- playerVariant?: PlayerVariant
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
5
6
  ];
@@ -8,13 +8,18 @@ function ____exports.postPlayerInitReorderedRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postPlayerInitReorderedFire(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,5 +1,6 @@
1
- import { PlayerVariant } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerRenderReorderedRegisterParameters = [
3
3
  callback: (player: EntityPlayer) => void,
4
- playerVariant?: PlayerVariant
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
5
6
  ];
@@ -8,13 +8,18 @@ function ____exports.postPlayerRenderReorderedRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postPlayerRenderReorderedFire(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,5 +1,6 @@
1
- import { PlayerVariant } from "isaac-typescript-definitions";
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerUpdateReorderedRegisterParameters = [
3
3
  callback: (player: EntityPlayer) => void,
4
- playerVariant?: PlayerVariant
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
5
6
  ];
@@ -8,13 +8,18 @@ function ____exports.postPlayerUpdateReorderedRegister(self, ...)
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
10
  function ____exports.postPlayerUpdateReorderedFire(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::
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostPoopRenderRegisterParameters = [
3
+ callback: (poop: GridEntityPoop) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postPoopRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postPoopRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postPoopRenderFire(self, poop)
11
+ local gridEntityVariant = poop: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, poop)
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 PostPoopUpdateRegisterParameters = [
3
+ callback: (poop: GridEntityPoop) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postPoopUpdateHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postPoopUpdateRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postPoopUpdateFire(self, poop)
11
+ local gridEntityVariant = poop: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, poop)
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 PostPressurePlateRenderRegisterParameters = [
3
+ callback: (pressurePlate: GridEntityPressurePlate) => void,
4
+ gridEntityVariant?: int
5
+ ];