isaacscript-common 30.11.7 → 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.
@@ -6091,8 +6091,8 @@ export declare function getPressurePlates(pressurePlateVariant?: PressurePlateVa
6091
6091
  export declare function getProjectiles(projectileVariant?: ProjectileVariant | -1, subType?: number): EntityProjectile[];
6092
6092
 
6093
6093
  /**
6094
- * This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
6095
- * high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
6094
+ * Returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the high
6095
+ * end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
6096
6096
  *
6097
6097
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
6098
6098
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
@@ -6151,7 +6151,7 @@ export declare function getRandomColor(seedOrRNG?: Seed | RNG, alpha?: number):
6151
6151
  export declare function getRandomEnumValue<T>(transpiledEnum: T, seedOrRNG?: Seed | RNG, exceptions?: Array<T[keyof T]> | ReadonlyArray<T[keyof T]>): T[keyof T];
6152
6152
 
6153
6153
  /**
6154
- * This returns a random float between min and max.
6154
+ * Returns a random float between min and max.
6155
6155
  *
6156
6156
  * For example:
6157
6157
  *
@@ -6181,7 +6181,7 @@ export declare function getRandomFromWeightedArray<T>(weightedArray: WeightedArr
6181
6181
  export declare function getRandomIndexFromWeightedArray<T>(weightedArray: WeightedArray<T>, seedOrRNG?: Seed | RNG): int;
6182
6182
 
6183
6183
  /**
6184
- * This returns a random integer between min and max. It is inclusive on both ends.
6184
+ * Returns a random integer between min and max. It is inclusive on both ends.
6185
6185
  *
6186
6186
  * Note that this function will run the `Next` method on the `RNG` object before returning the
6187
6187
  * random number.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 30.11.7
3
+ isaacscript-common 30.11.8
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -50469,7 +50469,7 @@ function FlyingDetection.prototype.____constructor(self, moddedElementSets)
50469
50469
  end
50470
50470
  function FlyingDetection.prototype.hasFlyingTemporaryEffect(self, player)
50471
50471
  local effects = player:GetEffects()
50472
- local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(false)
50472
+ local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(true)
50473
50473
  for ____, collectibleType in __TS__Iterator(flyingCollectibles) do
50474
50474
  if effects:HasCollectibleEffect(collectibleType) then
50475
50475
  return true
@@ -1 +1 @@
1
- {"version":3,"file":"FlyingDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/FlyingDetection.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAShD,qBAAa,eAAgB,SAAQ,OAAO;IAC1C,OAAO,CAAC,iBAAiB,CAAoB;IAW7C;;;;;OAKG;IAEI,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO;CA4B/D"}
1
+ {"version":3,"file":"FlyingDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/FlyingDetection.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAShD,qBAAa,eAAgB,SAAQ,OAAO;IAC1C,OAAO,CAAC,iBAAiB,CAAoB;IAW7C;;;;;OAKG;IAEI,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO;CA8B/D"}
@@ -24,7 +24,7 @@ function FlyingDetection.prototype.____constructor(self, moddedElementSets)
24
24
  end
25
25
  function FlyingDetection.prototype.hasFlyingTemporaryEffect(self, player)
26
26
  local effects = player:GetEffects()
27
- local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(false)
27
+ local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(true)
28
28
  for ____, collectibleType in __TS__Iterator(flyingCollectibles) do
29
29
  if effects:HasCollectibleEffect(collectibleType) then
30
30
  return true
@@ -2,15 +2,15 @@
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  /// <reference types="isaac-typescript-definitions" />
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()`.
10
10
  */
11
11
  export declare function getRandom(seedOrRNG?: Seed | RNG): float;
12
12
  /**
13
- * This returns a random float between min and max.
13
+ * Returns a random float between min and max.
14
14
  *
15
15
  * For example:
16
16
  *
@@ -25,7 +25,7 @@ export declare function getRandom(seedOrRNG?: Seed | RNG): float;
25
25
  */
26
26
  export declare function getRandomFloat(min: int, max: int, seedOrRNG?: Seed | RNG): float;
27
27
  /**
28
- * This returns a random integer between min and max. It is inclusive on both ends.
28
+ * Returns a random integer between min and max. It is inclusive on both ends.
29
29
  *
30
30
  * Note that this function will run the `Next` method on the `RNG` object before returning the
31
31
  * random number.
@@ -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.7",
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.