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.
- package/dist/index.rollup.d.ts +4 -4
- package/dist/isaacscript-common.lua +268 -248
- package/dist/lualib_bundle.lua +25 -5
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +6 -6
- package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +4 -4
- package/dist/src/classes/features/other/CharacterHealthConversion.lua +2 -2
- package/dist/src/classes/features/other/CharacterStats.lua +2 -2
- package/dist/src/classes/features/other/CollectibleItemPoolType.lua +2 -2
- package/dist/src/classes/features/other/CustomHotkeys.lua +5 -5
- package/dist/src/classes/features/other/CustomItemPools.lua +3 -3
- package/dist/src/classes/features/other/CustomPickups.lua +2 -2
- package/dist/src/classes/features/other/CustomStages.lua +3 -3
- package/dist/src/classes/features/other/CustomTrapdoors.lua +3 -3
- package/dist/src/classes/features/other/DebugDisplay.lua +37 -37
- package/dist/src/classes/features/other/DeployJSONRoom.lua +2 -2
- package/dist/src/classes/features/other/DisableAllSound.lua +3 -3
- package/dist/src/classes/features/other/DisableInputs.lua +9 -9
- package/dist/src/classes/features/other/EdenStartingStats.lua +3 -3
- package/dist/src/classes/features/other/ExtraConsoleCommands.lua +3 -3
- package/dist/src/classes/features/other/FadeInRemover.lua +3 -3
- package/dist/src/classes/features/other/FastReset.lua +3 -3
- package/dist/src/classes/features/other/FlyingDetection.d.ts.map +1 -1
- package/dist/src/classes/features/other/FlyingDetection.lua +3 -3
- package/dist/src/classes/features/other/ForgottenSwitch.lua +2 -2
- package/dist/src/classes/features/other/ItemPoolDetection.lua +4 -4
- package/dist/src/classes/features/other/ModdedElementDetection.lua +24 -24
- package/dist/src/classes/features/other/ModdedElementSets.lua +38 -38
- package/dist/src/classes/features/other/NoSirenSteal.lua +2 -2
- package/dist/src/classes/features/other/Pause.lua +4 -4
- package/dist/src/classes/features/other/PersistentEntities.lua +3 -3
- package/dist/src/classes/features/other/PickupIndexCreation.lua +2 -2
- package/dist/src/classes/features/other/PlayerInventory.lua +3 -3
- package/dist/src/classes/features/other/PonyDetection.lua +3 -3
- package/dist/src/classes/features/other/PressInput.lua +2 -2
- package/dist/src/classes/features/other/PreventChildEntities.lua +2 -2
- package/dist/src/classes/features/other/PreventCollectibleRotation.lua +2 -2
- package/dist/src/classes/features/other/PreventGridEntityRespawn.lua +2 -2
- package/dist/src/classes/features/other/RoomClearFrame.lua +3 -3
- package/dist/src/classes/features/other/RoomHistory.lua +8 -8
- package/dist/src/classes/features/other/RunInNFrames.lua +8 -8
- package/dist/src/classes/features/other/RunNextRoom.lua +2 -2
- package/dist/src/classes/features/other/SaveDataManager.lua +10 -10
- package/dist/src/classes/features/other/SpawnCollectible.lua +3 -3
- package/dist/src/classes/features/other/SpawnRockAltRewards.lua +8 -8
- package/dist/src/classes/features/other/StageHistory.lua +5 -5
- package/dist/src/classes/features/other/StartAmbush.lua +2 -2
- package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +2 -2
- package/dist/src/functions/random.d.ts +4 -4
- package/dist/src/functions/random.lua +4 -4
- package/package.json +1 -1
- package/src/classes/features/other/FlyingDetection.ts +4 -2
- 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
|
-
---
|
|
11
|
-
--
|
|
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
|
-
---
|
|
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
|
-
---
|
|
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
|
@@ -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
|
-
// -
|
|
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(
|
|
40
|
+
this.moddedElementSets.getFlyingCollectibles(true);
|
|
39
41
|
for (const collectibleType of flyingCollectibles) {
|
|
40
42
|
if (effects.HasCollectibleEffect(collectibleType)) {
|
|
41
43
|
return true;
|
package/src/functions/random.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { ReadonlySet } from "../types/ReadonlySet";
|
|
|
2
2
|
import { getRandomSeed, isRNG, newRNG } from "./rng";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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.
|