isaacscript-common 39.0.2 → 39.2.0
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 +7 -0
- package/dist/isaacscript-common.lua +6 -1
- package/dist/src/core/constantsFirstLast.d.ts +2 -0
- package/dist/src/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/src/core/constantsFirstLast.lua +3 -0
- package/dist/src/functions/pills.d.ts +3 -0
- package/dist/src/functions/pills.d.ts.map +1 -1
- package/dist/src/functions/pills.lua +5 -0
- package/package.json +1 -1
- package/src/core/constantsFirstLast.ts +8 -0
- package/src/functions/pills.ts +6 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -8661,6 +8661,9 @@ export declare function isGlitchedCollectible(collectible: EntityPickup): boolea
|
|
|
8661
8661
|
|
|
8662
8662
|
export declare function isGoldenTrinketType(trinketType: TrinketType): boolean;
|
|
8663
8663
|
|
|
8664
|
+
/** Helper function to see if the given pill color is either a gold pill or a horse gold pill. */
|
|
8665
|
+
export declare function isGoldPill(pillColor: PillColor): boolean;
|
|
8666
|
+
|
|
8664
8667
|
/**
|
|
8665
8668
|
* Helper function to check if the difficulty of the current run is equal to `Difficulty.GREED` or
|
|
8666
8669
|
* `Difficulty.GREEDIER`.
|
|
@@ -8713,6 +8716,7 @@ export declare function isHiddenSecretRoomDoor(door: GridEntityDoor): boolean;
|
|
|
8713
8716
|
*/
|
|
8714
8717
|
export declare function isHomeCloset(roomData: RoomConfig): boolean;
|
|
8715
8718
|
|
|
8719
|
+
/** Helper function to see if the given pill color is a horse pill. */
|
|
8716
8720
|
export declare function isHorsePill(pillColor: PillColor): boolean;
|
|
8717
8721
|
|
|
8718
8722
|
export declare function isInteger(variable: unknown): variable is int;
|
|
@@ -13803,6 +13807,9 @@ export declare const NUM_PILLS_IN_POOL: number;
|
|
|
13803
13807
|
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
13804
13808
|
export declare const NUM_VANILLA_CARD_TYPES: number;
|
|
13805
13809
|
|
|
13810
|
+
/** Calculated from the `Challenge` enum. `Challenge.NULL` is not included. */
|
|
13811
|
+
export declare const NUM_VANILLA_CHALLENGES: number;
|
|
13812
|
+
|
|
13806
13813
|
/** Calculated from the `CollectibleType` enum. (`CollectibleType.NULL` is not included.) */
|
|
13807
13814
|
export declare const NUM_VANILLA_COLLECTIBLE_TYPES: number;
|
|
13808
13815
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 39.0
|
|
3
|
+
isaacscript-common 39.2.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -17868,6 +17868,7 @@ return ____exports
|
|
|
17868
17868
|
local ____exports = {}
|
|
17869
17869
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
17870
17870
|
local CardType = ____isaac_2Dtypescript_2Ddefinitions.CardType
|
|
17871
|
+
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
17871
17872
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
17872
17873
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
17873
17874
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
@@ -17903,6 +17904,7 @@ ____exports.FIRST_ROOM_TYPE = RoomType.DEFAULT
|
|
|
17903
17904
|
____exports.LAST_ROOM_TYPE = getHighestEnumValue(nil, RoomType)
|
|
17904
17905
|
____exports.FIRST_STAGE = LevelStage.BASEMENT_1
|
|
17905
17906
|
____exports.LAST_STAGE = getHighestEnumValue(nil, LevelStage)
|
|
17907
|
+
____exports.NUM_VANILLA_CHALLENGES = getEnumLength(nil, Challenge) - 1
|
|
17906
17908
|
return ____exports
|
|
17907
17909
|
end,
|
|
17908
17910
|
["src.core.constants"] = function(...)
|
|
@@ -33140,6 +33142,9 @@ end
|
|
|
33140
33142
|
function ____exports.getVanillaPillEffects(self)
|
|
33141
33143
|
return iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
|
|
33142
33144
|
end
|
|
33145
|
+
function ____exports.isGoldPill(self, pillColor)
|
|
33146
|
+
return pillColor == PillColor.GOLD or pillColor == PillColor.HORSE_GOLD
|
|
33147
|
+
end
|
|
33143
33148
|
function ____exports.isHorsePill(self, pillColor)
|
|
33144
33149
|
return asNumber(nil, pillColor) > HORSE_PILL_ADJUSTMENT
|
|
33145
33150
|
end
|
|
@@ -58,4 +58,6 @@ export declare const FIRST_ROOM_TYPE = RoomType.DEFAULT;
|
|
|
58
58
|
export declare const LAST_ROOM_TYPE: RoomType;
|
|
59
59
|
export declare const FIRST_STAGE = LevelStage.BASEMENT_1;
|
|
60
60
|
export declare const LAST_STAGE: LevelStage;
|
|
61
|
+
/** Calculated from the `Challenge` enum. `Challenge.NULL` is not included. */
|
|
62
|
+
export declare const NUM_VANILLA_CHALLENGES: number;
|
|
61
63
|
//# sourceMappingURL=constantsFirstLast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constantsFirstLast.d.ts","sourceRoot":"","sources":["../../../src/core/constantsFirstLast.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"constantsFirstLast.d.ts","sourceRoot":"","sources":["../../../src/core/constantsFirstLast.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAER,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAQtC,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,iBACJ,CAAC;AAEvC,4FAA4F;AAC5F,eAAO,MAAM,6BAA6B,Q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____isaac_2Dtypescript_2Ddefinitions.CardType
|
|
4
|
+
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
4
5
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
5
6
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
6
7
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
@@ -64,4 +65,6 @@ ____exports.FIRST_ROOM_TYPE = RoomType.DEFAULT
|
|
|
64
65
|
____exports.LAST_ROOM_TYPE = getHighestEnumValue(nil, RoomType)
|
|
65
66
|
____exports.FIRST_STAGE = LevelStage.BASEMENT_1
|
|
66
67
|
____exports.LAST_STAGE = getHighestEnumValue(nil, LevelStage)
|
|
68
|
+
--- Calculated from the `Challenge` enum. `Challenge.NULL` is not included.
|
|
69
|
+
____exports.NUM_VANILLA_CHALLENGES = getEnumLength(nil, Challenge) - 1
|
|
67
70
|
return ____exports
|
|
@@ -77,6 +77,9 @@ export declare function getPillEffectName(pillEffect: PillEffect): string;
|
|
|
77
77
|
export declare function getPillEffectType(pillEffect: PillEffect): ItemConfigPillEffectType;
|
|
78
78
|
/** Helper function to get an array with every vanilla pill effect. */
|
|
79
79
|
export declare function getVanillaPillEffects(): PillEffect[];
|
|
80
|
+
/** Helper function to see if the given pill color is either a gold pill or a horse gold pill. */
|
|
81
|
+
export declare function isGoldPill(pillColor: PillColor): boolean;
|
|
82
|
+
/** Helper function to see if the given pill color is a horse pill. */
|
|
80
83
|
export declare function isHorsePill(pillColor: PillColor): boolean;
|
|
81
84
|
export declare function isModdedPillEffect(pillEffect: PillEffect): boolean;
|
|
82
85
|
export declare function isVanillaPillEffect(pillEffect: PillEffect): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pills.d.ts","sourceRoot":"","sources":["../../../src/functions/pills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACxB,U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,CAEzD;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAElE;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAEnE"}
|
|
@@ -149,6 +149,11 @@ end
|
|
|
149
149
|
function ____exports.getVanillaPillEffects(self)
|
|
150
150
|
return iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
|
|
151
151
|
end
|
|
152
|
+
--- Helper function to see if the given pill color is either a gold pill or a horse gold pill.
|
|
153
|
+
function ____exports.isGoldPill(self, pillColor)
|
|
154
|
+
return pillColor == PillColor.GOLD or pillColor == PillColor.HORSE_GOLD
|
|
155
|
+
end
|
|
156
|
+
--- Helper function to see if the given pill color is a horse pill.
|
|
152
157
|
function ____exports.isHorsePill(self, pillColor)
|
|
153
158
|
return asNumber(nil, pillColor) > HORSE_PILL_ADJUSTMENT
|
|
154
159
|
end
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
CardType,
|
|
5
|
+
Challenge,
|
|
5
6
|
CollectibleType,
|
|
6
7
|
LevelStage,
|
|
7
8
|
PillColor,
|
|
@@ -130,3 +131,10 @@ export const LAST_ROOM_TYPE = getHighestEnumValue(RoomType);
|
|
|
130
131
|
|
|
131
132
|
export const FIRST_STAGE = LevelStage.BASEMENT_1;
|
|
132
133
|
export const LAST_STAGE = getHighestEnumValue(LevelStage);
|
|
134
|
+
|
|
135
|
+
// ----------
|
|
136
|
+
// Challenges
|
|
137
|
+
// ----------
|
|
138
|
+
|
|
139
|
+
/** Calculated from the `Challenge` enum. `Challenge.NULL` is not included. */
|
|
140
|
+
export const NUM_VANILLA_CHALLENGES = getEnumLength(Challenge) - 1;
|
package/src/functions/pills.ts
CHANGED
|
@@ -198,6 +198,12 @@ export function getVanillaPillEffects(): PillEffect[] {
|
|
|
198
198
|
return iRange(FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
/** Helper function to see if the given pill color is either a gold pill or a horse gold pill. */
|
|
202
|
+
export function isGoldPill(pillColor: PillColor): boolean {
|
|
203
|
+
return pillColor === PillColor.GOLD || pillColor === PillColor.HORSE_GOLD;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** Helper function to see if the given pill color is a horse pill. */
|
|
201
207
|
export function isHorsePill(pillColor: PillColor): boolean {
|
|
202
208
|
return asNumber(pillColor) > HORSE_PILL_ADJUSTMENT;
|
|
203
209
|
}
|