isaacscript-common 29.3.0 → 29.4.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 -3
- package/dist/isaacscript-common.lua +1 -1
- package/dist/src/functions/collectibles.d.ts +6 -2
- package/dist/src/functions/collectibles.d.ts.map +1 -1
- package/dist/src/functions/collectibles.lua +4 -0
- package/dist/src/functions/doors.d.ts +1 -1
- package/dist/src/functions/doors.lua +1 -1
- package/package.json +1 -1
- package/src/functions/collectibles.ts +9 -3
package/dist/index.rollup.d.ts
CHANGED
|
@@ -4669,11 +4669,13 @@ export declare function getCollectibleDevilHeartPrice(collectibleOrCollectibleTy
|
|
|
4669
4669
|
* Helper function to get the path to a collectible PNG file. Returns the path to the question mark
|
|
4670
4670
|
* sprite (i.e. from Curse of the Blind) if the provided collectible type was not valid.
|
|
4671
4671
|
*
|
|
4672
|
+
* If you intentionally want the path to the question mark sprite, pass -1 as the collectible type.
|
|
4673
|
+
*
|
|
4672
4674
|
* Note that this does not return the file name, but the full path to the collectible's PNG file.
|
|
4673
4675
|
* The function is named "GfxFilename" to correspond to the associated `ItemConfigItem.GfxFileName`
|
|
4674
4676
|
* field.
|
|
4675
4677
|
*/
|
|
4676
|
-
export declare function getCollectibleGfxFilename(collectibleOrCollectibleType: EntityPickup | CollectibleType): string;
|
|
4678
|
+
export declare function getCollectibleGfxFilename(collectibleOrCollectibleType: EntityPickup | CollectibleType | -1): string;
|
|
4677
4679
|
|
|
4678
4680
|
/**
|
|
4679
4681
|
* Mods may have to keep track of data relating to a collectible. Finding an index for these kinds
|
|
@@ -7159,7 +7161,7 @@ export declare function hasCurse(curse: LevelCurse): boolean;
|
|
|
7159
7161
|
|
|
7160
7162
|
/**
|
|
7161
7163
|
* Helper function to check if the current room has one or more doors that lead to the given room
|
|
7162
|
-
*
|
|
7164
|
+
* type.
|
|
7163
7165
|
*
|
|
7164
7166
|
* This function is variadic, meaning that you can supply as many door types as you want to check
|
|
7165
7167
|
* for. This function will return true if one or more room types match.
|
|
@@ -12766,8 +12768,10 @@ export declare function newChargeBarSprites(maxCharges: int): ChargeBarSprites;
|
|
|
12766
12768
|
/**
|
|
12767
12769
|
* Helper function to generate a new sprite based on a collectible. If the provided collectible type
|
|
12768
12770
|
* is invalid, a sprite with a Curse of the Blind question mark will be returned.
|
|
12771
|
+
*
|
|
12772
|
+
* If you intentionally want a question mark sprite, pass -1 as the collectible type.
|
|
12769
12773
|
*/
|
|
12770
|
-
export declare function newCollectibleSprite(collectibleType: CollectibleType): Sprite;
|
|
12774
|
+
export declare function newCollectibleSprite(collectibleType: CollectibleType | -1): Sprite;
|
|
12771
12775
|
|
|
12772
12776
|
export declare function newPickingUpItem(): PickingUpItem;
|
|
12773
12777
|
|
|
@@ -31,11 +31,13 @@ export declare function getCollectibleDevilHeartPrice(collectibleOrCollectibleTy
|
|
|
31
31
|
* Helper function to get the path to a collectible PNG file. Returns the path to the question mark
|
|
32
32
|
* sprite (i.e. from Curse of the Blind) if the provided collectible type was not valid.
|
|
33
33
|
*
|
|
34
|
+
* If you intentionally want the path to the question mark sprite, pass -1 as the collectible type.
|
|
35
|
+
*
|
|
34
36
|
* Note that this does not return the file name, but the full path to the collectible's PNG file.
|
|
35
37
|
* The function is named "GfxFilename" to correspond to the associated `ItemConfigItem.GfxFileName`
|
|
36
38
|
* field.
|
|
37
39
|
*/
|
|
38
|
-
export declare function getCollectibleGfxFilename(collectibleOrCollectibleType: EntityPickup | CollectibleType): string;
|
|
40
|
+
export declare function getCollectibleGfxFilename(collectibleOrCollectibleType: EntityPickup | CollectibleType | -1): string;
|
|
39
41
|
/**
|
|
40
42
|
* Mods may have to keep track of data relating to a collectible. Finding an index for these kinds
|
|
41
43
|
* of data structures is difficult, since collectibles are respawned every time a player re-enters a
|
|
@@ -183,8 +185,10 @@ export declare function isVanillaCollectibleType(collectibleType: CollectibleTyp
|
|
|
183
185
|
/**
|
|
184
186
|
* Helper function to generate a new sprite based on a collectible. If the provided collectible type
|
|
185
187
|
* is invalid, a sprite with a Curse of the Blind question mark will be returned.
|
|
188
|
+
*
|
|
189
|
+
* If you intentionally want a question mark sprite, pass -1 as the collectible type.
|
|
186
190
|
*/
|
|
187
|
-
export declare function newCollectibleSprite(collectibleType: CollectibleType): Sprite;
|
|
191
|
+
export declare function newCollectibleSprite(collectibleType: CollectibleType | -1): Sprite;
|
|
188
192
|
/**
|
|
189
193
|
* Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
|
|
190
194
|
* should remove an item.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EAEvB,eAAe,EAEf,oBAAoB,EACpB,aAAa,EAEb,QAAQ,EACR,WAAW,EAIZ,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AA4B7D,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,oBAAoB,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAoBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAgBL;AAED;;;GAGG;AACH,wBAAg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ClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
|
|
@@ -223,6 +223,8 @@ end
|
|
|
223
223
|
--- Helper function to get the path to a collectible PNG file. Returns the path to the question mark
|
|
224
224
|
-- sprite (i.e. from Curse of the Blind) if the provided collectible type was not valid.
|
|
225
225
|
--
|
|
226
|
+
-- If you intentionally want the path to the question mark sprite, pass -1 as the collectible type.
|
|
227
|
+
--
|
|
226
228
|
-- Note that this does not return the file name, but the full path to the collectible's PNG file.
|
|
227
229
|
-- The function is named "GfxFilename" to correspond to the associated `ItemConfigItem.GfxFileName`
|
|
228
230
|
-- field.
|
|
@@ -457,6 +459,8 @@ function ____exports.isValidCollectibleType(self, collectibleType)
|
|
|
457
459
|
end
|
|
458
460
|
--- Helper function to generate a new sprite based on a collectible. If the provided collectible type
|
|
459
461
|
-- is invalid, a sprite with a Curse of the Blind question mark will be returned.
|
|
462
|
+
--
|
|
463
|
+
-- If you intentionally want a question mark sprite, pass -1 as the collectible type.
|
|
460
464
|
function ____exports.newCollectibleSprite(self, collectibleType)
|
|
461
465
|
local sprite = Sprite()
|
|
462
466
|
sprite:Load(COLLECTIBLE_ANM2_PATH, false)
|
|
@@ -95,7 +95,7 @@ export declare function getRoomShapeDoorSlotCoordinates(roomShape: RoomShape, do
|
|
|
95
95
|
export declare function getUnusedDoorSlots(): DoorSlot[];
|
|
96
96
|
/**
|
|
97
97
|
* Helper function to check if the current room has one or more doors that lead to the given room
|
|
98
|
-
*
|
|
98
|
+
* type.
|
|
99
99
|
*
|
|
100
100
|
* This function is variadic, meaning that you can supply as many door types as you want to check
|
|
101
101
|
* for. This function will return true if one or more room types match.
|
|
@@ -290,7 +290,7 @@ function ____exports.getUnusedDoorSlots(self)
|
|
|
290
290
|
)
|
|
291
291
|
end
|
|
292
292
|
--- Helper function to check if the current room has one or more doors that lead to the given room
|
|
293
|
-
--
|
|
293
|
+
-- type.
|
|
294
294
|
--
|
|
295
295
|
-- This function is variadic, meaning that you can supply as many door types as you want to check
|
|
296
296
|
-- for. This function will return true if one or more room types match.
|
package/package.json
CHANGED
|
@@ -229,12 +229,14 @@ export function getCollectibleDevilHeartPrice(
|
|
|
229
229
|
* Helper function to get the path to a collectible PNG file. Returns the path to the question mark
|
|
230
230
|
* sprite (i.e. from Curse of the Blind) if the provided collectible type was not valid.
|
|
231
231
|
*
|
|
232
|
+
* If you intentionally want the path to the question mark sprite, pass -1 as the collectible type.
|
|
233
|
+
*
|
|
232
234
|
* Note that this does not return the file name, but the full path to the collectible's PNG file.
|
|
233
235
|
* The function is named "GfxFilename" to correspond to the associated `ItemConfigItem.GfxFileName`
|
|
234
236
|
* field.
|
|
235
237
|
*/
|
|
236
238
|
export function getCollectibleGfxFilename(
|
|
237
|
-
collectibleOrCollectibleType: EntityPickup | CollectibleType,
|
|
239
|
+
collectibleOrCollectibleType: EntityPickup | CollectibleType | -1,
|
|
238
240
|
): string {
|
|
239
241
|
const collectibleType = getCollectibleTypeFromArg(
|
|
240
242
|
collectibleOrCollectibleType,
|
|
@@ -613,8 +615,12 @@ export function isVanillaCollectibleType(
|
|
|
613
615
|
/**
|
|
614
616
|
* Helper function to generate a new sprite based on a collectible. If the provided collectible type
|
|
615
617
|
* is invalid, a sprite with a Curse of the Blind question mark will be returned.
|
|
618
|
+
*
|
|
619
|
+
* If you intentionally want a question mark sprite, pass -1 as the collectible type.
|
|
616
620
|
*/
|
|
617
|
-
export function newCollectibleSprite(
|
|
621
|
+
export function newCollectibleSprite(
|
|
622
|
+
collectibleType: CollectibleType | -1,
|
|
623
|
+
): Sprite {
|
|
618
624
|
const sprite = Sprite();
|
|
619
625
|
sprite.Load(COLLECTIBLE_ANM2_PATH, false);
|
|
620
626
|
|
|
@@ -842,7 +848,7 @@ export function setCollectiblesRerolledForItemTracker(): void {
|
|
|
842
848
|
}
|
|
843
849
|
|
|
844
850
|
function getCollectibleTypeFromArg(
|
|
845
|
-
collectibleOrCollectibleType: EntityPickup | CollectibleType,
|
|
851
|
+
collectibleOrCollectibleType: EntityPickup | CollectibleType | -1,
|
|
846
852
|
functionName: string,
|
|
847
853
|
): CollectibleType {
|
|
848
854
|
if (isNumber(collectibleOrCollectibleType)) {
|