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
@@ -3,7 +3,7 @@ local __TS__New = ____lualib.__TS__New
3
3
  local ____exports = {}
4
4
  local hasSubscriptions, postPEffectUpdateReordered, queueEmpty, queueNotEmpty, v
5
5
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
- local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
6
+ local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
7
7
  local ____DefaultMap = require("classes.DefaultMap")
8
8
  local DefaultMap = ____DefaultMap.DefaultMap
9
9
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
@@ -36,7 +36,7 @@ function postPEffectUpdateReordered(self, player)
36
36
  end
37
37
  end
38
38
  function queueEmpty(self, player, pickingUpItem)
39
- if pickingUpItem.subType == CollectibleType.NULL then
39
+ if pickingUpItem.itemType == ItemType.NULL or pickingUpItem.subType == 0 then
40
40
  return
41
41
  end
42
42
  postItemPickupFire(nil, player, pickingUpItem)
@@ -44,7 +44,7 @@ function queueEmpty(self, player, pickingUpItem)
44
44
  end
45
45
  function queueNotEmpty(self, player, pickingUpItem)
46
46
  local queuedItem = player.QueuedItem.Item
47
- if queuedItem == nil then
47
+ if queuedItem == nil or queuedItem.Type == ItemType.NULL then
48
48
  return
49
49
  end
50
50
  if queuedItem.Type ~= pickingUpItem.itemType or queuedItem.ID ~= pickingUpItem.subType then
@@ -1,4 +1,4 @@
1
- import { DoorSlot } from "isaac-typescript-definitions";
1
+ import { DoorSlot, EffectVariant } from "isaac-typescript-definitions";
2
2
  import { ModUpgraded } from "../classes/ModUpgraded";
3
3
  /**
4
4
  * `isaacscript-common` provides custom doors that can be spawned where any wall segment is. If you
@@ -22,8 +22,10 @@ import { ModUpgraded } from "../classes/ModUpgraded";
22
22
  * const fooEffectVariant = Isaac.GetEntityVariantByName("Foo Custom Door");
23
23
  * initCustomDoor(mod, fooEffectVariant);
24
24
  * ```
25
+ *
26
+ * Also see the `spawnCustomDoor` function.
25
27
  */
26
- export declare function initCustomDoor(mod: ModUpgraded, effectVariant: int): void;
28
+ export declare function initCustomDoor(mod: ModUpgraded, effectVariant: EffectVariant): void;
27
29
  /**
28
30
  * Helper function to spawn a custom door. This is intended to be called from the `POST_NEW_ROOM`
29
31
  * callback when the player enters a room that should have a custom door. (You could also call it
@@ -45,4 +47,4 @@ export declare function initCustomDoor(mod: ModUpgraded, effectVariant: int): vo
45
47
  * Before using this function, you must first initialize the effect/door variant with the
46
48
  * `initCustomDoor` function.
47
49
  */
48
- export declare function spawnCustomDoor(effectVariant: int, doorSlot: DoorSlot): EntityEffect;
50
+ export declare function spawnCustomDoor(effectVariant: EffectVariant, doorSlot: DoorSlot): EntityEffect;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____doors = require("functions.doors")
6
+ local getDoors = ____doors.getDoors
7
+ local ____postDoorRender = require("callbacks.subscriptions.postDoorRender")
8
+ local postDoorRenderFire = ____postDoorRender.postDoorRenderFire
9
+ local postDoorRenderHasSubscriptions = ____postDoorRender.postDoorRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postDoorRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, doors in ipairs(getDoors(nil)) do
18
+ postDoorRenderFire(nil, doors)
19
+ end
20
+ end
21
+ function ____exports.postDoorRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postUpdate
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____doors = require("functions.doors")
6
+ local getDoors = ____doors.getDoors
7
+ local ____postDoorUpdate = require("callbacks.subscriptions.postDoorUpdate")
8
+ local postDoorUpdateFire = ____postDoorUpdate.postDoorUpdateFire
9
+ local postDoorUpdateHasSubscriptions = ____postDoorUpdate.postDoorUpdateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postDoorUpdateHasSubscriptions(nil)
12
+ end
13
+ function postUpdate(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, doors in ipairs(getDoors(nil)) do
18
+ postDoorUpdateFire(nil, doors)
19
+ end
20
+ end
21
+ function ____exports.postDoorUpdateInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
23
+ end
24
+ return ____exports
@@ -28,7 +28,7 @@ function postEffectUpdate(self, effect)
28
28
  end
29
29
  v = {run = {effectStateMap = __TS__New(
30
30
  DefaultMap,
31
- function(____, _ptrHash, state) return state end
31
+ function(____, state) return state end
32
32
  )}}
33
33
  function ____exports.postEffectStateChangedCallbackInit(self, mod)
34
34
  saveDataManager(nil, "postEffectStateChanged", v, hasSubscriptions)
@@ -28,7 +28,7 @@ function postFamiliarUpdate(self, familiar)
28
28
  end
29
29
  v = {run = {familiarStateMap = __TS__New(
30
30
  DefaultMap,
31
- function(____, _initSeed, state) return state end
31
+ function(____, state) return state end
32
32
  )}}
33
33
  function ____exports.postFamiliarStateChangedCallbackInit(self, mod)
34
34
  saveDataManager(nil, "postFamiliarStateChanged", v, hasSubscriptions)
@@ -47,11 +47,11 @@ function checkGridEntitiesRemoved(self, gridEntitiesMap)
47
47
  for ____, ____value in __TS__Iterator(v.room.initializedGridEntities:entries()) do
48
48
  local gridIndex = ____value[1]
49
49
  local gridEntityTuple = ____value[2]
50
- local storedGridEntityType = table.unpack(gridEntityTuple)
50
+ local storedGridEntityType, storedGridEntityVariant = table.unpack(gridEntityTuple)
51
51
  local gridEntity = gridEntitiesMap:get(gridIndex)
52
52
  if gridEntity == nil or gridEntity:GetType() ~= storedGridEntityType then
53
53
  v.room.initializedGridEntities:delete(gridIndex)
54
- postGridEntityRemoveFire(nil, gridIndex, storedGridEntityType)
54
+ postGridEntityRemoveFire(nil, gridIndex, storedGridEntityType, storedGridEntityVariant)
55
55
  end
56
56
  end
57
57
  end
@@ -60,7 +60,7 @@ function checkGridEntityStateChanged(self, gridIndex, gridEntity)
60
60
  if gridEntityTuple == nil then
61
61
  return
62
62
  end
63
- local ____, oldState = table.unpack(gridEntityTuple)
63
+ local _gridEntityType, _gridEntityVariant, oldState = table.unpack(gridEntityTuple)
64
64
  local newState = gridEntity.State
65
65
  if oldState ~= newState then
66
66
  updateTupleInMap(nil, gridEntity)
@@ -80,8 +80,9 @@ function checkNewGridEntity(self, gridIndex, gridEntity)
80
80
  end
81
81
  function updateTupleInMap(self, gridEntity)
82
82
  local gridEntityType = gridEntity:GetType()
83
+ local gridEntityVariant = gridEntity:GetVariant()
83
84
  local gridIndex = gridEntity:GetGridIndex()
84
- local newTuple = {gridEntityType, gridEntity.State}
85
+ local newTuple = {gridEntityType, gridEntityVariant, gridEntity.State}
85
86
  v.room.initializedGridEntities:set(gridIndex, newTuple)
86
87
  end
87
88
  function postNewRoom(self)
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntity = require("functions.gridEntity")
6
+ local getGridEntities = ____gridEntity.getGridEntities
7
+ local ____postGridEntityRender = require("callbacks.subscriptions.postGridEntityRender")
8
+ local postGridEntityRenderFire = ____postGridEntityRender.postGridEntityRenderFire
9
+ local postGridEntityRenderHasSubscriptions = ____postGridEntityRender.postGridEntityRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postGridEntityRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
18
+ postGridEntityRenderFire(nil, gridEntity)
19
+ end
20
+ end
21
+ function ____exports.postGridEntityRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local __TS__New = ____lualib.__TS__New
3
3
  local Map = ____lualib.Map
4
4
  local ____exports = {}
5
- local hasSubscriptions, postPEffectUpdate, playerRecentlyCollidedWithBulb, preNPCCollision, v
5
+ local hasSubscriptions, postPEffectUpdate, playerRecentlyCollidedWithBulb, preNPCCollisionSucker, v
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
8
8
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
@@ -63,7 +63,7 @@ function playerRecentlyCollidedWithBulb(self, player)
63
63
  local collidedOnLastFrame = gameFrameCount - 1 == bulbLastCollisionFrame
64
64
  return collidedOnThisFrame or collidedOnLastFrame
65
65
  end
66
- function preNPCCollision(self, npc, collider)
66
+ function preNPCCollisionSucker(self, npc, collider)
67
67
  if not hasSubscriptions(nil) then
68
68
  return
69
69
  end
@@ -83,14 +83,14 @@ v = {
83
83
  DefaultMap,
84
84
  function() return __TS__New(
85
85
  DefaultMap,
86
- function(____, _playerIndex, collectibleType) return collectibleType end
86
+ function(____, collectibleType) return collectibleType end
87
87
  ) end
88
88
  ),
89
89
  playersActiveChargeMap = __TS__New(
90
90
  DefaultMap,
91
91
  function() return __TS__New(
92
92
  DefaultMap,
93
- function(____, _playerIndex, charge) return charge end
93
+ function(____, charge) return charge end
94
94
  ) end
95
95
  )
96
96
  },
@@ -99,6 +99,6 @@ v = {
99
99
  function ____exports.postItemDischargeCallbackInit(self, mod)
100
100
  saveDataManager(nil, "postItemDischarge", v, hasSubscriptions)
101
101
  mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
102
- mod:AddCallback(ModCallback.PRE_NPC_COLLISION, preNPCCollision, EntityType.SUCKER)
102
+ mod:AddCallback(ModCallback.PRE_NPC_COLLISION, preNPCCollisionSucker, EntityType.SUCKER)
103
103
  end
104
104
  return ____exports
@@ -28,7 +28,7 @@ function postNPCUpdate(self, npc)
28
28
  end
29
29
  v = {run = {npcStateMap = __TS__New(
30
30
  DefaultMap,
31
- function(____, _ptrHash, state) return state end
31
+ function(____, state) return state end
32
32
  )}}
33
33
  function ____exports.postNPCStateChangedCallbackInit(self, mod)
34
34
  saveDataManager(nil, "postNPCStateChanged", v, hasSubscriptions)
@@ -28,7 +28,7 @@ function postPickupUpdate(self, pickup)
28
28
  end
29
29
  v = {run = {pickupStateMap = __TS__New(
30
30
  DefaultMap,
31
- function(____, _ptrHash, state) return state end
31
+ function(____, state) return state end
32
32
  )}}
33
33
  function ____exports.postPickupStateChangedCallbackInit(self, mod)
34
34
  saveDataManager(nil, "postPickupStateChanged", v, hasSubscriptions)
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getPits = ____gridEntitySpecific.getPits
7
+ local ____postPitRender = require("callbacks.subscriptions.postPitRender")
8
+ local postPitRenderFire = ____postPitRender.postPitRenderFire
9
+ local postPitRenderHasSubscriptions = ____postPitRender.postPitRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postPitRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, pit in ipairs(getPits(nil)) do
18
+ postPitRenderFire(nil, pit)
19
+ end
20
+ end
21
+ function ____exports.postPitRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postUpdate
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getPits = ____gridEntitySpecific.getPits
7
+ local ____postPitUpdate = require("callbacks.subscriptions.postPitUpdate")
8
+ local postPitUpdateFire = ____postPitUpdate.postPitUpdateFire
9
+ local postPitUpdateHasSubscriptions = ____postPitUpdate.postPitUpdateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postPitUpdateHasSubscriptions(nil)
12
+ end
13
+ function postUpdate(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, pit in ipairs(getPits(nil)) do
18
+ postPitUpdateFire(nil, pit)
19
+ end
20
+ end
21
+ function ____exports.postPitUpdateInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
23
+ end
24
+ return ____exports
@@ -30,7 +30,7 @@ function postPEffectUpdateReordered(self, player)
30
30
  end
31
31
  v = {run = {playersCharacterMap = __TS__New(
32
32
  DefaultMap,
33
- function(____, _key, character) return character end
33
+ function(____, character) return character end
34
34
  )}}
35
35
  function ____exports.postPlayerChangeTypeCallbackInit(self, mod)
36
36
  saveDataManager(nil, "postPlayerChangeType", v, hasSubscriptions)
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getPoops = ____gridEntitySpecific.getPoops
7
+ local ____postPoopRender = require("callbacks.subscriptions.postPoopRender")
8
+ local postPoopRenderFire = ____postPoopRender.postPoopRenderFire
9
+ local postPoopRenderHasSubscriptions = ____postPoopRender.postPoopRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postPoopRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, poop in ipairs(getPoops(nil)) do
18
+ postPoopRenderFire(nil, poop)
19
+ end
20
+ end
21
+ function ____exports.postPoopRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postUpdate
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getPoops = ____gridEntitySpecific.getPoops
7
+ local ____postPoopUpdate = require("callbacks.subscriptions.postPoopUpdate")
8
+ local postPoopUpdateFire = ____postPoopUpdate.postPoopUpdateFire
9
+ local postPoopUpdateHasSubscriptions = ____postPoopUpdate.postPoopUpdateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postPoopUpdateHasSubscriptions(nil)
12
+ end
13
+ function postUpdate(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, poop in ipairs(getPoops(nil)) do
18
+ postPoopUpdateFire(nil, poop)
19
+ end
20
+ end
21
+ function ____exports.postPoopUpdateInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getPressurePlates = ____gridEntitySpecific.getPressurePlates
7
+ local ____postPressurePlateRender = require("callbacks.subscriptions.postPressurePlateRender")
8
+ local postPressurePlateRenderFire = ____postPressurePlateRender.postPressurePlateRenderFire
9
+ local postPressurePlateRenderHasSubscriptions = ____postPressurePlateRender.postPressurePlateRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postPressurePlateRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, pressurePlate in ipairs(getPressurePlates(nil)) do
18
+ postPressurePlateRenderFire(nil, pressurePlate)
19
+ end
20
+ end
21
+ function ____exports.postPressurePlateRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postUpdate
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getPressurePlates = ____gridEntitySpecific.getPressurePlates
7
+ local ____postPressurePlateUpdate = require("callbacks.subscriptions.postPressurePlateUpdate")
8
+ local postPressurePlateUpdateFire = ____postPressurePlateUpdate.postPressurePlateUpdateFire
9
+ local postPressurePlateUpdateHasSubscriptions = ____postPressurePlateUpdate.postPressurePlateUpdateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postPressurePlateUpdateHasSubscriptions(nil)
12
+ end
13
+ function postUpdate(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, pressurePlate in ipairs(getPressurePlates(nil)) do
18
+ postPressurePlateUpdateFire(nil, pressurePlate)
19
+ end
20
+ end
21
+ function ____exports.postPressurePlateUpdateInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getRocks = ____gridEntitySpecific.getRocks
7
+ local ____postRockRender = require("callbacks.subscriptions.postRockRender")
8
+ local postRockRenderFire = ____postRockRender.postRockRenderFire
9
+ local postRockRenderHasSubscriptions = ____postRockRender.postRockRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postRockRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, rock in ipairs(getRocks(nil)) do
18
+ postRockRenderFire(nil, rock)
19
+ end
20
+ end
21
+ function ____exports.postRockRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postUpdate
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getRocks = ____gridEntitySpecific.getRocks
7
+ local ____postRockUpdate = require("callbacks.subscriptions.postRockUpdate")
8
+ local postRockUpdateFire = ____postRockUpdate.postRockUpdateFire
9
+ local postRockUpdateHasSubscriptions = ____postRockUpdate.postRockUpdateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postRockUpdateHasSubscriptions(nil)
12
+ end
13
+ function postUpdate(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, rock in ipairs(getRocks(nil)) do
18
+ postRockUpdateFire(nil, rock)
19
+ end
20
+ end
21
+ function ____exports.postRockUpdateInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
23
+ end
24
+ return ____exports
@@ -60,7 +60,7 @@ BROKEN_ANIMATIONS = __TS__New(Set, {"Broken", "Death"})
60
60
  v = {room = {
61
61
  slotAnimations = __TS__New(
62
62
  DefaultMap,
63
- function(____, _key, slot)
63
+ function(____, slot)
64
64
  local sprite = slot:GetSprite()
65
65
  return sprite:GetAnimation()
66
66
  end
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getSpikes = ____gridEntitySpecific.getSpikes
7
+ local ____postSpikesRender = require("callbacks.subscriptions.postSpikesRender")
8
+ local postSpikesRenderFire = ____postSpikesRender.postSpikesRenderFire
9
+ local postSpikesRenderHasSubscriptions = ____postSpikesRender.postSpikesRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postSpikesRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, spikes in ipairs(getSpikes(nil)) do
18
+ postSpikesRenderFire(nil, spikes)
19
+ end
20
+ end
21
+ function ____exports.postSpikesRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postUpdate
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getSpikes = ____gridEntitySpecific.getSpikes
7
+ local ____postSpikesUpdate = require("callbacks.subscriptions.postSpikesUpdate")
8
+ local postSpikesUpdateFire = ____postSpikesUpdate.postSpikesUpdateFire
9
+ local postSpikesUpdateHasSubscriptions = ____postSpikesUpdate.postSpikesUpdateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postSpikesUpdateHasSubscriptions(nil)
12
+ end
13
+ function postUpdate(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, spikes in ipairs(getSpikes(nil)) do
18
+ postSpikesUpdateFire(nil, spikes)
19
+ end
20
+ end
21
+ function ____exports.postSpikesUpdateInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postRender
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getTNT = ____gridEntitySpecific.getTNT
7
+ local ____postTNTRender = require("callbacks.subscriptions.postTNTRender")
8
+ local postTNTRenderFire = ____postTNTRender.postTNTRenderFire
9
+ local postTNTRenderHasSubscriptions = ____postTNTRender.postTNTRenderHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postTNTRenderHasSubscriptions(nil)
12
+ end
13
+ function postRender(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, tnt in ipairs(getTNT(nil)) do
18
+ postTNTRenderFire(nil, tnt)
19
+ end
20
+ end
21
+ function ____exports.postTNTRenderInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_RENDER, postRender)
23
+ end
24
+ return ____exports
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postUpdate
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local ____gridEntitySpecific = require("functions.gridEntitySpecific")
6
+ local getTNT = ____gridEntitySpecific.getTNT
7
+ local ____postTNTUpdate = require("callbacks.subscriptions.postTNTUpdate")
8
+ local postTNTUpdateFire = ____postTNTUpdate.postTNTUpdateFire
9
+ local postTNTUpdateHasSubscriptions = ____postTNTUpdate.postTNTUpdateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postTNTUpdateHasSubscriptions(nil)
12
+ end
13
+ function postUpdate(self)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ for ____, tnt in ipairs(getTNT(nil)) do
18
+ postTNTUpdateFire(nil, tnt)
19
+ end
20
+ end
21
+ function ____exports.postTNTUpdateInit(self, mod)
22
+ mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
23
+ end
24
+ return ____exports
@@ -0,0 +1,5 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostDoorRenderRegisterParameters = [
3
+ callback: (door: GridEntityDoor) => void,
4
+ gridEntityVariant?: int
5
+ ];
@@ -0,0 +1,24 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.postDoorRenderHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.postDoorRenderRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.postDoorRenderFire(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