UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

245 lines • 14.7 kB
import type { BatterySubType, BombSubType, CardType, CoinSubType, CollectibleType, HeartSubType, KeySubType, PillColor, SackSubType, TrinketType } from "isaac-typescript-definitions"; /** * Helper function to get all of the battery entities in the room. * * @param batterySubType Optional. If specified, will only get the batteries that match the * sub-type. Default is -1, which matches every sub-type. */ export declare function getBatteries(batterySubType?: BatterySubType | -1): readonly EntityPickupBattery[]; /** * Helper function to get all of the bomb entities in the room. (Specifically, this refers to bomb * pickups, not the `EntityBomb` class.) * * @param bombSubType Optional. If specified, will only get the bombs that match the sub-type. * Default is -1, which matches every sub-type. */ export declare function getBombPickups(bombSubType?: BombSubType | -1): readonly EntityPickupBomb[]; /** * Helper function to get all of the card entities in the room. * * @param cardType Optional. If specified, will only get the cards that match the sub-type. Default * is -1, which matches every sub-type. */ export declare function getCards(cardType?: CardType | -1): readonly EntityPickupCard[]; /** * Helper function to get all of the chest entities in the room. Specifically, this is all of the * pickups with a variant in the `CHEST_PICKUP_VARIANTS` constant. * * @param subType Optional. If specified, will only get the chests that match the sub-type. Default * is -1, which matches every sub-type. */ export declare function getChests(subType?: number): readonly EntityPickup[]; /** * Helper function to get all of the coin pickup entities in the room. * * @param coinSubType Optional. If specified, will only get the coins that match the sub-type. * Default is -1, which matches every sub-type. */ export declare function getCoins(coinSubType?: CoinSubType | -1): readonly EntityPickupCoin[]; /** * Helper function to get all of the collectible entities in the room. * * @param collectibleType Optional. If specified, will only get the collectibles that match the * sub-type. Default is -1, which matches every sub-type. */ export declare function getCollectibles(collectibleType?: CollectibleType | -1): readonly EntityPickupCollectible[]; /** * Helper function to get all of the heart pickup entities in the room. * * @param heartSubType Optional. If specified, will only get the hearts that match the sub-type. * Default is -1, which matches every sub-type. */ export declare function getHearts(heartSubType?: HeartSubType | -1): readonly EntityPickupHeart[]; /** * Helper function to get all of the key pickup entities in the room. * * @param keySubType Optional. If specified, will only get the keys that match the sub-type. Default * is -1, which matches every sub-type. */ export declare function getKeys(keySubType?: KeySubType | -1): readonly EntityPickupKey[]; /** * Helper function to get all of the pill entities in the room. * * @param pillColor Optional. If specified, will only get the pills that match the sub-type. Default * is -1, which matches every sub-type. */ export declare function getPills(pillColor?: PillColor | -1): readonly EntityPickupPill[]; /** * Helper function to get all of the sack (i.e. grab bag) entities in the room. * * @param sackSubType Optional. If specified, will only get the sacks that match the sub-type. * Default is -1, which matches every sub-type. */ export declare function getSacks(sackSubType?: SackSubType | -1): readonly EntityPickupSack[]; /** * Helper function to get all of the trinket entities in the room. * * @param trinketType Optional. If specified, will only get the trinkets that match the sub-type. * Default is -1, which matches every sub-type. */ export declare function getTrinkets(trinketType?: TrinketType | -1): readonly EntityPickupTrinket[]; /** * Helper function to remove all of the batteries in the room. * * @param batterySubType Optional. If specified, will only remove the batteries that match this * sub-type. Default is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of cards. * @returns The batteries that were removed. */ export declare function removeAllBatteries(batterySubType?: BatterySubType | -1, cap?: int): readonly EntityPickupBattery[]; /** * Helper function to remove all of the bomb pickups in the room. (Specifically, this refers to bomb * pickups, not the `EntityBomb` class.) * * @param bombSubType Optional. If specified, will only remove bombs that match this sub-type. * Default is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of bombs. * @returns The bombs that were removed. */ export declare function removeAllBombPickups(bombSubType?: BombSubType | -1, cap?: int): readonly EntityPickupBomb[]; /** * Helper function to remove all of the cards in the room. * * @param cardType Optional. If specified, will only remove cards that match this sub-type. Default * is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of cards. * @returns The cards that were removed. */ export declare function removeAllCards(cardType?: CardType | -1, cap?: int): readonly EntityPickupCard[]; /** * Helper function to remove all of the chests in the room. Specifically, this is all of the pickups * with a variant in the `CHEST_PICKUP_VARIANTS` constant. * * @param subType Optional. If specified, will only remove chests that match this sub-type. Default * is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of chests. * @returns The chests that were removed. */ export declare function removeAllChests(subType?: number, cap?: int): readonly EntityPickup[]; /** * Helper function to remove all of the coins in the room. * * @param coinSubType Optional. If specified, will only remove coins that match this sub-type. * Default is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of coins. * @returns The coins that were removed. */ export declare function removeAllCoins(coinSubType?: CoinSubType, cap?: int): readonly EntityPickupCoin[]; /** * Helper function to remove all of the collectibles in the room. * * @param collectibleType Optional. If specified, will only remove collectibles that match this * sub-type. Default is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of collectibles. * @returns The collectibles that were removed. */ export declare function removeAllCollectibles(collectibleType?: CollectibleType, cap?: int): readonly EntityPickupCollectible[]; /** * Helper function to remove all of the heart pickup entities in the room. * * @param heartSubType Optional. If specified, will only remove hearts that match this sub-type. * Default is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of hearts. * @returns The hearts that were removed. */ export declare function removeAllHearts(heartSubType?: HeartSubType, cap?: int): readonly EntityPickupHeart[]; /** * Helper function to remove all of the keys in the room. * * @param keySubType Optional. If specified, will only remove keys that match this sub-type. Default * is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of keys. * @returns The keys that were removed. */ export declare function removeAllKeys(keySubType?: KeySubType, cap?: int): readonly EntityPickupKey[]; /** * Helper function to remove all of the pills in the room. * * @param pillColor Optional. If specified, will only remove pills that match this sub-type. Default * is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of pills. * @returns The pills that were removed. */ export declare function removeAllPills(pillColor?: PillColor, cap?: int): readonly EntityPickupPill[]; /** * Helper function to remove all of the sacks (i.e. grab bags) in the room. * * @param sackSubType Optional. If specified, will only remove sacks that match this sub-type. * Default is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of sacks. * @returns The sacks that were removed. */ export declare function removeAllSacks(sackSubType?: SackSubType, cap?: int): readonly EntityPickupSack[]; /** * Helper function to remove all of the trinkets in the room. * * @param trinketType Optional. If specified, will only remove trinkets that match this sub-type. * Default is -1, which matches every sub-type. * @param cap Optional. If specified, will only remove the given amount of trinkets. * @returns The trinkets that were removed. */ export declare function removeAllTrinkets(trinketType?: TrinketType, cap?: int): readonly EntityPickupTrinket[]; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90). */ export declare function spawnBattery(batterySubType: BatterySubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupBattery; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90) * and a specific seed. */ export declare function spawnBatteryWithSeed(batterySubType: BatterySubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupBattery; /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40). */ export declare function spawnBombPickup(bombSubType: BombSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupBomb; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40) and a * specific seed. */ export declare function spawnBombPickupWithSeed(bombSubType: BombSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupBomb; /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.CARD` (300). */ export declare function spawnCard(cardType: CardType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupCard; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.CARD` (300) and a * specific seed. */ export declare function spawnCardWithSeed(cardType: CardType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupCard; /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */ export declare function spawnCoin(coinSubType: CoinSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupCoin; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20) and a * specific seed. */ export declare function spawnCoinWithSeed(coinSubType: CoinSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupCoin; /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */ export declare function spawnHeart(heartSubType: HeartSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupHeart; export declare function spawnHeartWithSeed(heartSubType: HeartSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupHeart; /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */ export declare function spawnKey(keySubType: KeySubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupKey; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30) and a * specific seed. */ export declare function spawnKeyWithSeed(keySubType: KeySubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupKey; /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */ export declare function spawnPill(pillColor: PillColor, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupPill; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70) and a * specific seed. */ export declare function spawnPillWithSeed(pillColor: PillColor, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupPill; /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69). */ export declare function spawnSack(sackSubType: SackSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupSack; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69) and a * specific seed. */ export declare function spawnSackWithSeed(sackSubType: SackSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupSack; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350). */ export declare function spawnTrinket(trinketType: TrinketType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity, seedOrRNG?: Seed | RNG): EntityPickupTrinket; /** * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350) and * a specific seed. */ export declare function spawnTrinketWithSeed(trinketType: TrinketType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity): EntityPickupTrinket; //# sourceMappingURL=pickupsSpecific.d.ts.map