isaacscript-common 87.5.1 → 87.6.1

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 (205) hide show
  1. package/dist/callbackClasses.d.ts +1 -0
  2. package/dist/callbackClasses.d.ts.map +1 -1
  3. package/dist/callbackClasses.js +5 -3
  4. package/dist/callbackClasses.lua +4 -0
  5. package/dist/callbacks.d.ts +118 -117
  6. package/dist/callbacks.d.ts.map +1 -1
  7. package/dist/callbacks.js +1 -0
  8. package/dist/callbacks.lua +1 -0
  9. package/dist/classes/ModUpgraded.js +2 -2
  10. package/dist/classes/callbacks/InputActionFilter.js +3 -3
  11. package/dist/classes/callbacks/InputActionPlayer.js +6 -6
  12. package/dist/classes/callbacks/PostBoneSwing.js +2 -2
  13. package/dist/classes/callbacks/PostCollectibleEmpty.js +2 -2
  14. package/dist/classes/callbacks/PostCursedTeleport.js +5 -5
  15. package/dist/classes/callbacks/PostDiceRoomActivated.js +2 -2
  16. package/dist/classes/callbacks/PostEntityRemoveFilter.d.ts +9 -0
  17. package/dist/classes/callbacks/PostEntityRemoveFilter.d.ts.map +1 -0
  18. package/dist/classes/callbacks/PostEntityRemoveFilter.js +21 -0
  19. package/dist/classes/callbacks/PostEntityRemoveFilter.lua +23 -0
  20. package/dist/classes/callbacks/PostGridEntityCollision.js +10 -10
  21. package/dist/classes/callbacks/PostGridEntityCustomCollision.js +8 -8
  22. package/dist/classes/callbacks/PostGridEntityCustomRemove.js +2 -2
  23. package/dist/classes/callbacks/PostGridEntityRemove.js +3 -3
  24. package/dist/classes/callbacks/PostItemDischarge.js +2 -2
  25. package/dist/classes/callbacks/PostKeyboardChanged.js +2 -2
  26. package/dist/classes/callbacks/PostNewRoomEarly.js +2 -2
  27. package/dist/classes/callbacks/PostPickupSelectionFilter.d.ts.map +1 -1
  28. package/dist/classes/callbacks/PostPickupSelectionFilter.js +4 -3
  29. package/dist/classes/callbacks/PostPlayerChangeHealth.js +2 -2
  30. package/dist/classes/callbacks/PostPurchase.js +9 -9
  31. package/dist/classes/callbacks/PostUsePillFilter.js +2 -2
  32. package/dist/classes/callbacks/PreBerserkDeath.js +4 -4
  33. package/dist/classes/callbacks/PreEntitySpawnFilter.js +3 -3
  34. package/dist/classes/callbacks/PreRoomEntitySpawnFilter.js +5 -5
  35. package/dist/classes/features/callbackLogic/EsauJrDetection.js +2 -2
  36. package/dist/classes/features/callbackLogic/GameReorderedCallbacks.js +5 -5
  37. package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.js +4 -4
  38. package/dist/classes/features/callbackLogic/ItemPickupDetection.js +4 -4
  39. package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +2 -2
  40. package/dist/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  41. package/dist/classes/features/other/CustomTrapdoors.js +21 -21
  42. package/dist/classes/features/other/DeployJSONRoom.js +4 -4
  43. package/dist/classes/features/other/DisableInputs.js +3 -3
  44. package/dist/classes/features/other/ModdedElementSets.js +2 -2
  45. package/dist/classes/features/other/NoSirenSteal.js +4 -4
  46. package/dist/classes/features/other/PickupIndexCreation.js +5 -5
  47. package/dist/classes/features/other/PonyDetection.js +2 -2
  48. package/dist/classes/features/other/PressInput.js +2 -2
  49. package/dist/classes/features/other/PreventChildEntities.js +4 -4
  50. package/dist/classes/features/other/RoomHistory.js +5 -5
  51. package/dist/classes/features/other/SaveDataManager.js +2 -2
  52. package/dist/classes/features/other/StageHistory.js +2 -2
  53. package/dist/classes/features/other/StartAmbush.js +2 -2
  54. package/dist/classes/features/other/TaintedLazarusPlayers.js +2 -2
  55. package/dist/classes/features/other/customStages/gridEntities.js +4 -4
  56. package/dist/classes/features/other/customStages/streakText.js +4 -4
  57. package/dist/classes/features/other/extraConsoleCommands/commands.js +8 -8
  58. package/dist/classes/features/other/saveDataManager/glowingHourGlass.js +2 -2
  59. package/dist/enums/ModCallbackCustom.d.ts +134 -117
  60. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  61. package/dist/enums/ModCallbackCustom.js +134 -117
  62. package/dist/enums/ModCallbackCustom.lua +119 -117
  63. package/dist/functions/bosses.js +2 -2
  64. package/dist/functions/charge.js +2 -2
  65. package/dist/functions/collectibles.js +2 -2
  66. package/dist/functions/deepCopy.js +6 -6
  67. package/dist/functions/doors.js +3 -3
  68. package/dist/functions/easing.js +2 -2
  69. package/dist/functions/emptyRoom.js +5 -5
  70. package/dist/functions/entities.js +8 -8
  71. package/dist/functions/familiars.js +2 -2
  72. package/dist/functions/flag.js +2 -2
  73. package/dist/functions/gridEntities.js +23 -23
  74. package/dist/functions/gridEntitiesSpecific.js +2 -2
  75. package/dist/functions/isaacAPIClass.js +2 -2
  76. package/dist/functions/level.js +3 -3
  77. package/dist/functions/levelGrid.js +6 -6
  78. package/dist/functions/logEntities.js +8 -8
  79. package/dist/functions/logMisc.d.ts.map +1 -1
  80. package/dist/functions/logMisc.js +3 -2
  81. package/dist/functions/logMisc.lua +4 -2
  82. package/dist/functions/math.js +4 -4
  83. package/dist/functions/nextStage.js +10 -10
  84. package/dist/functions/npcs.js +10 -10
  85. package/dist/functions/pickupVariants.js +6 -6
  86. package/dist/functions/playerCollectibles.js +2 -2
  87. package/dist/functions/playerHealth.js +8 -8
  88. package/dist/functions/playerIndex.js +3 -3
  89. package/dist/functions/players.js +4 -4
  90. package/dist/functions/pocketItems.js +2 -2
  91. package/dist/functions/revive.js +15 -15
  92. package/dist/functions/roomGrid.js +2 -2
  93. package/dist/functions/rooms.d.ts +1 -2
  94. package/dist/functions/rooms.d.ts.map +1 -1
  95. package/dist/functions/rooms.js +39 -41
  96. package/dist/functions/rooms.lua +1 -2
  97. package/dist/functions/sort.js +2 -2
  98. package/dist/functions/spawnCollectible.js +3 -3
  99. package/dist/functions/stage.js +16 -16
  100. package/dist/functions/string.js +6 -6
  101. package/dist/functions/tears.js +2 -2
  102. package/dist/functions/trinketGive.js +4 -4
  103. package/dist/functions/types.js +3 -3
  104. package/dist/index.rollup.d.ts +151 -122
  105. package/dist/interfaces/private/AddCallbackParametersCustom.d.ts +6 -0
  106. package/dist/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  107. package/dist/isaacscript-common.lua +163 -125
  108. package/dist/lib/jsonLua.js +32 -32
  109. package/dist/shouldFire.d.ts.map +1 -1
  110. package/dist/shouldFire.js +54 -57
  111. package/dist/types/Increment.d.ts.map +1 -1
  112. package/dist/types/PickingUpItem.d.ts +10 -3
  113. package/dist/types/PickingUpItem.d.ts.map +1 -1
  114. package/dist/types/PickingUpItem.js +10 -3
  115. package/dist/types/PickingUpItem.lua +8 -3
  116. package/package.json +1 -1
  117. package/src/callbackClasses.ts +1 -0
  118. package/src/callbacks.ts +1 -0
  119. package/src/classes/ModUpgraded.ts +2 -2
  120. package/src/classes/callbacks/InputActionFilter.ts +3 -3
  121. package/src/classes/callbacks/InputActionPlayer.ts +6 -6
  122. package/src/classes/callbacks/PostBoneSwing.ts +2 -2
  123. package/src/classes/callbacks/PostCollectibleEmpty.ts +2 -2
  124. package/src/classes/callbacks/PostCursedTeleport.ts +5 -5
  125. package/src/classes/callbacks/PostDiceRoomActivated.ts +2 -2
  126. package/src/classes/callbacks/PostEntityRemoveFilter.ts +22 -0
  127. package/src/classes/callbacks/PostGridEntityCollision.ts +10 -10
  128. package/src/classes/callbacks/PostGridEntityCustomCollision.ts +8 -8
  129. package/src/classes/callbacks/PostGridEntityCustomRemove.ts +2 -2
  130. package/src/classes/callbacks/PostGridEntityRemove.ts +3 -3
  131. package/src/classes/callbacks/PostItemDischarge.ts +2 -2
  132. package/src/classes/callbacks/PostKeyboardChanged.ts +2 -2
  133. package/src/classes/callbacks/PostNewRoomEarly.ts +2 -2
  134. package/src/classes/callbacks/PostPickupSelectionFilter.ts +4 -3
  135. package/src/classes/callbacks/PostPlayerChangeHealth.ts +2 -2
  136. package/src/classes/callbacks/PostPurchase.ts +9 -9
  137. package/src/classes/callbacks/PostUsePillFilter.ts +2 -2
  138. package/src/classes/callbacks/PreBerserkDeath.ts +4 -4
  139. package/src/classes/callbacks/PreEntitySpawnFilter.ts +3 -3
  140. package/src/classes/callbacks/PreRoomEntitySpawnFilter.ts +5 -5
  141. package/src/classes/features/callbackLogic/EsauJrDetection.ts +2 -2
  142. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +5 -5
  143. package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +4 -4
  144. package/src/classes/features/callbackLogic/ItemPickupDetection.ts +4 -4
  145. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +2 -2
  146. package/src/classes/features/other/CustomTrapdoors.ts +23 -21
  147. package/src/classes/features/other/DeployJSONRoom.ts +4 -4
  148. package/src/classes/features/other/DisableInputs.ts +3 -3
  149. package/src/classes/features/other/ModdedElementSets.ts +2 -2
  150. package/src/classes/features/other/NoSirenSteal.ts +4 -4
  151. package/src/classes/features/other/PickupIndexCreation.ts +5 -5
  152. package/src/classes/features/other/PonyDetection.ts +2 -2
  153. package/src/classes/features/other/PressInput.ts +2 -2
  154. package/src/classes/features/other/PreventChildEntities.ts +4 -4
  155. package/src/classes/features/other/RoomHistory.ts +5 -5
  156. package/src/classes/features/other/SaveDataManager.ts +2 -2
  157. package/src/classes/features/other/StageHistory.ts +2 -2
  158. package/src/classes/features/other/StartAmbush.ts +2 -2
  159. package/src/classes/features/other/TaintedLazarusPlayers.ts +2 -2
  160. package/src/classes/features/other/customStages/gridEntities.ts +4 -4
  161. package/src/classes/features/other/customStages/streakText.ts +4 -4
  162. package/src/classes/features/other/extraConsoleCommands/commands.ts +8 -8
  163. package/src/classes/features/other/saveDataManager/glowingHourGlass.ts +4 -2
  164. package/src/enums/ModCallbackCustom.ts +18 -0
  165. package/src/functions/bosses.ts +2 -2
  166. package/src/functions/charge.ts +2 -2
  167. package/src/functions/collectibles.ts +2 -2
  168. package/src/functions/deepCopy.ts +6 -6
  169. package/src/functions/doors.ts +3 -3
  170. package/src/functions/easing.ts +2 -2
  171. package/src/functions/emptyRoom.ts +5 -5
  172. package/src/functions/entities.ts +8 -8
  173. package/src/functions/familiars.ts +2 -2
  174. package/src/functions/flag.ts +2 -2
  175. package/src/functions/gridEntities.ts +23 -23
  176. package/src/functions/gridEntitiesSpecific.ts +2 -2
  177. package/src/functions/isaacAPIClass.ts +2 -2
  178. package/src/functions/level.ts +3 -3
  179. package/src/functions/levelGrid.ts +6 -6
  180. package/src/functions/logEntities.ts +8 -8
  181. package/src/functions/logMisc.ts +6 -2
  182. package/src/functions/math.ts +4 -4
  183. package/src/functions/nextStage.ts +10 -10
  184. package/src/functions/npcs.ts +10 -10
  185. package/src/functions/pickupVariants.ts +6 -6
  186. package/src/functions/playerCollectibles.ts +2 -2
  187. package/src/functions/playerHealth.ts +8 -8
  188. package/src/functions/playerIndex.ts +3 -3
  189. package/src/functions/players.ts +4 -4
  190. package/src/functions/pocketItems.ts +2 -2
  191. package/src/functions/revive.ts +15 -15
  192. package/src/functions/roomGrid.ts +2 -2
  193. package/src/functions/rooms.ts +39 -41
  194. package/src/functions/sort.ts +2 -2
  195. package/src/functions/spawnCollectible.ts +3 -3
  196. package/src/functions/stage.ts +16 -16
  197. package/src/functions/string.ts +6 -6
  198. package/src/functions/tears.ts +2 -2
  199. package/src/functions/trinketGive.ts +4 -4
  200. package/src/functions/types.ts +3 -3
  201. package/src/interfaces/private/AddCallbackParametersCustom.ts +7 -0
  202. package/src/lib/jsonLua.js +32 -32
  203. package/src/shouldFire.ts +54 -57
  204. package/src/types/Increment.ts +2 -2
  205. package/src/types/PickingUpItem.ts +10 -3
@@ -1029,8 +1029,8 @@ function pocket(params) {
1029
1029
  return;
1030
1030
  }
1031
1031
  const collectibleType = (0, types_1.parseIntSafe)(params);
1032
- if (collectibleType === undefined ||
1033
- !(0, collectibles_1.isValidCollectibleType)(collectibleType)) {
1032
+ if (collectibleType === undefined
1033
+ || !(0, collectibles_1.isValidCollectibleType)(collectibleType)) {
1034
1034
  print(`Invalid collectible type: ${collectibleType}`);
1035
1035
  return;
1036
1036
  }
@@ -1115,10 +1115,10 @@ function s(params) {
1115
1115
  const finalCharacter = params.slice(-1);
1116
1116
  let stageString;
1117
1117
  let stageTypeLetter;
1118
- if (finalCharacter === "a" ||
1119
- finalCharacter === "b" ||
1120
- finalCharacter === "c" ||
1121
- finalCharacter === "d") {
1118
+ if (finalCharacter === "a"
1119
+ || finalCharacter === "b"
1120
+ || finalCharacter === "c"
1121
+ || finalCharacter === "d") {
1122
1122
  // e.g. "s 11a" for going to The Chest
1123
1123
  stageString = params.slice(0, -1);
1124
1124
  stageTypeLetter = finalCharacter;
@@ -1358,8 +1358,8 @@ function spawnCollectibleAt(params) {
1358
1358
  return;
1359
1359
  }
1360
1360
  const collectibleType = (0, types_1.parseIntSafe)(collectibleTypeString);
1361
- if (collectibleType === undefined ||
1362
- !(0, collectibles_1.isValidCollectibleType)(collectibleType)) {
1361
+ if (collectibleType === undefined
1362
+ || !(0, collectibles_1.isValidCollectibleType)(collectibleType)) {
1363
1363
  print(`Invalid collectible type: ${args[0]}`);
1364
1364
  return;
1365
1365
  }
@@ -97,8 +97,8 @@ function restoreGlowingHourGlassBackup(saveDataMap, saveDataConditionalFuncMap,
97
97
  }, constants_1.SAVE_DATA_MANAGER_DEBUG);
98
98
  }
99
99
  function getKeysToBackup(saveData) {
100
- const shouldBackupPersistentObject = saveData.persistent !== undefined &&
101
- saveData.persistent.has(REWIND_WITH_GLOWING_HOUR_GLASS_KEY);
100
+ const shouldBackupPersistentObject = saveData.persistent !== undefined
101
+ && saveData.persistent.has(REWIND_WITH_GLOWING_HOUR_GLASS_KEY);
102
102
  return shouldBackupPersistentObject
103
103
  ? [...GLOWING_HOUR_GLASS_BACKUP_KEYS, SaveDataKey_1.SaveDataKey.PERSISTENT]
104
104
  : GLOWING_HOUR_GLASS_BACKUP_KEYS;