isaacscript-common 17.7.2 → 17.8.0

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 (85) hide show
  1. package/dist/index.d.ts +50 -0
  2. package/dist/isaacscript-common.lua +4478 -4459
  3. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts.map +1 -1
  4. package/dist/src/classes/features/other/CharacterStats.d.ts.map +1 -1
  5. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
  6. package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
  7. package/dist/src/classes/features/other/CustomPickups.d.ts.map +1 -1
  8. package/dist/src/classes/features/other/CustomStages.d.ts.map +1 -1
  9. package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  10. package/dist/src/classes/features/other/DisableAllSound.d.ts.map +1 -1
  11. package/dist/src/classes/features/other/DisableInputs.d.ts.map +1 -1
  12. package/dist/src/classes/features/other/ExtraConsoleCommands.d.ts.map +1 -1
  13. package/dist/src/classes/features/other/FadeInRemover.d.ts.map +1 -1
  14. package/dist/src/classes/features/other/FastReset.d.ts.map +1 -1
  15. package/dist/src/classes/features/other/ModdedElementDetection.d.ts.map +1 -1
  16. package/dist/src/classes/features/other/NoSirenSteal.d.ts.map +1 -1
  17. package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
  18. package/dist/src/classes/features/other/PersistentEntities.d.ts.map +1 -1
  19. package/dist/src/classes/features/other/PickupIndexCreation.d.ts +7 -0
  20. package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
  21. package/dist/src/classes/features/other/PickupIndexCreation.lua +26 -18
  22. package/dist/src/classes/features/other/PressInput.d.ts.map +1 -1
  23. package/dist/src/classes/features/other/PreventChildEntities.d.ts.map +1 -1
  24. package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts.map +1 -1
  25. package/dist/src/classes/features/other/PreventGridEntityRespawn.d.ts.map +1 -1
  26. package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -1
  27. package/dist/src/classes/features/other/SaveDataManager.d.ts +14 -0
  28. package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -1
  29. package/dist/src/classes/features/other/SaveDataManager.lua +4 -1
  30. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
  31. package/dist/src/classes/features/other/debugDisplay/DebugDisplayBomb.d.ts.map +1 -1
  32. package/dist/src/classes/features/other/debugDisplay/DebugDisplayEffect.d.ts.map +1 -1
  33. package/dist/src/classes/features/other/debugDisplay/DebugDisplayFamiliar.d.ts.map +1 -1
  34. package/dist/src/classes/features/other/debugDisplay/DebugDisplayKnife.d.ts.map +1 -1
  35. package/dist/src/classes/features/other/debugDisplay/DebugDisplayLaser.d.ts.map +1 -1
  36. package/dist/src/classes/features/other/debugDisplay/DebugDisplayNPC.d.ts.map +1 -1
  37. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPickup.d.ts.map +1 -1
  38. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPlayer.d.ts.map +1 -1
  39. package/dist/src/classes/features/other/debugDisplay/DebugDisplayProjectile.d.ts.map +1 -1
  40. package/dist/src/classes/features/other/debugDisplay/DebugDisplayTear.d.ts.map +1 -1
  41. package/dist/src/enums/ModCallbackCustom.d.ts +3 -0
  42. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  43. package/dist/src/features.d.ts.map +1 -1
  44. package/dist/src/features.lua +3 -2
  45. package/dist/src/functions/utils.d.ts +24 -0
  46. package/dist/src/functions/utils.d.ts.map +1 -1
  47. package/dist/src/functions/utils.lua +24 -0
  48. package/package.json +2 -2
  49. package/src/classes/features/other/CharacterHealthConversion.ts +2 -1
  50. package/src/classes/features/other/CharacterStats.ts +2 -1
  51. package/src/classes/features/other/CollectibleItemPoolType.ts +2 -1
  52. package/src/classes/features/other/CustomHotkeys.ts +2 -1
  53. package/src/classes/features/other/CustomPickups.ts +5 -2
  54. package/src/classes/features/other/CustomStages.ts +8 -3
  55. package/src/classes/features/other/CustomTrapdoors.ts +2 -1
  56. package/src/classes/features/other/DisableAllSound.ts +2 -1
  57. package/src/classes/features/other/DisableInputs.ts +11 -6
  58. package/src/classes/features/other/ExtraConsoleCommands.ts +26 -9
  59. package/src/classes/features/other/FadeInRemover.ts +2 -1
  60. package/src/classes/features/other/FastReset.ts +2 -1
  61. package/src/classes/features/other/ModdedElementDetection.ts +2 -1
  62. package/src/classes/features/other/NoSirenSteal.ts +2 -1
  63. package/src/classes/features/other/Pause.ts +5 -2
  64. package/src/classes/features/other/PersistentEntities.ts +2 -1
  65. package/src/classes/features/other/PickupIndexCreation.ts +35 -13
  66. package/src/classes/features/other/PressInput.ts +2 -1
  67. package/src/classes/features/other/PreventChildEntities.ts +2 -1
  68. package/src/classes/features/other/PreventCollectibleRotation.ts +5 -2
  69. package/src/classes/features/other/PreventGridEntityRespawn.ts +2 -1
  70. package/src/classes/features/other/RunInNFrames.ts +5 -2
  71. package/src/classes/features/other/SaveDataManager.ts +36 -8
  72. package/src/classes/features/other/TaintedLazarusPlayers.ts +2 -1
  73. package/src/classes/features/other/debugDisplay/DebugDisplayBomb.ts +2 -1
  74. package/src/classes/features/other/debugDisplay/DebugDisplayEffect.ts +2 -1
  75. package/src/classes/features/other/debugDisplay/DebugDisplayFamiliar.ts +2 -1
  76. package/src/classes/features/other/debugDisplay/DebugDisplayKnife.ts +2 -1
  77. package/src/classes/features/other/debugDisplay/DebugDisplayLaser.ts +2 -1
  78. package/src/classes/features/other/debugDisplay/DebugDisplayNPC.ts +2 -1
  79. package/src/classes/features/other/debugDisplay/DebugDisplayPickup.ts +2 -1
  80. package/src/classes/features/other/debugDisplay/DebugDisplayPlayer.ts +2 -1
  81. package/src/classes/features/other/debugDisplay/DebugDisplayProjectile.ts +2 -1
  82. package/src/classes/features/other/debugDisplay/DebugDisplayTear.ts +2 -1
  83. package/src/enums/ModCallbackCustom.ts +3 -0
  84. package/src/features.ts +6 -2
  85. package/src/functions/utils.ts +30 -0
@@ -71,6 +71,36 @@ export function iRange(start: int, end?: int, increment = 1): int[] {
71
71
  return array;
72
72
  }
73
73
 
74
+ /**
75
+ * Helper function to check if a variable is within a certain range, exclusive on both ends. (The
76
+ * "e" stands for exclusive.)
77
+ *
78
+ * - For example, `inERange(1, 1, 3)` will return `false`.
79
+ * - For example, `inERange(1.01, 1, 3)` will return `true`.
80
+ *
81
+ * @param num The number to check.
82
+ * @param start The start of the range to check.
83
+ * @param end The end of the range to check.
84
+ */
85
+ export function inERange(num: int, start: int, end: int): boolean {
86
+ return num > start && num < end;
87
+ }
88
+
89
+ /**
90
+ * Helper function to check if a variable is within a certain range, inclusive on both ends. (The
91
+ * "i" stands for inclusive.)
92
+ *
93
+ * - For example, `inIRange(1, 1, 3)` will return `true`.
94
+ * - For example, `inIRange(0, 1, 3)` will return `false`.
95
+ *
96
+ * @param num The number to check.
97
+ * @param start The start of the range to check.
98
+ * @param end The end of the range to check.
99
+ */
100
+ export function inIRange(num: int, start: int, end: int): boolean {
101
+ return num >= start && num <= end;
102
+ }
103
+
74
104
  /**
75
105
  * Helper function to see if the current render callback is rendering a water reflection.
76
106
  *