isaacscript-common 72.2.0 → 72.3.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
CHANGED
|
@@ -9087,6 +9087,12 @@ export declare function isCoin(pickup: EntityPickup): pickup is EntityPickupCoin
|
|
|
9087
9087
|
/** For `PickupVariant.COLLECTIBLE` (100). */
|
|
9088
9088
|
export declare function isCollectible(pickup: EntityPickup): pickup is EntityPickupCollectible;
|
|
9089
9089
|
|
|
9090
|
+
/**
|
|
9091
|
+
* Helper function to check if a particular collectibles is in a particular item pool at the
|
|
9092
|
+
* beginning of a vanilla run.
|
|
9093
|
+
*/
|
|
9094
|
+
export declare function isCollectibleTypeInDefaultItemPool(collectibleType: CollectibleType, itemPoolType: ItemPoolType): boolean;
|
|
9095
|
+
|
|
9090
9096
|
/** Helper function to check if something is an instantiated `Color` object. */
|
|
9091
9097
|
export declare function isColor(object: unknown): object is Color;
|
|
9092
9098
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 72.
|
|
3
|
+
isaacscript-common 72.3.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -57664,6 +57664,10 @@ function ____exports.getRandomItemPool(self, seedOrRNG)
|
|
|
57664
57664
|
local itemPoolTypes = game:IsGreedMode() and GREED_MODE_ITEM_POOL_TYPES or NORMAL_MODE_ITEM_POOL_TYPES
|
|
57665
57665
|
return getRandomArrayElement(nil, itemPoolTypes, seedOrRNG)
|
|
57666
57666
|
end
|
|
57667
|
+
function ____exports.isCollectibleTypeInDefaultItemPool(self, collectibleType, itemPoolType)
|
|
57668
|
+
local collectibleTypesSet = ITEM_POOL_TYPE_TO_COLLECTIBLE_TYPES_SET[itemPoolType]
|
|
57669
|
+
return collectibleTypesSet:has(collectibleType)
|
|
57670
|
+
end
|
|
57667
57671
|
function ____exports.removeCollectibleFromPools(self, ...)
|
|
57668
57672
|
local collectibleTypes = {...}
|
|
57669
57673
|
local itemPool = game:GetItemPool()
|
|
@@ -26,6 +26,11 @@ export declare function getDefaultItemPoolsForCollectibleType(collectibleType: C
|
|
|
26
26
|
* a random seed.
|
|
27
27
|
*/
|
|
28
28
|
export declare function getRandomItemPool(seedOrRNG: Seed | RNG | undefined): ItemPoolType;
|
|
29
|
+
/**
|
|
30
|
+
* Helper function to check if a particular collectibles is in a particular item pool at the
|
|
31
|
+
* beginning of a vanilla run.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isCollectibleTypeInDefaultItemPool(collectibleType: CollectibleType, itemPoolType: ItemPoolType): boolean;
|
|
29
34
|
/**
|
|
30
35
|
* Helper function to remove one or more collectibles from all item pools.
|
|
31
36
|
*
|
|
@@ -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;AAwC5D;;;GAGG;AACH,wBAAgB,oCAAoC,CAClD,YAAY,EAAE,YAAY,GACzB,GAAG,CAAC,eAAe,CAAC,CAEtB;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CACnD,eAAe,EAAE,eAAe,GAC/B,YAAY,EAAE,CAYhB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,SAAS,GAChC,YAAY,CAKd;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"}
|
|
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;AAwC5D;;;GAGG;AACH,wBAAgB,oCAAoC,CAClD,YAAY,EAAE,YAAY,GACzB,GAAG,CAAC,eAAe,CAAC,CAEtB;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CACnD,eAAe,EAAE,eAAe,GAC/B,YAAY,EAAE,CAYhB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,SAAS,GAChC,YAAY,CAKd;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,GACzB,OAAO,CAIT;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"}
|
|
@@ -90,6 +90,12 @@ function ____exports.getRandomItemPool(self, seedOrRNG)
|
|
|
90
90
|
local itemPoolTypes = game:IsGreedMode() and GREED_MODE_ITEM_POOL_TYPES or NORMAL_MODE_ITEM_POOL_TYPES
|
|
91
91
|
return getRandomArrayElement(nil, itemPoolTypes, seedOrRNG)
|
|
92
92
|
end
|
|
93
|
+
--- Helper function to check if a particular collectibles is in a particular item pool at the
|
|
94
|
+
-- beginning of a vanilla run.
|
|
95
|
+
function ____exports.isCollectibleTypeInDefaultItemPool(self, collectibleType, itemPoolType)
|
|
96
|
+
local collectibleTypesSet = ITEM_POOL_TYPE_TO_COLLECTIBLE_TYPES_SET[itemPoolType]
|
|
97
|
+
return collectibleTypesSet:has(collectibleType)
|
|
98
|
+
end
|
|
93
99
|
--- Helper function to remove one or more collectibles from all item pools.
|
|
94
100
|
--
|
|
95
101
|
-- This function is variadic, meaning you can pass as many collectible types as you want to remove.
|
package/package.json
CHANGED
|
@@ -96,6 +96,19 @@ export function getRandomItemPool(
|
|
|
96
96
|
return getRandomArrayElement(itemPoolTypes, seedOrRNG);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Helper function to check if a particular collectibles is in a particular item pool at the
|
|
101
|
+
* beginning of a vanilla run.
|
|
102
|
+
*/
|
|
103
|
+
export function isCollectibleTypeInDefaultItemPool(
|
|
104
|
+
collectibleType: CollectibleType,
|
|
105
|
+
itemPoolType: ItemPoolType,
|
|
106
|
+
): boolean {
|
|
107
|
+
const collectibleTypesSet =
|
|
108
|
+
ITEM_POOL_TYPE_TO_COLLECTIBLE_TYPES_SET[itemPoolType];
|
|
109
|
+
return collectibleTypesSet.has(collectibleType);
|
|
110
|
+
}
|
|
111
|
+
|
|
99
112
|
/**
|
|
100
113
|
* Helper function to remove one or more collectibles from all item pools.
|
|
101
114
|
*
|