isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
214 lines • 14.5 kB
TypeScript
import type { TrapdoorVariant } from "isaac-typescript-definitions";
import { CrawlSpaceVariant, DoorVariant, PitVariant, PoopGridEntityVariant, PressurePlateVariant, RockVariant } from "isaac-typescript-definitions";
/**
* Helper function to get all of the grid entities of type `GridEntityType.CRAWL_SPACE` (18) in the
* room.
*
* @param crawlSpaceVariant Optional. If specified, will only get the crawl spaces that match the
* variant. Default is -1, which matches every variant.
*/
export declare function getCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVariant | -1): readonly GridEntity[];
/**
* Helper function to get all of the `GridEntityPit` in the room.
*
* @param pitVariant Optional. If specified, will only get the pits that match the variant. Default
* is -1, which matches every variant.
*/
export declare function getPits(pitVariant?: PitVariant | -1): readonly GridEntityPit[];
/**
* Helper function to get all of the `GridEntityPoop` in the room.
*
* @param poopVariant Optional. If specified, will only get the poops that match the variant.
* Default is -1, which matches every variant.
*/
export declare function getPoops(poopVariant?: PoopGridEntityVariant | -1): readonly GridEntityPoop[];
/**
* Helper function to get all of the `GridEntityPressurePlate` in the room.
*
* @param pressurePlateVariant Optional. If specified, will only get the pressure plates that match
* the variant. Default is -1, which matches every variant.
*/
export declare function getPressurePlates(pressurePlateVariant?: PressurePlateVariant | -1): readonly GridEntityPressurePlate[];
/**
* Helper function to get all of the `GridEntityRock` in the room.
*
* @param variant Optional. If specified, will only get the rocks that match the variant. Default is
* -1, which matches every variant. Note that this is not the same thing as the
* `RockVariant` enum, since that only applies to `GridEntityType.ROCK`, and other
* types of grid entities can be the `GridEntityRock` class.
*/
export declare function getRocks(variant?: number): readonly GridEntityRock[];
/** Helper function to get all of the `GridEntitySpikes` in the room. */
export declare function getSpikes(variant?: number): readonly GridEntitySpikes[];
/** Helper function to get all of the `GridEntityTNT` in the room. */
export declare function getTNT(variant?: number): readonly GridEntityTNT[];
/**
* Helper function to get all of the grid entities of type `GridEntityType.TELEPORTER` (23) in the
* room.
*
* @param variant Optional. If specified, will only get the teleporters that match the variant.
* Default is -1, which matches every variant.
*/
export declare function getTeleporters(variant?: number): readonly GridEntity[];
/**
* Helper function to get all of the grid entities of type `GridEntityType.TRAPDOOR` (17) in the
* room. Specify a specific trapdoor variant to select only trapdoors of that variant.
*
* @param trapdoorVariant Optional. If specified, will only get the trapdoors that match the
* variant. Default is -1, which matches every variant.
*/
export declare function getTrapdoors(trapdoorVariant?: TrapdoorVariant | -1): readonly GridEntity[];
/**
* Helper function to remove all of the `GridEntityType.CRAWL_SPACE` (18) in the room.
*
* @param crawlSpaceVariant Optional. If specified, will only remove the crawl spaces that match
* this variant. Default is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the crawl spaces are removed.
* Default is false. For more information, see the description of the
* `removeGridEntities` helper function.
* @param cap Optional. If specified, will only remove the given amount of crawl spaces.
* @returns The crawl spaces that were removed.
*/
export declare function removeAllCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVariant | -1, updateRoom?: boolean, cap?: int): readonly GridEntity[];
/**
* Helper function to remove all of the `GridEntityPit` in the room.
*
* @param pitVariant Optional. If specified, will only remove the pits that match this variant.
* Default is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the pits are removed. Default is
* false. For more information, see the description of the `removeGridEntities`
* helper function.
* @param cap Optional. If specified, will only remove the given amount of pits.
* @returns The pits that were removed.
*/
export declare function removeAllPits(pitVariant?: PitVariant | -1, updateRoom?: boolean, cap?: int): readonly GridEntityPit[];
/**
* Helper function to remove all of the `GridEntityPoop` in the room.
*
* Note that poops can either be an entity or a grid entity, depending on the situation. This
* function will only remove the grid entity poops.
*
* @param poopVariant Optional. If specified, will only remove the poops that match this variant.
* Default is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the poops are removed. Default is
* false. For more information, see the description of the `removeGridEntities`
* helper function.
* @param cap Optional. If specified, will only remove the given amount of poops.
* @returns The poops that were removed.
*/
export declare function removeAllPoops(poopVariant?: PoopGridEntityVariant | -1, updateRoom?: boolean, cap?: int): readonly GridEntityPoop[];
/**
* Helper function to remove all of the `GridEntityPressurePlate` in the room.
*
* @param pressurePlateVariant Optional. If specified, will only remove the pressure plates that
* match this variant. Default is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the pressure plates are removed.
* Default is false. For more information, see the description of the
* `removeGridEntities` helper function.
* @param cap Optional. If specified, will only remove the given amount of pressure plates.
* @returns The pressure plates that were removed.
*/
export declare function removeAllPressurePlates(pressurePlateVariant?: PressurePlateVariant | -1, updateRoom?: boolean, cap?: int): readonly GridEntityPressurePlate[];
/**
* Helper function to remove all of the `GridEntityRock` in the room.
*
* @param variant Optional. If specified, will only remove the rocks that match this variant.
* Default is -1, which matches every variant. Note that this is not the same thing
* as the `RockVariant` enum, since that only applies to `GridEntityType.ROCK`, and
* other types of grid entities can be the `GridEntityRock` class.
* @param updateRoom Optional. Whether to update the room after the rocks are removed. Default is
* false. For more information, see the description of the `removeGridEntities`
* helper function.
* @param cap Optional. If specified, will only remove the given amount of rocks.
* @returns The rocks that were removed.
*/
export declare function removeAllRocks(variant?: number, updateRoom?: boolean, cap?: int): readonly GridEntityRock[];
/**
* Helper function to remove all of the `GridEntitySpikes` in the room.
*
* @param variant Optional. If specified, will only remove the spikes that match this variant.
* Default is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the spikes are removed. Default is
* false. For more information, see the description of the `removeGridEntities`
* helper function.
* @param cap Optional. If specified, will only remove the given amount of spikes.
* @returns The spikes that were removed.
*/
export declare function removeAllSpikes(variant?: number, updateRoom?: boolean, cap?: int): readonly GridEntitySpikes[];
/**
* Helper function to remove all of the `GridEntityTNT` in the room.
*
* @param variant Optional. If specified, will only remove the TNTs that match this variant. Default
* is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the TNTs are removed. Default is
* false. For more information, see the description of the `removeGridEntities`
* helper function.
* @param cap Optional. If specified, will only remove the given amount of TNTs.
* @returns The TNTs that were removed.
*/
export declare function removeAllTNT(variant?: number, updateRoom?: boolean, cap?: int): readonly GridEntityTNT[];
/**
* Helper function to remove all of the `GridEntityType.TELEPORTER` (23) in the room.
*
* @param variant Optional. If specified, will only remove the teleporters that match this variant.
* Default is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the teleporters are removed. Default
* is false. For more information, see the description of the `removeGridEntities`
* helper function.
* @param cap Optional. If specified, will only remove the given amount of teleporters.
* @returns The teleporters that were removed.
*/
export declare function removeAllTeleporters(variant?: number, updateRoom?: boolean, cap?: int): readonly GridEntity[];
/**
* Helper function to remove all of the `GridEntityType.TRAPDOOR` (17) in the room.
*
* @param trapdoorVariant Optional. If specified, will only remove the trapdoors that match this
* variant. Default is -1, which matches every variant.
* @param updateRoom Optional. Whether to update the room after the trapdoors are removed. Default
* is false. For more information, see the description of the `removeGridEntities`
* helper function.
* @param cap Optional. If specified, will only remove the given amount of trapdoors.
* @returns The trapdoors that were removed.
*/
export declare function removeAllTrapdoors(trapdoorVariant?: TrapdoorVariant | -1, updateRoom?: boolean, cap?: int): readonly GridEntity[];
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18). */
export declare function spawnCrawlSpace(gridIndexOrPosition: int | Vector): GridEntity | undefined;
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18) with a specific variant. */
export declare function spawnCrawlSpaceWithVariant(crawlSpaceVariant: CrawlSpaceVariant, gridIndexOrPosition: int | Vector): GridEntity | undefined;
/** Helper function to spawn a `GridEntityType.PIT` (7) with a specific variant. */
export declare function spawnDoor(gridIndexOrPosition: int | Vector): GridEntityDoor | undefined;
/** Helper function to spawn a `GridEntityType.DOOR` (16). */
export declare function spawnDoorWithVariant(doorVariant: DoorVariant, gridIndexOrPosition: int | Vector): GridEntityDoor | undefined;
/** Helper function to spawn a `GridEntityType.DOOR` (16) with a specific variant. */
export declare function spawnPit(gridIndexOrPosition: int | Vector): GridEntityPit | undefined;
/** Helper function to spawn a `GridEntityType.PIT` (7) with a specific variant. */
export declare function spawnPitWithVariant(pitVariant: PitVariant, gridIndexOrPosition: int | Vector): GridEntityPit | undefined;
/** Helper function to spawn a `GridEntityType.POOP` (14). */
export declare function spawnPoop(gridIndexOrPosition: int | Vector): GridEntityPoop | undefined;
/** Helper function to spawn a `GridEntityType.POOP` (14) with a specific variant. */
export declare function spawnPoopWithVariant(poopVariant: PoopGridEntityVariant, gridIndexOrPosition: int | Vector): GridEntityPoop | undefined;
/** Helper function to spawn a `GridEntityType.PRESSURE_PLATE` (20). */
export declare function spawnPressurePlate(gridIndexOrPosition: int | Vector): GridEntityPressurePlate | undefined;
/** Helper function to spawn a `GridEntityType.PRESSURE_PLATE` (20) with a specific variant. */
export declare function spawnPressurePlateWithVariant(pressurePlateVariant: PressurePlateVariant, gridIndexOrPosition: int | Vector): GridEntityPressurePlate | undefined;
/** Helper function to spawn a `GridEntityType.ROCK` (2). */
export declare function spawnRock(gridIndexOrPosition: int | Vector): GridEntityRock | undefined;
/** Helper function to spawn a `GridEntityType.ROCK` (2) with a specific variant. */
export declare function spawnRockWithVariant(rockVariant: RockVariant, gridIndexOrPosition: int | Vector): GridEntityRock | undefined;
/** Helper function to spawn a `GridEntityType.SPIKES` (8). */
export declare function spawnSpikes(gridIndexOrPosition: int | Vector): GridEntitySpikes | undefined;
/** Helper function to spawn a `GridEntityType.SPIKES` (8) with a specific variant. */
export declare function spawnSpikesWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntitySpikes | undefined;
/** Helper function to spawn a `GridEntityType.TNT` (12). */
export declare function spawnTNT(gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
/** Helper function to spawn a `GridEntityType.TNT` (12) with a specific variant. */
export declare function spawnTNTWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntityTNT | undefined;
/** Helper function to spawn a `GridEntityType.TELEPORTER` (23). */
export declare function spawnTeleporter(gridIndexOrPosition: int | Vector): GridEntity | undefined;
/** Helper function to spawn a `GridEntityType.TELEPORTER` (23) with a specific variant. */
export declare function spawnTeleporterWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntity | undefined;
/** Helper function to spawn a `GridEntityType.TRAPDOOR` (17). */
export declare function spawnTrapdoor(gridIndexOrPosition: int | Vector): GridEntity | undefined;
/** Helper function to spawn a `GridEntityType.TRAPDOOR` (17) with a specific variant. */
export declare function spawnTrapdoorWithVariant(trapdoorVariant: TrapdoorVariant, gridIndexOrPosition: int | Vector): GridEntity | undefined;
//# sourceMappingURL=gridEntitiesSpecific.d.ts.map