import type { CacheFlag, CollectiblePedestalType, ItemConfigTag } from "isaac-typescript-definitions"; import { CollectibleType, ItemConfigChargeType, ItemType, PickupPrice } from "isaac-typescript-definitions"; export declare function clearCollectibleSprite(collectible: EntityPickup): void; /** Helper function to check in the item config if a given collectible has a given cache flag. */ export declare function collectibleHasCacheFlag(collectibleOrCollectibleType: EntityPickup | CollectibleType, cacheFlag: CacheFlag): boolean; /** Helper function to check if two collectible sprites have the same sprite sheet loaded. */ export declare function collectibleSpriteEquals(sprite1: Sprite, sprite2: Sprite): boolean; /** * Helper function to get the charge type that a collectible has. Returns * `ItemConfigChargeType.NORMAL` if the provided collectible type was not valid. */ export declare function getCollectibleChargeType(collectibleOrCollectibleType: EntityPickup | CollectibleType): ItemConfigChargeType; /** * Helper function to get the in-game description for a collectible. Returns "Unknown" if the * provided collectible type was not valid. * * This function works for both vanilla and modded collectibles. */ export declare function getCollectibleDescription(collectibleOrCollectibleType: EntityPickup | CollectibleType): string; /** * Helper function to get the coin cost that a collectible item would be if it were being offered in * a Devil Room deal. Returns 0 if passed `CollectibleType.NULL`. */ export declare function getCollectibleDevilCoinPrice(collectibleOrCollectibleType: EntityPickup | CollectibleType): int; /** * Helper function to get the heart cost that a collectible item would be if it were being offered * in a Devil Room deal. Returns 0 if passed `CollectibleType.NULL`. */ export declare function getCollectibleDevilHeartPrice(collectibleOrCollectibleType: EntityPickup | CollectibleType, player: EntityPlayer): PickupPrice; /** * Helper function to get the path to a collectible PNG file. Returns the path to the question mark * sprite (i.e. from Curse of the Blind) if the provided collectible type was not valid. * * If you intentionally want the path to the question mark sprite, pass -1 as the collectible type. * * Note that this does not return the file name, but the full path to the collectible's PNG file. * The function is named "GfxFilename" to correspond to the associated `ItemConfigItem.GfxFileName` * field. */ export declare function getCollectibleGfxFilename(collectibleOrCollectibleType: EntityPickup | CollectibleType | -1): string; /** * Helper function to get the initial amount of charges that a collectible has. In most cases, when * picking up an active collectible for the first time, it will be fully charged, which corresponds * to an `InitCharge` value of -1. However, in some cases, this may be different. For example, * Eden's Soul starts without any charges, so it has an `InitCharge` value of 0. * * This function returns 0 if the provided collectible type was not valid. This function returns -1 * if the provided collectible type was not an active collectible. */ export declare function getCollectibleInitCharge(collectibleOrCollectibleType: EntityPickup | CollectibleType): int; /** * Helper function to get the `ItemType` of a collectible. Returns `ItemType.ITEM_NULL` if the * provided collectible type was not valid. */ export declare function getCollectibleItemType(collectibleOrCollectibleType: EntityPickup | CollectibleType): ItemType; /** * Helper function to get the maximum amount of charges that a collectible has. Returns 0 if the * provided collectible type was not valid. */ export declare function getCollectibleMaxCharges(collectibleOrCollectibleType: EntityPickup | CollectibleType): int; /** * Helper function to get the name of a collectible. Returns "Unknown" if the provided collectible * type is not valid. * * This function works for both vanilla and modded collectibles. * * For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion". */ export declare function getCollectibleName(collectibleOrCollectibleType: EntityPickup | CollectibleType): string; /** * Helper function to get the "pedestal type" of a collectible. For example, it might be sitting on * top of a broken Blood Donation Machine, or it might be sitting on top of an opened Spiked Chest. */ export declare function getCollectiblePedestalType(collectible: EntityPickup): CollectiblePedestalType; /** * Helper function to get a collectible's quality, which ranges from 0 to 4 (inclusive). For * example, Mom's Knife has a quality of 4. Returns 0 if the provided collectible type was not * valid. */ export declare function getCollectibleQuality(collectibleOrCollectibleType: EntityPickup | CollectibleType): Quality; /** * Helper function to get the tags of a collectible (which is the composition of zero or more * `ItemConfigTag`). Returns 0 if the provided collectible type is not valid. * * For example: * * ```ts * const collectibleType = CollectibleType.SAD_ONION; * const itemConfigTags = getCollectibleTags(collectibleType); // itemConfigTags is "18350080" * ``` */ export declare function getCollectibleTags(collectibleOrCollectibleType: EntityPickup | CollectibleType): BitFlags; /** * Returns an array containing every vanilla collectible type with the given quality. * * Note that this function will only return vanilla collectible types. To handle modded collectible * types, use the `getCollectibleTypesOfQuality` helper function instead. */ export declare function getVanillaCollectibleTypesOfQuality(quality: Quality): readonly CollectibleType[]; /** Returns true if the item type in the item config is equal to `ItemType.ACTIVE`. */ export declare function isActiveCollectible(collectibleType: CollectibleType): boolean; /** * Returns true if the collectible has a red question mark sprite. * * Note that this function will not work properly in a render callback with the `RenderMode` set to * `RenderMode.WATER_REFLECT`. If this is detected, this function will throw a run-time error. */ export declare function isBlindCollectible(collectible: EntityPickup): boolean; /** Returns true if the item type in the item config is equal to `ItemType.FAMILIAR`. */ export declare function isFamiliarCollectible(collectibleType: CollectibleType): boolean; /** * Returns whether the given collectible is a "glitched" item. All items are replaced by glitched * items once a player has TMTRAINER. However, glitched items can also "naturally" appear in secret * rooms and I AM ERROR rooms if the "Corrupted Data" achievement is unlocked. * * Under the hood, this checks if the sub-type of the collectible is greater than 4,000,000,000. */ export declare function isGlitchedCollectible(collectible: EntityPickup): boolean; /** * Returns true if the collectible has the "Hidden" attribute in the item config. * * Hidden collectibles will not show up in any pools and Eden will not start with them. */ export declare function isHiddenCollectible(collectibleOrCollectibleType: EntityPickup | CollectibleType): boolean; export declare function isModdedCollectibleType(collectibleType: CollectibleType): boolean; /** * Returns true if the item type in the item config is equal to `ItemType.ITEM_PASSIVE` or * `ItemType.ITEM_FAMILIAR`. */ export declare function isPassiveOrFamiliarCollectible(collectibleOrCollectibleType: EntityPickup | CollectibleType): boolean; /** Helper function to check if a collectible type is a particular quality. */ export declare function isQuality(collectibleOrCollectibleType: EntityPickup | CollectibleType, quality: int): boolean; /** * Helper function to determine if a particular collectible will disappear from the player's * inventory upon use. Note that this will not work will modded collectibles, as there is no way to * dynamically know if a modded collectible will disappear. */ export declare function isSingleUseCollectible(collectibleType: CollectibleType): boolean; export declare function isValidCollectibleType(collectibleType: int): collectibleType is CollectibleType; export declare function isVanillaCollectibleType(collectibleType: CollectibleType): boolean; /** * Helper function to generate a new sprite based on a collectible. If the provided collectible type * is invalid, a sprite with a Curse of the Blind question mark will be returned. * * If you intentionally want a question mark sprite, pass -1 as the collectible type. */ export declare function newCollectibleSprite(collectibleType: CollectibleType | -1): Sprite; /** * Helper function to remove the rotation behavior from a collectible. This will happen by default * when collectibles are spawned when playing as Tainted Isaac or when having Binge Eater. * * Under the hood, this is accomplished by morphing the collectible with the `ignoreModifiers` * argument set to true. */ export declare function preventCollectibleRotation(collectible: EntityPickup): void; /** * Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20 * frame delay before they can be picked up by a player. */ export declare function removeCollectiblePickupDelay(collectible: EntityPickup): void; /** * Helper function to set a collectible sprite to a question mark (i.e. how collectibles look when * the player has Curse of the Blind). */ export declare function setCollectibleBlind(collectible: EntityPickup): void; /** * Helper function to remove the collectible from a collectible pedestal and make it appear as if a * player has already taken the item. This is accomplished by changing the sub-type to * `CollectibleType.NULL` and then setting the sprite to an empty/missing PNG file. * * For more information, see the documentation for the "clearSprite" helper function. */ export declare function setCollectibleEmpty(collectible: EntityPickup): void; /** * Helper function to change a collectible into a "glitched" item (like the ones that appear when * the player has TMTRAINER). */ export declare function setCollectibleGlitched(collectible: EntityPickup): void; /** * Helper function to set the "pedestal type" of a collectible. For example, it might be sitting on * top of a broken Blood Donation Machine and you want to change it to be sitting on top of an * opened Spiked Chest. */ export declare function setCollectiblePedestalType(collectible: EntityPickup, collectiblePedestalType: CollectiblePedestalType): void; /** * Helper function to change the sprite of a collectible pedestal entity. * * For more information about removing the collectible sprite, see the documentation for the * "clearSprite" helper function. * * @param collectible The collectible whose sprite you want to modify. * @param pngPath Equal to either the spritesheet path to load (e.g. * "gfx/items/collectibles/collectibles_001_thesadonion.png") or undefined. If * undefined, the sprite will be removed, making it appear like the collectible has * already been taken by the player. */ export declare function setCollectibleSprite(collectible: EntityPickup, pngPath: string | undefined): void; /** * Helper function to change the collectible on a pedestal. Simply updating the `SubType` field is * not sufficient because the sprite will not change. */ export declare function setCollectibleSubType(collectible: EntityPickup, newCollectibleType: CollectibleType): void; /** * Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that * the build has been rerolled. */ export declare function setCollectiblesRerolledForItemTracker(): void; //# sourceMappingURL=collectibles.d.ts.map