isaacscript-common 15.0.0 → 15.0.2

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 (64) hide show
  1. package/dist/index.d.ts +236 -13
  2. package/dist/isaacscript-common.lua +3 -2
  3. package/dist/src/classes/callbacks/PostPlayerInitFirst.d.ts.map +1 -1
  4. package/dist/src/classes/callbacks/PostPlayerInitFirst.lua +2 -1
  5. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +15 -0
  6. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
  7. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +43 -0
  8. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
  9. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +7 -0
  10. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts +3 -0
  11. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts.map +1 -1
  12. package/dist/src/classes/features/other/CharacterStats.d.ts +2 -0
  13. package/dist/src/classes/features/other/CharacterStats.d.ts.map +1 -1
  14. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts +3 -0
  15. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
  16. package/dist/src/classes/features/other/CustomHotkeys.d.ts +8 -0
  17. package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
  18. package/dist/src/classes/features/other/CustomItemPools.d.ts +4 -0
  19. package/dist/src/classes/features/other/CustomItemPools.d.ts.map +1 -1
  20. package/dist/src/classes/features/other/CustomPickups.d.ts +2 -0
  21. package/dist/src/classes/features/other/CustomPickups.d.ts.map +1 -1
  22. package/dist/src/classes/features/other/CustomStages.d.ts +5 -2
  23. package/dist/src/classes/features/other/CustomStages.d.ts.map +1 -1
  24. package/dist/src/classes/features/other/CustomTrapdoors.d.ts +4 -0
  25. package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  26. package/dist/src/classes/features/other/DebugDisplay.d.ts +99 -9
  27. package/dist/src/classes/features/other/DebugDisplay.d.ts.map +1 -1
  28. package/dist/src/classes/features/other/DeployJSONRoom.d.ts +2 -0
  29. package/dist/src/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
  30. package/dist/src/classes/features/other/DisableAllSound.d.ts +4 -0
  31. package/dist/src/classes/features/other/DisableAllSound.d.ts.map +1 -1
  32. package/dist/src/classes/features/other/SpawnCollectible.d.ts +4 -0
  33. package/dist/src/classes/features/other/SpawnCollectible.d.ts.map +1 -1
  34. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts +21 -0
  35. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
  36. package/dist/src/classes/features/other/StageHistory.d.ts +11 -1
  37. package/dist/src/classes/features/other/StageHistory.d.ts.map +1 -1
  38. package/dist/src/classes/features/other/StartAmbush.d.ts +2 -0
  39. package/dist/src/classes/features/other/StartAmbush.d.ts.map +1 -1
  40. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts +3 -0
  41. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
  42. package/dist/src/types/ModUpgraded.d.ts +1 -1
  43. package/dist/src/types/ModUpgraded.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/src/classes/callbacks/PostPlayerInitFirst.ts +3 -1
  46. package/src/classes/features/callbackLogic/CustomGridEntities.ts +15 -0
  47. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +43 -8
  48. package/src/classes/features/other/CharacterHealthConversion.ts +3 -0
  49. package/src/classes/features/other/CharacterStats.ts +2 -0
  50. package/src/classes/features/other/CollectibleItemPoolType.ts +3 -0
  51. package/src/classes/features/other/CustomHotkeys.ts +8 -0
  52. package/src/classes/features/other/CustomItemPools.ts +4 -0
  53. package/src/classes/features/other/CustomPickups.ts +2 -0
  54. package/src/classes/features/other/CustomStages.ts +5 -2
  55. package/src/classes/features/other/CustomTrapdoors.ts +4 -0
  56. package/src/classes/features/other/DebugDisplay.ts +99 -9
  57. package/src/classes/features/other/DeployJSONRoom.ts +2 -0
  58. package/src/classes/features/other/DisableAllSound.ts +4 -0
  59. package/src/classes/features/other/SpawnCollectible.ts +4 -0
  60. package/src/classes/features/other/SpawnRockAltRewards.ts +21 -0
  61. package/src/classes/features/other/StageHistory.ts +11 -1
  62. package/src/classes/features/other/StartAmbush.ts +2 -0
  63. package/src/classes/features/other/TaintedLazarusPlayers.ts +3 -0
  64. package/src/types/ModUpgraded.ts +2 -2
@@ -51,6 +51,8 @@ export class StageHistory extends Feature {
51
51
  * that the next stage type can be properly calculated on The Ascent (which makes it unlike the
52
52
  * `getNextStageType` function).
53
53
  *
54
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
55
+ *
54
56
  * @param upwards Whether or not the player should go up to Cathedral in the case of being on Womb
55
57
  * 2. Default is false.
56
58
  */
@@ -159,6 +161,8 @@ export class StageHistory extends Feature {
159
161
  * This function accounts for the previous floors that a player has visited thus far on the run so
160
162
  * that the next stage can be properly calculated on The Ascent (which makes it unlike the
161
163
  * `getNextStage` function).
164
+ *
165
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
162
166
  */
163
167
  @Exported
164
168
  public getNextStageWithHistory(): LevelStage {
@@ -287,7 +291,11 @@ export class StageHistory extends Feature {
287
291
  return asNumber(stage) - 1;
288
292
  }
289
293
 
290
- /** Helper function to get all of the stages that a player has visited thus far on this run. */
294
+ /**
295
+ * Helper function to get all of the stages that a player has visited thus far on this run.
296
+ *
297
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
298
+ */
291
299
  @Exported
292
300
  public getStageHistory(): ReadonlyArray<
293
301
  [stage: LevelStage, stageType: StageType]
@@ -299,6 +307,8 @@ export class StageHistory extends Feature {
299
307
  * Helper function to check if a player has previous visited a particular stage (or stage + stage
300
308
  * type combination) on this run.
301
309
  *
310
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
311
+ *
302
312
  * @param stage The stage to check for.
303
313
  * @param stageType Optional. If provided, will check for a specific stage and stage type
304
314
  * combination.
@@ -29,6 +29,8 @@ export class StartAmbush extends Feature {
29
29
  *
30
30
  * Specifically, this is performed by spawning a sack on top of the player, waiting a game frame,
31
31
  * and then removing the sack and the pickups that the sack dropped.
32
+ *
33
+ * In order to use this function, you must upgrade your mod with `ISCFeature.START_AMBUSH`.
32
34
  */
33
35
  @Exported
34
36
  public startAmbush(): void {
@@ -106,6 +106,9 @@ export class TaintedLazarusPlayers extends Feature {
106
106
  * If you call the `EntityPlayer.Exists` method on the returned object, it will return false.
107
107
  * However, you can still call the other methods like you normally would (e.g.
108
108
  * `EntityPlayer.AddCollectible`).
109
+ *
110
+ * In order to use this function, you must upgrade your mod with
111
+ * `ISCFeature.CHARACTER_HEALTH_CONVERSION`.
109
112
  */
110
113
  @Exported
111
114
  public getTaintedLazarusSubPlayer(
@@ -16,8 +16,8 @@ import { Writeable } from "./Writable";
16
16
  * By specifying one or more optional features, end-users will get a version of `ModUpgraded` that
17
17
  * has extra methods corresponding to the features that were specified.
18
18
  */
19
- export type ModUpgraded<T extends readonly ISCFeature[]> = ModUpgradedBase &
20
- ISCFeaturesToKeys<T>;
19
+ export type ModUpgraded<T extends readonly ISCFeature[] = []> =
20
+ ModUpgradedBase & ISCFeaturesToKeys<T>;
21
21
 
22
22
  /**
23
23
  * We want to only extract the class public methods, so we omit the keys of the `Feature` base