isaacscript-common 30.11.6 → 30.11.8

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 (52) hide show
  1. package/dist/index.rollup.d.ts +4 -4
  2. package/dist/isaacscript-common.lua +268 -248
  3. package/dist/lualib_bundle.lua +25 -5
  4. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +6 -6
  5. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +4 -4
  6. package/dist/src/classes/features/other/CharacterHealthConversion.lua +2 -2
  7. package/dist/src/classes/features/other/CharacterStats.lua +2 -2
  8. package/dist/src/classes/features/other/CollectibleItemPoolType.lua +2 -2
  9. package/dist/src/classes/features/other/CustomHotkeys.lua +5 -5
  10. package/dist/src/classes/features/other/CustomItemPools.lua +3 -3
  11. package/dist/src/classes/features/other/CustomPickups.lua +2 -2
  12. package/dist/src/classes/features/other/CustomStages.lua +3 -3
  13. package/dist/src/classes/features/other/CustomTrapdoors.lua +3 -3
  14. package/dist/src/classes/features/other/DebugDisplay.lua +37 -37
  15. package/dist/src/classes/features/other/DeployJSONRoom.lua +2 -2
  16. package/dist/src/classes/features/other/DisableAllSound.lua +3 -3
  17. package/dist/src/classes/features/other/DisableInputs.lua +9 -9
  18. package/dist/src/classes/features/other/EdenStartingStats.lua +3 -3
  19. package/dist/src/classes/features/other/ExtraConsoleCommands.lua +3 -3
  20. package/dist/src/classes/features/other/FadeInRemover.lua +3 -3
  21. package/dist/src/classes/features/other/FastReset.lua +3 -3
  22. package/dist/src/classes/features/other/FlyingDetection.d.ts.map +1 -1
  23. package/dist/src/classes/features/other/FlyingDetection.lua +3 -3
  24. package/dist/src/classes/features/other/ForgottenSwitch.lua +2 -2
  25. package/dist/src/classes/features/other/ItemPoolDetection.lua +4 -4
  26. package/dist/src/classes/features/other/ModdedElementDetection.lua +24 -24
  27. package/dist/src/classes/features/other/ModdedElementSets.lua +38 -38
  28. package/dist/src/classes/features/other/NoSirenSteal.lua +2 -2
  29. package/dist/src/classes/features/other/Pause.lua +4 -4
  30. package/dist/src/classes/features/other/PersistentEntities.lua +3 -3
  31. package/dist/src/classes/features/other/PickupIndexCreation.lua +2 -2
  32. package/dist/src/classes/features/other/PlayerInventory.lua +3 -3
  33. package/dist/src/classes/features/other/PonyDetection.lua +3 -3
  34. package/dist/src/classes/features/other/PressInput.lua +2 -2
  35. package/dist/src/classes/features/other/PreventChildEntities.lua +2 -2
  36. package/dist/src/classes/features/other/PreventCollectibleRotation.lua +2 -2
  37. package/dist/src/classes/features/other/PreventGridEntityRespawn.lua +2 -2
  38. package/dist/src/classes/features/other/RoomClearFrame.lua +3 -3
  39. package/dist/src/classes/features/other/RoomHistory.lua +8 -8
  40. package/dist/src/classes/features/other/RunInNFrames.lua +8 -8
  41. package/dist/src/classes/features/other/RunNextRoom.lua +2 -2
  42. package/dist/src/classes/features/other/SaveDataManager.lua +10 -10
  43. package/dist/src/classes/features/other/SpawnCollectible.lua +3 -3
  44. package/dist/src/classes/features/other/SpawnRockAltRewards.lua +8 -8
  45. package/dist/src/classes/features/other/StageHistory.lua +5 -5
  46. package/dist/src/classes/features/other/StartAmbush.lua +2 -2
  47. package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +2 -2
  48. package/dist/src/functions/random.d.ts +4 -4
  49. package/dist/src/functions/random.lua +4 -4
  50. package/package.json +1 -1
  51. package/src/classes/features/other/FlyingDetection.ts +4 -2
  52. package/src/functions/random.ts +4 -4
@@ -7,8 +7,8 @@ local ____rng = require("src.functions.rng")
7
7
  local getRandomSeed = ____rng.getRandomSeed
8
8
  local isRNG = ____rng.isRNG
9
9
  local newRNG = ____rng.newRNG
10
- --- This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
11
- -- high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
10
+ --- Returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the high
11
+ -- end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
12
12
  --
13
13
  -- @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
14
14
  -- `RNG.Next` method will be called. Default is `getRandomSeed()`.
@@ -19,7 +19,7 @@ function ____exports.getRandom(self, seedOrRNG)
19
19
  local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
20
20
  return rng:RandomFloat()
21
21
  end
22
- --- This returns a random float between min and max.
22
+ --- Returns a random float between min and max.
23
23
  --
24
24
  -- For example:
25
25
  --
@@ -43,7 +43,7 @@ function ____exports.getRandomFloat(self, min, max, seedOrRNG)
43
43
  end
44
44
  return min + ____exports.getRandom(nil, seedOrRNG) * (max - min)
45
45
  end
46
- --- This returns a random integer between min and max. It is inclusive on both ends.
46
+ --- Returns a random integer between min and max. It is inclusive on both ends.
47
47
  --
48
48
  -- Note that this function will run the `Next` method on the `RNG` object before returning the
49
49
  -- random number.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "30.11.6",
3
+ "version": "30.11.8",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -32,10 +32,12 @@ export class FlyingDetection extends Feature {
32
32
  public hasFlyingTemporaryEffect(player: EntityPlayer): boolean {
33
33
  const effects = player.GetEffects();
34
34
 
35
- // - Hanged Man card gives a Transcendence temporary effect.
35
+ // - We specify true to the `getFlyingCollectibles` function since conditional flying
36
+ // collectibles will only grant a temporary effect if their condition is activated.
37
+ // - The Hanged Man card gives a Transcendence temporary effect.
36
38
  // - Pinking Shears gives a Transcendence temporary effect.
37
39
  const flyingCollectibles =
38
- this.moddedElementSets.getFlyingCollectibles(false);
40
+ this.moddedElementSets.getFlyingCollectibles(true);
39
41
  for (const collectibleType of flyingCollectibles) {
40
42
  if (effects.HasCollectibleEffect(collectibleType)) {
41
43
  return true;
@@ -2,8 +2,8 @@ import { ReadonlySet } from "../types/ReadonlySet";
2
2
  import { getRandomSeed, isRNG, newRNG } from "./rng";
3
3
 
4
4
  /**
5
- * This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
6
- * high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
5
+ * Returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the high
6
+ * end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
7
7
  *
8
8
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
9
9
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
@@ -14,7 +14,7 @@ export function getRandom(seedOrRNG: Seed | RNG = getRandomSeed()): float {
14
14
  }
15
15
 
16
16
  /**
17
- * This returns a random float between min and max.
17
+ * Returns a random float between min and max.
18
18
  *
19
19
  * For example:
20
20
  *
@@ -44,7 +44,7 @@ export function getRandomFloat(
44
44
  }
45
45
 
46
46
  /**
47
- * This returns a random integer between min and max. It is inclusive on both ends.
47
+ * Returns a random integer between min and max. It is inclusive on both ends.
48
48
  *
49
49
  * Note that this function will run the `Next` method on the `RNG` object before returning the
50
50
  * random number.