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
@@ -12,6 +12,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
12
12
  local AngelRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.AngelRoomSubType
13
13
  local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
14
14
  local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
15
+ local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
15
16
  local DungeonSubType = ____isaac_2Dtypescript_2Ddefinitions.DungeonSubType
16
17
  local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
17
18
  local HomeRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.HomeRoomSubType
@@ -110,7 +111,7 @@ function ____exports.changeRoom(self, roomGridIndex)
110
111
  if roomData == nil then
111
112
  error(("Failed to change the room to grid index " .. tostring(roomGridIndex)) .. " because that room does not exist.")
112
113
  end
113
- level.LeaveDoor = -1
114
+ level.LeaveDoor = DoorSlot.NO_DOOR_SLOT
114
115
  game:ChangeRoom(roomGridIndex)
115
116
  end
116
117
  function ____exports.getAllRoomGridIndexes(self)
@@ -128,7 +129,8 @@ function ____exports.getCurrentDimension(self)
128
129
  local startingRoomGridIndex = level:GetStartingRoomIndex()
129
130
  local startingRoomDescription = level:GetRoomByIdx(startingRoomGridIndex, Dimension.CURRENT)
130
131
  local startingRoomHash = GetPtrHash(startingRoomDescription)
131
- for ____, dimension in ipairs(erange(nil, NUM_DIMENSIONS)) do
132
+ for ____, dimensionInt in ipairs(erange(nil, NUM_DIMENSIONS)) do
133
+ local dimension = dimensionInt
132
134
  local dimensionRoomDescription = level:GetRoomByIdx(startingRoomGridIndex, dimension)
133
135
  local dimensionRoomHash = GetPtrHash(dimensionRoomDescription)
134
136
  if dimensionRoomHash == startingRoomHash then
@@ -372,7 +374,7 @@ function ____exports.teleport(self, roomGridIndex, direction, roomTransitionAnim
372
374
  if roomData == nil then
373
375
  error(("Failed to change the room to grid index " .. tostring(roomGridIndex)) .. " because that room does not exist.")
374
376
  end
375
- level.LeaveDoor = -1
377
+ level.LeaveDoor = DoorSlot.NO_DOOR_SLOT
376
378
  game:StartRoomTransition(roomGridIndex, direction, roomTransitionAnim)
377
379
  end
378
380
  return ____exports
@@ -3,6 +3,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
3
3
  local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
4
4
  local ____cachedClasses = require("cachedClasses")
5
5
  local game = ____cachedClasses.game
6
+ local ____constantsMax = require("constantsMax")
7
+ local FIRST_CHARACTER = ____constantsMax.FIRST_CHARACTER
6
8
  local ____log = require("functions.log")
7
9
  local log = ____log.log
8
10
  function ____exports.onSetSeed(self)
@@ -17,7 +19,7 @@ function ____exports.restart(self, character)
17
19
  Isaac.ExecuteCommand("restart")
18
20
  return
19
21
  end
20
- if character < 0 then
22
+ if character < FIRST_CHARACTER then
21
23
  error(("Restarting as a character of " .. tostring(character)) .. " would crash the game.")
22
24
  end
23
25
  log("Restarting as character: " .. tostring(character))
@@ -11,7 +11,7 @@ export declare function getStage(): LevelStage;
11
11
  export declare function getStageType(): StageType;
12
12
  /** Helper function to directly warp to a specific stage using the "stage" console command. */
13
13
  export declare function goToStage(stage: LevelStage, stageType: StageType): void;
14
- export declare function isRepentanceStage(stageType: int): boolean;
14
+ export declare function isRepentanceStage(stageType: StageType): boolean;
15
15
  export declare function onCathedral(): boolean;
16
16
  export declare function onChest(): boolean;
17
17
  export declare function onDarkRoom(): boolean;
@@ -1,5 +1,6 @@
1
1
  local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
3
4
  local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
4
5
  local ____cachedClasses = require("cachedClasses")
5
6
  local game = ____cachedClasses.game
@@ -41,29 +42,29 @@ function ____exports.onCathedral(self)
41
42
  local level = game:GetLevel()
42
43
  local stage = level:GetStage()
43
44
  local stageType = level:GetStageType()
44
- return stage == 10 and stageType == 1
45
+ return stage == LevelStage.SHEOL_CATHEDRAL and stageType == StageType.WRATH_OF_THE_LAMB
45
46
  end
46
47
  function ____exports.onChest(self)
47
48
  local level = game:GetLevel()
48
49
  local stage = level:GetStage()
49
50
  local stageType = level:GetStageType()
50
- return stage == 11 and stageType == 1
51
+ return stage == LevelStage.DARK_ROOM_CHEST and stageType == StageType.WRATH_OF_THE_LAMB
51
52
  end
52
53
  function ____exports.onDarkRoom(self)
53
54
  local level = game:GetLevel()
54
55
  local stage = level:GetStage()
55
56
  local stageType = level:GetStageType()
56
- return stage == 11 and stageType == 0
57
+ return stage == LevelStage.DARK_ROOM_CHEST and stageType == StageType.ORIGINAL
57
58
  end
58
59
  function ____exports.onFinalFloor(self)
59
60
  local level = game:GetLevel()
60
61
  local stage = level:GetStage()
61
- return stage == 11 or stage == 12 or stage == 13 or stage == 8 and ____exports.onRepentanceStage(nil)
62
+ return stage == LevelStage.DARK_ROOM_CHEST or stage == LevelStage.THE_VOID or stage == LevelStage.HOME or stage == LevelStage.WOMB_2 and ____exports.onRepentanceStage(nil)
62
63
  end
63
64
  function ____exports.onSheol(self)
64
65
  local level = game:GetLevel()
65
66
  local stage = level:GetStage()
66
67
  local stageType = level:GetStageType()
67
- return stage == 10 and stageType == 0
68
+ return stage == LevelStage.SHEOL_CATHEDRAL and stageType == StageType.ORIGINAL
68
69
  end
69
70
  return ____exports
@@ -8,6 +8,7 @@ local initCacheFlagMap, CACHE_FLAG_TO_TRINKETS_MAP
8
8
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
9
9
  local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
10
10
  local ____constantsMax = require("constantsMax")
11
+ local FIRST_TRINKET_TYPE = ____constantsMax.FIRST_TRINKET_TYPE
11
12
  local MAX_TRINKET_TYPE = ____constantsMax.MAX_TRINKET_TYPE
12
13
  local ____enums = require("functions.enums")
13
14
  local getEnumValues = ____enums.getEnumValues
@@ -20,7 +21,8 @@ local irange = ____utils.irange
20
21
  function initCacheFlagMap(self)
21
22
  for ____, cacheFlag in ipairs(getEnumValues(nil, CacheFlag)) do
22
23
  local trinketsSet = __TS__New(Set)
23
- for ____, trinketType in ipairs(irange(nil, 1, MAX_TRINKET_TYPE)) do
24
+ for ____, trinketTypeInt in ipairs(irange(nil, FIRST_TRINKET_TYPE, MAX_TRINKET_TYPE)) do
25
+ local trinketType = trinketTypeInt
24
26
  if trinketHasCacheFlag(nil, trinketType, cacheFlag) then
25
27
  trinketsSet:add(trinketType)
26
28
  end
@@ -5,6 +5,7 @@ local ____exports = {}
5
5
  local ____cachedClasses = require("cachedClasses")
6
6
  local itemConfig = ____cachedClasses.itemConfig
7
7
  local ____constantsMax = require("constantsMax")
8
+ local FIRST_TRINKET_TYPE = ____constantsMax.FIRST_TRINKET_TYPE
8
9
  local MAX_TRINKET_TYPE = ____constantsMax.MAX_TRINKET_TYPE
9
10
  local ____set = require("functions.set")
10
11
  local copySet = ____set.copySet
@@ -12,7 +13,8 @@ local ____utils = require("functions.utils")
12
13
  local irange = ____utils.irange
13
14
  local TRINKET_SET = __TS__New(Set)
14
15
  local function initTrinketSet(self)
15
- for ____, trinketType in ipairs(irange(nil, 1, MAX_TRINKET_TYPE)) do
16
+ for ____, trinketTypeInt in ipairs(irange(nil, FIRST_TRINKET_TYPE, MAX_TRINKET_TYPE)) do
17
+ local trinketType = trinketTypeInt
16
18
  local itemConfigTrinket = itemConfig:GetTrinket(trinketType)
17
19
  if itemConfigTrinket ~= nil then
18
20
  TRINKET_SET:add(trinketType)
@@ -1,6 +1,5 @@
1
1
  local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
- local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
4
3
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
5
4
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
6
5
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
@@ -12,8 +11,12 @@ local TRINKET_DESCRIPTION_MAP = ____trinketDescriptionMap.TRINKET_DESCRIPTION_MA
12
11
  local ____trinketNameMap = require("maps.trinketNameMap")
13
12
  local DEFAULT_TRINKET_NAME = ____trinketNameMap.DEFAULT_TRINKET_NAME
14
13
  local TRINKET_NAME_MAP = ____trinketNameMap.TRINKET_NAME_MAP
14
+ local ____entity = require("functions.entity")
15
+ local getEntityID = ____entity.getEntityID
15
16
  local ____flag = require("functions.flag")
16
17
  local hasFlag = ____flag.hasFlag
18
+ local ____pickupVariants = require("functions.pickupVariants")
19
+ local isTrinket = ____pickupVariants.isTrinket
17
20
  local ____player = require("functions.player")
18
21
  local isCharacter = ____player.isCharacter
19
22
  local ____sprite = require("functions.sprite")
@@ -72,8 +75,9 @@ function ____exports.isGoldenTrinket(self, trinketType)
72
75
  return hasFlag(nil, trinketType, GOLDEN_TRINKET_FLAG)
73
76
  end
74
77
  function ____exports.setTrinketSprite(self, trinket, pngPath)
75
- if trinket.Variant ~= PickupVariant.TRINKET then
76
- error("You cannot set a trinket sprite for pickups of variant: " .. tostring(trinket.Variant))
78
+ if not isTrinket(nil, trinket) then
79
+ local entityID = getEntityID(nil, trinket)
80
+ error("The \"setTrinketSprite\" function was given a non-trinket: " .. entityID)
77
81
  end
78
82
  local sprite = trinket:GetSprite()
79
83
  if pngPath == nil then
package/dist/index.d.ts CHANGED
@@ -50,12 +50,14 @@ export * from "./functions/doors";
50
50
  export * from "./functions/easing";
51
51
  export * from "./functions/entity";
52
52
  export * from "./functions/entitySpecific";
53
+ export * from "./functions/entityTypes";
53
54
  export * from "./functions/enums";
54
55
  export * from "./functions/familiars";
55
56
  export * from "./functions/flag";
56
57
  export * from "./functions/flying";
57
58
  export * from "./functions/globals";
58
59
  export * from "./functions/gridEntity";
60
+ export * from "./functions/gridEntitySpecific";
59
61
  export * from "./functions/input";
60
62
  export * from "./functions/isaacAPIClass";
61
63
  export * from "./functions/jsonHelpers";
@@ -69,6 +71,7 @@ export * from "./functions/math";
69
71
  export { mergeTests } from "./functions/mergeTests";
70
72
  export * from "./functions/npc";
71
73
  export * from "./functions/pickups";
74
+ export * from "./functions/pickupVariants";
72
75
  export * from "./functions/pills";
73
76
  export * from "./functions/player";
74
77
  export * from "./functions/playerDataStructures";
package/dist/index.lua CHANGED
@@ -413,6 +413,14 @@ do
413
413
  end
414
414
  end
415
415
  end
416
+ do
417
+ local ____export = require("functions.entityTypes")
418
+ for ____exportKey, ____exportValue in pairs(____export) do
419
+ if ____exportKey ~= "default" then
420
+ ____exports[____exportKey] = ____exportValue
421
+ end
422
+ end
423
+ end
416
424
  do
417
425
  local ____export = require("functions.enums")
418
426
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -461,6 +469,14 @@ do
461
469
  end
462
470
  end
463
471
  end
472
+ do
473
+ local ____export = require("functions.gridEntitySpecific")
474
+ for ____exportKey, ____exportValue in pairs(____export) do
475
+ if ____exportKey ~= "default" then
476
+ ____exports[____exportKey] = ____exportValue
477
+ end
478
+ end
479
+ end
464
480
  do
465
481
  local ____export = require("functions.input")
466
482
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -562,6 +578,14 @@ do
562
578
  end
563
579
  end
564
580
  end
581
+ do
582
+ local ____export = require("functions.pickupVariants")
583
+ for ____exportKey, ____exportValue in pairs(____export) do
584
+ if ____exportKey ~= "default" then
585
+ ____exports[____exportKey] = ____exportValue
586
+ end
587
+ end
588
+ end
565
589
  do
566
590
  local ____export = require("functions.pills")
567
591
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -13,6 +13,10 @@ local ____postCursedTeleport = require("callbacks.postCursedTeleport")
13
13
  local postCursedTeleportCallbackInit = ____postCursedTeleport.postCursedTeleportCallbackInit
14
14
  local ____postCustomDoorEnter = require("callbacks.postCustomDoorEnter")
15
15
  local postCustomDoorEnterCallbackInit = ____postCustomDoorEnter.postCustomDoorEnterCallbackInit
16
+ local ____postDoorRender = require("callbacks.postDoorRender")
17
+ local postDoorRenderInit = ____postDoorRender.postDoorRenderInit
18
+ local ____postDoorUpdate = require("callbacks.postDoorUpdate")
19
+ local postDoorUpdateInit = ____postDoorUpdate.postDoorUpdateInit
16
20
  local ____postEffectInitLate = require("callbacks.postEffectInitLate")
17
21
  local postEffectInitLateCallbackInit = ____postEffectInitLate.postEffectInitLateCallbackInit
18
22
  local ____postEffectStateChanged = require("callbacks.postEffectStateChanged")
@@ -49,6 +53,10 @@ local ____postPickupInitLate = require("callbacks.postPickupInitLate")
49
53
  local postPickupInitLateCallbackInit = ____postPickupInitLate.postPickupInitLateCallbackInit
50
54
  local ____postPickupStateChanged = require("callbacks.postPickupStateChanged")
51
55
  local postPickupStateChangedCallbackInit = ____postPickupStateChanged.postPickupStateChangedCallbackInit
56
+ local ____postPitRender = require("callbacks.postPitRender")
57
+ local postPitRenderInit = ____postPitRender.postPitRenderInit
58
+ local ____postPitUpdate = require("callbacks.postPitUpdate")
59
+ local postPitUpdateInit = ____postPitUpdate.postPitUpdateInit
52
60
  local ____postPlayerChangeHealth = require("callbacks.postPlayerChangeHealth")
53
61
  local postPlayerChangeHealthCallbackInit = ____postPlayerChangeHealth.postPlayerChangeHealthCallbackInit
54
62
  local ____postPlayerChangeType = require("callbacks.postPlayerChangeType")
@@ -59,10 +67,22 @@ local ____postPlayerInitLate = require("callbacks.postPlayerInitLate")
59
67
  local postPlayerInitLateCallbackInit = ____postPlayerInitLate.postPlayerInitLateCallbackInit
60
68
  local ____postPlayerReordered = require("callbacks.postPlayerReordered")
61
69
  local postPlayerReorderedCallbacksInit = ____postPlayerReordered.postPlayerReorderedCallbacksInit
70
+ local ____postPoopRender = require("callbacks.postPoopRender")
71
+ local postPoopRenderInit = ____postPoopRender.postPoopRenderInit
72
+ local ____postPoopUpdate = require("callbacks.postPoopUpdate")
73
+ local postPoopUpdateInit = ____postPoopUpdate.postPoopUpdateInit
74
+ local ____postPressurePlateRender = require("callbacks.postPressurePlateRender")
75
+ local postPressurePlateRenderInit = ____postPressurePlateRender.postPressurePlateRenderInit
76
+ local ____postPressurePlateUpdate = require("callbacks.postPressurePlateUpdate")
77
+ local postPressurePlateUpdateInit = ____postPressurePlateUpdate.postPressurePlateUpdateInit
62
78
  local ____postProjectileInitLate = require("callbacks.postProjectileInitLate")
63
79
  local postProjectileInitLateCallbackInit = ____postProjectileInitLate.postProjectileInitLateCallbackInit
64
80
  local ____postPurchase = require("callbacks.postPurchase")
65
81
  local postPurchaseCallbackInit = ____postPurchase.postPurchaseCallbackInit
82
+ local ____postRockRender = require("callbacks.postRockRender")
83
+ local postRockRenderInit = ____postRockRender.postRockRenderInit
84
+ local ____postRockUpdate = require("callbacks.postRockUpdate")
85
+ local postRockUpdateInit = ____postRockUpdate.postRockUpdateInit
66
86
  local ____postRoomClearChanged = require("callbacks.postRoomClearChanged")
67
87
  local postRoomClearChangedCallbackInit = ____postRoomClearChanged.postRoomClearChangedCallbackInit
68
88
  local ____postSacrifice = require("callbacks.postSacrifice")
@@ -71,10 +91,18 @@ local ____postSlotInitUpdate = require("callbacks.postSlotInitUpdate")
71
91
  local postSlotInitUpdateCallbacksInit = ____postSlotInitUpdate.postSlotInitUpdateCallbacksInit
72
92
  local ____postSlotRender = require("callbacks.postSlotRender")
73
93
  local postSlotRenderCallbacksInit = ____postSlotRender.postSlotRenderCallbacksInit
94
+ local ____postSpikesRender = require("callbacks.postSpikesRender")
95
+ local postSpikesRenderInit = ____postSpikesRender.postSpikesRenderInit
96
+ local ____postSpikesUpdate = require("callbacks.postSpikesUpdate")
97
+ local postSpikesUpdateInit = ____postSpikesUpdate.postSpikesUpdateInit
74
98
  local ____postTearInitLate = require("callbacks.postTearInitLate")
75
99
  local postTearInitLateCallbackInit = ____postTearInitLate.postTearInitLateCallbackInit
76
100
  local ____postTearInitVeryLate = require("callbacks.postTearInitVeryLate")
77
101
  local postTearInitVeryLateCallbackInit = ____postTearInitVeryLate.postTearInitVeryLateCallbackInit
102
+ local ____postTNTRender = require("callbacks.postTNTRender")
103
+ local postTNTRenderInit = ____postTNTRender.postTNTRenderInit
104
+ local ____postTNTUpdate = require("callbacks.postTNTUpdate")
105
+ local postTNTUpdateInit = ____postTNTUpdate.postTNTUpdateInit
78
106
  local ____postTransformation = require("callbacks.postTransformation")
79
107
  local postTransformationCallbackInit = ____postTransformation.postTransformationCallbackInit
80
108
  local ____postTrinketBreak = require("callbacks.postTrinketBreak")
@@ -93,6 +121,8 @@ function ____exports.initCustomCallbacks(self, mod)
93
121
  postCollectibleInitFirstCallbackInit(nil, mod)
94
122
  postCursedTeleportCallbackInit(nil, mod)
95
123
  postCustomDoorEnterCallbackInit(nil)
124
+ postDoorRenderInit(nil, mod)
125
+ postDoorUpdateInit(nil, mod)
96
126
  postEffectInitLateCallbackInit(nil, mod)
97
127
  postEffectStateChangedCallbackInit(nil, mod)
98
128
  postEsauJrCallbacksInit(nil, mod)
@@ -111,19 +141,31 @@ function ____exports.initCustomCallbacks(self, mod)
111
141
  postPickupCollectCallbackInit(nil, mod)
112
142
  postPickupInitLateCallbackInit(nil, mod)
113
143
  postPickupStateChangedCallbackInit(nil, mod)
144
+ postPitRenderInit(nil, mod)
145
+ postPitUpdateInit(nil, mod)
114
146
  postPlayerChangeHealthCallbackInit(nil, mod)
115
147
  postPlayerChangeTypeCallbackInit(nil, mod)
116
148
  postPlayerFatalDamageCallbackInit(nil, mod)
117
149
  postPlayerInitLateCallbackInit(nil, mod)
118
150
  postPlayerReorderedCallbacksInit(nil, mod)
151
+ postPoopRenderInit(nil, mod)
152
+ postPoopUpdateInit(nil, mod)
153
+ postPressurePlateRenderInit(nil, mod)
154
+ postPressurePlateUpdateInit(nil, mod)
119
155
  postProjectileInitLateCallbackInit(nil, mod)
120
156
  postPurchaseCallbackInit(nil, mod)
157
+ postRockRenderInit(nil, mod)
158
+ postRockUpdateInit(nil, mod)
121
159
  postRoomClearChangedCallbackInit(nil, mod)
122
160
  postSacrificeCallbackInit(nil, mod)
123
161
  postSlotInitUpdateCallbacksInit(nil, mod)
124
162
  postSlotRenderCallbacksInit(nil, mod)
163
+ postSpikesRenderInit(nil, mod)
164
+ postSpikesUpdateInit(nil, mod)
125
165
  postTearInitLateCallbackInit(nil, mod)
126
166
  postTearInitVeryLateCallbackInit(nil, mod)
167
+ postTNTRenderInit(nil, mod)
168
+ postTNTUpdateInit(nil, mod)
127
169
  postTransformationCallbackInit(nil, mod)
128
170
  postTrinketBreakCallbackInit(nil, mod)
129
171
  preBerserkDeathCallbackInit(nil, mod)
@@ -3,8 +3,6 @@ local ____characterHealthConversion = require("features.characterHealthConversio
3
3
  local characterHealthConversionInit = ____characterHealthConversion.characterHealthConversionInit
4
4
  local ____characterStats = require("features.characterStats")
5
5
  local characterStatsInit = ____characterStats.characterStatsInit
6
- local ____debugDisplay = require("features.debugDisplay")
7
- local debugDisplayInit = ____debugDisplay.debugDisplayInit
8
6
  local ____deployJSONRoom = require("features.deployJSONRoom")
9
7
  local deployJSONRoomInit = ____deployJSONRoom.deployJSONRoomInit
10
8
  local ____disableInputs = require("features.disableInputs")
@@ -42,7 +40,6 @@ function ____exports.initFeaturesMinor(self, mod)
42
40
  disableSoundsInit(nil, mod)
43
41
  fadeInRemoverInit(nil, mod)
44
42
  fastResetInit(nil, mod)
45
- debugDisplayInit(nil, mod)
46
43
  forgottenSwitchInit(nil, mod)
47
44
  getCollectibleItemPoolTypeInit(nil, mod)
48
45
  isPonyActiveInit(nil, mod)