isaacscript-common 63.0.0 → 64.0.1
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 +0 -6
- package/dist/isaacscript-common.lua +3985 -3993
- package/dist/src/classes/callbacks/PostGreedModeWave.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGreedModeWave.lua +1 -3
- package/dist/src/functions/itemPool.d.ts.map +1 -1
- package/dist/src/functions/itemPool.lua +1 -3
- package/dist/src/functions/run.d.ts +0 -5
- package/dist/src/functions/run.d.ts.map +1 -1
- package/dist/src/functions/run.lua +0 -6
- package/dist/src/objects/roomTypeNames.d.ts +1 -1
- package/dist/src/objects/roomTypeNames.lua +1 -1
- package/package.json +1 -1
- package/src/classes/callbacks/PostGreedModeWave.ts +1 -2
- package/src/functions/itemPool.ts +1 -2
- package/src/functions/run.ts +0 -12
- package/src/objects/roomTypeNames.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostGreedModeWave.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostGreedModeWave.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"PostGreedModeWave.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostGreedModeWave.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQ3D,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,oBAAoB,CAAC;IAC3E,CAAC;;;;MAAK;;IAYtB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAazB;CACH"}
|
|
@@ -6,8 +6,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
6
6
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
7
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
8
8
|
local game = ____cachedClasses.game
|
|
9
|
-
local ____run = require("src.functions.run")
|
|
10
|
-
local isGreedMode = ____run.isGreedMode
|
|
11
9
|
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
12
10
|
local CustomCallback = ____CustomCallback.CustomCallback
|
|
13
11
|
local v = {run = {currentGreedWave = 0}}
|
|
@@ -19,7 +17,7 @@ function PostGreedModeWave.prototype.____constructor(self)
|
|
|
19
17
|
CustomCallback.prototype.____constructor(self)
|
|
20
18
|
self.v = v
|
|
21
19
|
self.postUpdate = function()
|
|
22
|
-
if not
|
|
20
|
+
if not game:IsGreedMode() then
|
|
23
21
|
return
|
|
24
22
|
end
|
|
25
23
|
local level = game:GetLevel()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"itemPool.d.ts","sourceRoot":"","sources":["../../../src/functions/itemPool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"itemPool.d.ts","sourceRoot":"","sources":["../../../src/functions/itemPool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAuC5D;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,CAKhD;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAMN;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,YAAY,EAAE,WAAW,EAAE,GAAG,IAAI,CAM3E"}
|
|
@@ -12,8 +12,6 @@ local game = ____cachedClasses.game
|
|
|
12
12
|
local ____array = require("src.functions.array")
|
|
13
13
|
local arrayRemove = ____array.arrayRemove
|
|
14
14
|
local getRandomArrayElement = ____array.getRandomArrayElement
|
|
15
|
-
local ____run = require("src.functions.run")
|
|
16
|
-
local isGreedMode = ____run.isGreedMode
|
|
17
15
|
local NORMAL_MODE_ONLY_ITEM_POOL_TYPES = {
|
|
18
16
|
ItemPoolType.TREASURE,
|
|
19
17
|
ItemPoolType.BOSS,
|
|
@@ -59,7 +57,7 @@ local GREED_MODE_ITEM_POOL_TYPES = ____arrayRemove_3(__TS__SparseArraySpread(___
|
|
|
59
57
|
-- the `ItemPoolType` enum, since `ItemPoolType.SHELL_GAME` (7) is not a real item pool and the
|
|
60
58
|
-- Greed Mode item pools should be excluded if not playing in Greed Mode.
|
|
61
59
|
function ____exports.getRandomItemPool(self)
|
|
62
|
-
local itemPoolTypes =
|
|
60
|
+
local itemPoolTypes = game:IsGreedMode() and GREED_MODE_ITEM_POOL_TYPES or NORMAL_MODE_ITEM_POOL_TYPES
|
|
63
61
|
return getRandomArrayElement(nil, itemPoolTypes)
|
|
64
62
|
end
|
|
65
63
|
--- Helper function to remove one or more collectibles from all item pools.
|
|
@@ -18,11 +18,6 @@ export declare function canRunUnlockAchievements(): boolean;
|
|
|
18
18
|
* Helper function to get the seed effects (i.e. Easter Eggs) that are enabled for the current run.
|
|
19
19
|
*/
|
|
20
20
|
export declare function getSeedEffects(): SeedEffect[];
|
|
21
|
-
/**
|
|
22
|
-
* Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
23
|
-
* `Difficulty.GREEDIER`.
|
|
24
|
-
*/
|
|
25
|
-
export declare function isGreedMode(): boolean;
|
|
26
21
|
/**
|
|
27
22
|
* Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
|
|
28
23
|
* specific seed by pressing tab on the character selection screen). When the player resets the game
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/functions/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAEL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAUtC,qDAAqD;AACrD,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAUlD;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,UAAU,EAAE,CAO7C;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAMnC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAGtC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAkBpD;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,0BAA0B,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAQ1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAUlC"}
|
|
@@ -3,7 +3,6 @@ local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
5
|
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
6
|
-
local Difficulty = ____isaac_2Dtypescript_2Ddefinitions.Difficulty
|
|
7
6
|
local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
|
|
8
7
|
local SlotVariant = ____isaac_2Dtypescript_2Ddefinitions.SlotVariant
|
|
9
8
|
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
@@ -51,11 +50,6 @@ function ____exports.getSeedEffects(self)
|
|
|
51
50
|
function(____, seedEffect) return seedEffect ~= SeedEffect.NORMAL and seeds:HasSeedEffect(seedEffect) end
|
|
52
51
|
)
|
|
53
52
|
end
|
|
54
|
-
--- Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
55
|
-
-- `Difficulty.GREEDIER`.
|
|
56
|
-
function ____exports.isGreedMode(self)
|
|
57
|
-
return game.Difficulty == Difficulty.GREED or game.Difficulty == Difficulty.GREEDIER
|
|
58
|
-
end
|
|
59
53
|
--- Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
|
|
60
54
|
-- specific seed by pressing tab on the character selection screen). When the player resets the game
|
|
61
55
|
-- on a set seed, the game will not switch to a different seed.
|
|
@@ -18,7 +18,7 @@ export declare const ROOM_TYPE_NAMES: {
|
|
|
18
18
|
readonly 17: "Boss Rush";
|
|
19
19
|
readonly 18: "Clean Bedroom";
|
|
20
20
|
readonly 19: "Dirty Bedroom";
|
|
21
|
-
readonly 20: "
|
|
21
|
+
readonly 20: "Vault";
|
|
22
22
|
readonly 21: "Dice Room";
|
|
23
23
|
readonly 22: "Black Market";
|
|
24
24
|
readonly 23: "Greed Exit Room";
|
|
@@ -21,7 +21,7 @@ ____exports.ROOM_TYPE_NAMES = {
|
|
|
21
21
|
[RoomType.BOSS_RUSH] = "Boss Rush",
|
|
22
22
|
[RoomType.CLEAN_BEDROOM] = "Clean Bedroom",
|
|
23
23
|
[RoomType.DIRTY_BEDROOM] = "Dirty Bedroom",
|
|
24
|
-
[RoomType.CHEST] = "
|
|
24
|
+
[RoomType.CHEST] = "Vault",
|
|
25
25
|
[RoomType.DICE] = "Dice Room",
|
|
26
26
|
[RoomType.BLACK_MARKET] = "Black Market",
|
|
27
27
|
[RoomType.GREED_EXIT] = "Greed Exit Room",
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ModCallback } from "isaac-typescript-definitions";
|
|
2
2
|
import { game } from "../../core/cachedClasses";
|
|
3
3
|
import type { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
4
|
-
import { isGreedMode } from "../../functions/run";
|
|
5
4
|
import { CustomCallback } from "../private/CustomCallback";
|
|
6
5
|
|
|
7
6
|
const v = {
|
|
@@ -24,7 +23,7 @@ export class PostGreedModeWave extends CustomCallback<ModCallbackCustom.POST_GRE
|
|
|
24
23
|
|
|
25
24
|
// ModCallback.POST_UPDATE (1)
|
|
26
25
|
private readonly postUpdate = (): void => {
|
|
27
|
-
if (!
|
|
26
|
+
if (!game.IsGreedMode()) {
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
30
29
|
|
|
@@ -6,7 +6,6 @@ import { ItemPoolType } from "isaac-typescript-definitions";
|
|
|
6
6
|
import { ITEM_POOL_TYPE_VALUES } from "../arrays/cachedEnumValues";
|
|
7
7
|
import { game } from "../core/cachedClasses";
|
|
8
8
|
import { arrayRemove, getRandomArrayElement } from "./array";
|
|
9
|
-
import { isGreedMode } from "./run";
|
|
10
9
|
|
|
11
10
|
const NORMAL_MODE_ONLY_ITEM_POOL_TYPES = [
|
|
12
11
|
ItemPoolType.TREASURE, // 0
|
|
@@ -48,7 +47,7 @@ const GREED_MODE_ITEM_POOL_TYPES: readonly ItemPoolType[] = arrayRemove(
|
|
|
48
47
|
* Greed Mode item pools should be excluded if not playing in Greed Mode.
|
|
49
48
|
*/
|
|
50
49
|
export function getRandomItemPool(): ItemPoolType {
|
|
51
|
-
const itemPoolTypes =
|
|
50
|
+
const itemPoolTypes = game.IsGreedMode()
|
|
52
51
|
? GREED_MODE_ITEM_POOL_TYPES
|
|
53
52
|
: NORMAL_MODE_ITEM_POOL_TYPES;
|
|
54
53
|
return getRandomArrayElement(itemPoolTypes);
|
package/src/functions/run.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { PlayerType } from "isaac-typescript-definitions";
|
|
2
2
|
import {
|
|
3
3
|
Challenge,
|
|
4
|
-
Difficulty,
|
|
5
4
|
SeedEffect,
|
|
6
5
|
SlotVariant,
|
|
7
6
|
} from "isaac-typescript-definitions";
|
|
@@ -60,17 +59,6 @@ export function getSeedEffects(): SeedEffect[] {
|
|
|
60
59
|
);
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
/**
|
|
64
|
-
* Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
65
|
-
* `Difficulty.GREEDIER`.
|
|
66
|
-
*/
|
|
67
|
-
export function isGreedMode(): boolean {
|
|
68
|
-
return (
|
|
69
|
-
game.Difficulty === Difficulty.GREED ||
|
|
70
|
-
game.Difficulty === Difficulty.GREEDIER
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
62
|
/**
|
|
75
63
|
* Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
|
|
76
64
|
* specific seed by pressing tab on the character selection screen). When the player resets the game
|
|
@@ -20,7 +20,7 @@ export const ROOM_TYPE_NAMES = {
|
|
|
20
20
|
[RoomType.BOSS_RUSH]: "Boss Rush", // 17
|
|
21
21
|
[RoomType.CLEAN_BEDROOM]: "Clean Bedroom", // 18
|
|
22
22
|
[RoomType.DIRTY_BEDROOM]: "Dirty Bedroom", // 19
|
|
23
|
-
[RoomType.CHEST]: "
|
|
23
|
+
[RoomType.CHEST]: "Vault", // 20
|
|
24
24
|
[RoomType.DICE]: "Dice Room", // 21
|
|
25
25
|
[RoomType.BLACK_MARKET]: "Black Market", // 22
|
|
26
26
|
[RoomType.GREED_EXIT]: "Greed Exit Room", // 23
|