isaacscript-common 17.2.1 → 17.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.d.ts +67 -55
- package/dist/isaacscript-common.lua +124 -110
- package/dist/src/classes/features/other/CustomHotkeys.d.ts +4 -0
- package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
- package/dist/src/classes/features/other/SpawnCollectible.d.ts +4 -4
- package/dist/src/classes/features/other/SpawnCollectible.d.ts.map +1 -1
- package/dist/src/classes/features/other/SpawnCollectible.lua +4 -4
- package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts +3 -2
- package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
- package/dist/src/classes/features/other/SpawnRockAltRewards.lua +4 -1
- package/dist/src/functions/bosses.d.ts +2 -2
- package/dist/src/functions/bosses.d.ts.map +1 -1
- package/dist/src/functions/bosses.lua +5 -5
- package/dist/src/functions/entities.d.ts +5 -5
- package/dist/src/functions/entities.d.ts.map +1 -1
- package/dist/src/functions/entities.lua +10 -8
- package/dist/src/functions/entitiesSpecific.d.ts +20 -20
- package/dist/src/functions/entitiesSpecific.d.ts.map +1 -1
- package/dist/src/functions/entitiesSpecific.lua +40 -40
- package/dist/src/functions/pickupsSpecific.d.ts +18 -18
- package/dist/src/functions/pickupsSpecific.d.ts.map +1 -1
- package/dist/src/functions/pickupsSpecific.lua +36 -36
- package/dist/src/functions/players.d.ts +7 -0
- package/dist/src/functions/players.d.ts.map +1 -1
- package/dist/src/functions/players.lua +26 -13
- package/dist/src/functions/spawnCollectible.d.ts +4 -4
- package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/src/functions/spawnCollectible.lua +6 -6
- package/package.json +2 -2
- package/src/classes/features/other/CustomHotkeys.ts +4 -0
- package/src/classes/features/other/SpawnCollectible.ts +6 -6
- package/src/classes/features/other/SpawnRockAltRewards.ts +7 -3
- package/src/functions/bosses.ts +13 -5
- package/src/functions/entities.ts +14 -8
- package/src/functions/entitiesSpecific.ts +40 -40
- package/src/functions/pickupsSpecific.ts +84 -36
- package/src/functions/players.ts +21 -0
- package/src/functions/spawnCollectible.ts +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1654,6 +1654,8 @@ declare class CustomHotkeys extends Feature {
|
|
|
1654
1654
|
* This can be used to easily set up custom hotkeys to facilitate custom game features or to
|
|
1655
1655
|
* assist in debugging.
|
|
1656
1656
|
*
|
|
1657
|
+
* Inputs are checked for in the `POST_RENDER` callback.
|
|
1658
|
+
*
|
|
1657
1659
|
* This is different from the `setHotkey` function in that the keyboard activation key is not
|
|
1658
1660
|
* hardcoded and is instead the return value of a provided function. This is useful for situations
|
|
1659
1661
|
* where the key can change (like if end-users can specify a custom hotkey using Mod Config Menu).
|
|
@@ -1671,6 +1673,8 @@ declare class CustomHotkeys extends Feature {
|
|
|
1671
1673
|
* This can be used to easily set up custom hotkeys to facilitate custom game features or to
|
|
1672
1674
|
* assist in debugging.
|
|
1673
1675
|
*
|
|
1676
|
+
* Inputs are checked for in the `POST_RENDER` callback.
|
|
1677
|
+
*
|
|
1674
1678
|
* In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
|
|
1675
1679
|
*
|
|
1676
1680
|
* @param keyboard The key that you want to trigger the hotkey.
|
|
@@ -3019,6 +3023,14 @@ declare class DeployJSONRoom extends Feature {
|
|
|
3019
3023
|
deployJSONRoom(jsonRoom: JSONRoom | Readonly<JSONRoom>, seedOrRNG?: Seed | RNG, verbose?: boolean): void;
|
|
3020
3024
|
}
|
|
3021
3025
|
|
|
3026
|
+
/**
|
|
3027
|
+
* Helper function to remove a collectible or trinket that is currently queued to go into a player's
|
|
3028
|
+
* inventory (i.e. the item is being held over their head).
|
|
3029
|
+
*
|
|
3030
|
+
* Returns whether or not an item was actually dequeued.
|
|
3031
|
+
*/
|
|
3032
|
+
export declare function dequeueItem(player: EntityPlayer): boolean;
|
|
3033
|
+
|
|
3022
3034
|
/**
|
|
3023
3035
|
* Helper function to convert a `SerializedBitSet128` object to a normal `BitSet128` object. (This
|
|
3024
3036
|
* is used by the save data manager when reading data from the "save#.dat" file.)
|
|
@@ -13762,40 +13774,40 @@ export declare type SoulHeartType = HeartSubType.SOUL | HeartSubType.BLACK | Hea
|
|
|
13762
13774
|
* @param entityType The `EntityType` of the entity to spawn.
|
|
13763
13775
|
* @param variant The variant of the entity to spawn.
|
|
13764
13776
|
* @param subType The sub-type of the entity to spawn.
|
|
13765
|
-
* @param
|
|
13777
|
+
* @param positionOrGridIndex The position or grid index of the entity to spawn.
|
|
13766
13778
|
* @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
|
|
13767
13779
|
* @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
|
|
13768
13780
|
* @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
|
|
13769
13781
|
* entity. Default is undefined, which will make the entity spawn with a random
|
|
13770
13782
|
* seed using the `Isaac.Spawn` method.
|
|
13771
13783
|
*/
|
|
13772
|
-
export declare function spawn(entityType: EntityType, variant: int, subType: int,
|
|
13784
|
+
export declare function spawn(entityType: EntityType, variant: int, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): Entity;
|
|
13773
13785
|
|
|
13774
13786
|
/**
|
|
13775
13787
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
|
|
13776
13788
|
*/
|
|
13777
|
-
export declare function spawnBattery(batterySubType: BatterySubType,
|
|
13789
|
+
export declare function spawnBattery(batterySubType: BatterySubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupBattery;
|
|
13778
13790
|
|
|
13779
13791
|
/**
|
|
13780
13792
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90)
|
|
13781
13793
|
* and a specific seed.
|
|
13782
13794
|
*/
|
|
13783
|
-
export declare function spawnBatteryWithSeed(batterySubType: BatterySubType,
|
|
13795
|
+
export declare function spawnBatteryWithSeed(batterySubType: BatterySubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupBattery;
|
|
13784
13796
|
|
|
13785
13797
|
/** Helper function to spawn a `EntityType.BOMB` (4). */
|
|
13786
|
-
export declare function spawnBomb(bombVariant: BombVariant, subType: int,
|
|
13798
|
+
export declare function spawnBomb(bombVariant: BombVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityBomb;
|
|
13787
13799
|
|
|
13788
13800
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40). */
|
|
13789
|
-
export declare function spawnBombPickup(bombSubType: BombSubType,
|
|
13801
|
+
export declare function spawnBombPickup(bombSubType: BombSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupBomb;
|
|
13790
13802
|
|
|
13791
13803
|
/**
|
|
13792
13804
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40) and a
|
|
13793
13805
|
* specific seed.
|
|
13794
13806
|
*/
|
|
13795
|
-
export declare function spawnBombPickupWithSeed(bombSubType: BombSubType,
|
|
13807
|
+
export declare function spawnBombPickupWithSeed(bombSubType: BombSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupBomb;
|
|
13796
13808
|
|
|
13797
13809
|
/** Helper function to spawn a `EntityType.BOMB` (4) with a specific seed. */
|
|
13798
|
-
export declare function spawnBombWithSeed(bombVariant: BombVariant, subType: int,
|
|
13810
|
+
export declare function spawnBombWithSeed(bombVariant: BombVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityBomb;
|
|
13799
13811
|
|
|
13800
13812
|
/**
|
|
13801
13813
|
* Helper function to spawn a boss.
|
|
@@ -13807,34 +13819,34 @@ export declare function spawnBombWithSeed(bombVariant: BombVariant, subType: int
|
|
|
13807
13819
|
* Gurglings/Turdlings with 2 copies, and other multi-segment bosses with 4 segments. You can
|
|
13808
13820
|
* customize this via the "numSegments" argument.
|
|
13809
13821
|
*/
|
|
13810
|
-
export declare function spawnBoss(entityType: EntityType, variant: int, subType: int,
|
|
13822
|
+
export declare function spawnBoss(entityType: EntityType, variant: int, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined, numSegments?: int): EntityNPC;
|
|
13811
13823
|
|
|
13812
13824
|
/**
|
|
13813
13825
|
* Helper function to spawn a boss with a specific seed.
|
|
13814
13826
|
*
|
|
13815
13827
|
* For more information, see the documentation for the `spawnBoss` function.
|
|
13816
13828
|
*/
|
|
13817
|
-
export declare function spawnBossWithSeed(entityType: EntityType, variant: int, subType: int,
|
|
13829
|
+
export declare function spawnBossWithSeed(entityType: EntityType, variant: int, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined, numSegments?: int): EntityNPC;
|
|
13818
13830
|
|
|
13819
13831
|
/**
|
|
13820
13832
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
13821
13833
|
*/
|
|
13822
|
-
export declare function spawnCard(cardType: CardType,
|
|
13834
|
+
export declare function spawnCard(cardType: CardType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
|
|
13823
13835
|
|
|
13824
13836
|
/**
|
|
13825
13837
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300)
|
|
13826
13838
|
* and a specific seed.
|
|
13827
13839
|
*/
|
|
13828
|
-
export declare function spawnCardWithSeed(cardType: CardType,
|
|
13840
|
+
export declare function spawnCardWithSeed(cardType: CardType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCard;
|
|
13829
13841
|
|
|
13830
13842
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
13831
|
-
export declare function spawnCoin(coinSubType: CoinSubType,
|
|
13843
|
+
export declare function spawnCoin(coinSubType: CoinSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCoin;
|
|
13832
13844
|
|
|
13833
13845
|
/**
|
|
13834
13846
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20) and a
|
|
13835
13847
|
* specific seed.
|
|
13836
13848
|
*/
|
|
13837
|
-
export declare function spawnCoinWithSeed(coinSubType: CoinSubType,
|
|
13849
|
+
export declare function spawnCoinWithSeed(coinSubType: CoinSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCoin;
|
|
13838
13850
|
|
|
13839
13851
|
declare class SpawnCollectible extends Feature {
|
|
13840
13852
|
private preventCollectibleRotation;
|
|
@@ -13852,7 +13864,7 @@ declare class SpawnCollectible extends Feature {
|
|
|
13852
13864
|
* In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
|
|
13853
13865
|
*
|
|
13854
13866
|
* @param collectibleType The collectible type to spawn.
|
|
13855
|
-
* @param
|
|
13867
|
+
* @param positionOrGridIndex The position or grid index to spawn the collectible at.
|
|
13856
13868
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
13857
13869
|
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
13858
13870
|
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
@@ -13861,7 +13873,7 @@ declare class SpawnCollectible extends Feature {
|
|
|
13861
13873
|
* Tainted Keeper. Default is false.
|
|
13862
13874
|
* @param spawner Optional.
|
|
13863
13875
|
*/
|
|
13864
|
-
spawnCollectible(collectibleType: CollectibleType,
|
|
13876
|
+
spawnCollectible(collectibleType: CollectibleType, positionOrGridIndex: Vector | int, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
13865
13877
|
/**
|
|
13866
13878
|
* Helper function to spawn a collectible from a specific item pool.
|
|
13867
13879
|
*
|
|
@@ -13872,7 +13884,7 @@ declare class SpawnCollectible extends Feature {
|
|
|
13872
13884
|
* In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
|
|
13873
13885
|
*
|
|
13874
13886
|
* @param itemPoolType The item pool to draw the collectible type from.
|
|
13875
|
-
* @param
|
|
13887
|
+
* @param positionOrGridIndex The position or grid index to spawn the collectible at.
|
|
13876
13888
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
13877
13889
|
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
13878
13890
|
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
@@ -13881,7 +13893,7 @@ declare class SpawnCollectible extends Feature {
|
|
|
13881
13893
|
* Tainted Keeper. Default is false.
|
|
13882
13894
|
* @param spawner Optional.
|
|
13883
13895
|
*/
|
|
13884
|
-
spawnCollectibleFromPool(itemPoolType: ItemPoolType,
|
|
13896
|
+
spawnCollectibleFromPool(itemPoolType: ItemPoolType, positionOrGridIndex: Vector | int, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
13885
13897
|
}
|
|
13886
13898
|
|
|
13887
13899
|
/**
|
|
@@ -13895,7 +13907,7 @@ declare class SpawnCollectible extends Feature {
|
|
|
13895
13907
|
* (which is provided by `ISCFeature.SPAWN_COLLECTIBLE`).
|
|
13896
13908
|
*
|
|
13897
13909
|
* @param collectibleType The collectible type to spawn.
|
|
13898
|
-
* @param
|
|
13910
|
+
* @param positionOrGridIndex The position or grid index to spawn the collectible at.
|
|
13899
13911
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
13900
13912
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
13901
13913
|
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
@@ -13904,7 +13916,7 @@ declare class SpawnCollectible extends Feature {
|
|
|
13904
13916
|
* Tainted Keeper. Default is false.
|
|
13905
13917
|
* @param spawner Optional.
|
|
13906
13918
|
*/
|
|
13907
|
-
export declare function spawnCollectibleUnsafe(collectibleType: CollectibleType,
|
|
13919
|
+
export declare function spawnCollectibleUnsafe(collectibleType: CollectibleType, positionOrGridIndex: Vector | int, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
13908
13920
|
|
|
13909
13921
|
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18). */
|
|
13910
13922
|
export declare function spawnCrawlSpace(gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
@@ -13919,10 +13931,10 @@ export declare function spawnDoor(gridIndexOrPosition: int | Vector): GridEntity
|
|
|
13919
13931
|
export declare function spawnDoorWithVariant(doorVariant: DoorVariant, gridIndexOrPosition: int | Vector): GridEntityDoor | undefined;
|
|
13920
13932
|
|
|
13921
13933
|
/** Helper function to spawn a `EntityType.EFFECT` (1000). */
|
|
13922
|
-
export declare function spawnEffect(effectVariant: EffectVariant, subType: int,
|
|
13934
|
+
export declare function spawnEffect(effectVariant: EffectVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityEffect;
|
|
13923
13935
|
|
|
13924
13936
|
/** Helper function to spawn a `EntityType.EFFECT` (1000) with a specific seed. */
|
|
13925
|
-
export declare function spawnEffectWithSeed(effectVariant: EffectVariant, subType: int,
|
|
13937
|
+
export declare function spawnEffectWithSeed(effectVariant: EffectVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityEffect;
|
|
13926
13938
|
|
|
13927
13939
|
/**
|
|
13928
13940
|
* Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
|
|
@@ -13932,24 +13944,24 @@ export declare function spawnEffectWithSeed(effectVariant: EffectVariant, subTyp
|
|
|
13932
13944
|
* Instead, this function arbitrarily spawns a collectible with `CollectibleType.SAD_ONION`, and
|
|
13933
13945
|
* then converts it to an empty pedestal afterward.
|
|
13934
13946
|
*
|
|
13935
|
-
* @param
|
|
13947
|
+
* @param positionOrGridIndex The position or grid index to spawn the empty collectible at.
|
|
13936
13948
|
* @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
13937
13949
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
13938
13950
|
*/
|
|
13939
|
-
export declare function spawnEmptyCollectible(
|
|
13951
|
+
export declare function spawnEmptyCollectible(positionOrGridIndex: Vector | int, seedOrRNG?: Seed | RNG): EntityPickup;
|
|
13940
13952
|
|
|
13941
13953
|
/**
|
|
13942
13954
|
* Helper function to spawn the entity corresponding to an `EntityID`.
|
|
13943
13955
|
*
|
|
13944
13956
|
* @param entityID The `EntityID` of the entity to spawn.
|
|
13945
|
-
* @param
|
|
13957
|
+
* @param positionOrGridIndex The position or grid index of the entity to spawn.
|
|
13946
13958
|
* @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
|
|
13947
13959
|
* @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
|
|
13948
13960
|
* @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
|
|
13949
13961
|
* entity. Default is undefined, which will make the entity spawn with a random
|
|
13950
13962
|
* seed using the `Isaac.Spawn` method.
|
|
13951
13963
|
*/
|
|
13952
|
-
export declare function spawnEntityID(entityID: EntityID,
|
|
13964
|
+
export declare function spawnEntityID(entityID: EntityID, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): Entity;
|
|
13953
13965
|
|
|
13954
13966
|
/**
|
|
13955
13967
|
* Helper function to spawn a `EntityType.FAMILIAR` (3).
|
|
@@ -13957,10 +13969,10 @@ export declare function spawnEntityID(entityID: EntityID, position: Vector, velo
|
|
|
13957
13969
|
* If you are trying to implement a custom familiar, you probably want to use the
|
|
13958
13970
|
* `checkFamiliarFromCollectibles` helper function instead.
|
|
13959
13971
|
*/
|
|
13960
|
-
export declare function spawnFamiliar(familiarVariant: FamiliarVariant, subType: int,
|
|
13972
|
+
export declare function spawnFamiliar(familiarVariant: FamiliarVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityFamiliar;
|
|
13961
13973
|
|
|
13962
13974
|
/** Helper function to spawn a `EntityType.FAMILIAR` (3) with a specific seed. */
|
|
13963
|
-
export declare function spawnFamiliarWithSeed(familiarVariant: FamiliarVariant, subType: int,
|
|
13975
|
+
export declare function spawnFamiliarWithSeed(familiarVariant: FamiliarVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityFamiliar;
|
|
13964
13976
|
|
|
13965
13977
|
/**
|
|
13966
13978
|
* Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
|
|
@@ -13992,30 +14004,30 @@ export declare function spawnGridEntity(gridEntityType: GridEntityType, gridInde
|
|
|
13992
14004
|
export declare function spawnGridEntityWithVariant(gridEntityType: GridEntityType, variant: int, gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
13993
14005
|
|
|
13994
14006
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */
|
|
13995
|
-
export declare function spawnHeart(heartSubType: HeartSubType,
|
|
14007
|
+
export declare function spawnHeart(heartSubType: HeartSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupHeart;
|
|
13996
14008
|
|
|
13997
|
-
export declare function spawnHeartWithSeed(heartSubType: HeartSubType,
|
|
14009
|
+
export declare function spawnHeartWithSeed(heartSubType: HeartSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupHeart;
|
|
13998
14010
|
|
|
13999
14011
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */
|
|
14000
|
-
export declare function spawnKey(keySubType: KeySubType,
|
|
14012
|
+
export declare function spawnKey(keySubType: KeySubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupKey;
|
|
14001
14013
|
|
|
14002
14014
|
/**
|
|
14003
14015
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30) and a
|
|
14004
14016
|
* specific seed.
|
|
14005
14017
|
*/
|
|
14006
|
-
export declare function spawnKeyWithSeed(keySubType: KeySubType,
|
|
14018
|
+
export declare function spawnKeyWithSeed(keySubType: KeySubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupKey;
|
|
14007
14019
|
|
|
14008
14020
|
/** Helper function to spawn a `EntityType.KNIFE` (8). */
|
|
14009
|
-
export declare function spawnKnife(knifeVariant: KnifeVariant, subType: int,
|
|
14021
|
+
export declare function spawnKnife(knifeVariant: KnifeVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityKnife;
|
|
14010
14022
|
|
|
14011
14023
|
/** Helper function to spawn a `EntityType.KNIFE` (8) with a specific seed. */
|
|
14012
|
-
export declare function spawnKnifeWithSeed(knifeVariant: KnifeVariant, subType: int,
|
|
14024
|
+
export declare function spawnKnifeWithSeed(knifeVariant: KnifeVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityKnife;
|
|
14013
14025
|
|
|
14014
14026
|
/** Helper function to spawn a `EntityType.LASER` (7). */
|
|
14015
|
-
export declare function spawnLaser(laserVariant: LaserVariant, subType: int,
|
|
14027
|
+
export declare function spawnLaser(laserVariant: LaserVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityLaser;
|
|
14016
14028
|
|
|
14017
14029
|
/** Helper function to spawn a `EntityType.LASER` (7) with a specific seed. */
|
|
14018
|
-
export declare function spawnLaserWithSeed(laserVariant: LaserVariant, subType: int,
|
|
14030
|
+
export declare function spawnLaserWithSeed(laserVariant: LaserVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityLaser;
|
|
14019
14031
|
|
|
14020
14032
|
/**
|
|
14021
14033
|
* Helper function to spawn an NPC.
|
|
@@ -14023,7 +14035,7 @@ export declare function spawnLaserWithSeed(laserVariant: LaserVariant, subType:
|
|
|
14023
14035
|
* Note that if you pass a non-NPC `EntityType` to this function, it will cause a run-time error,
|
|
14024
14036
|
* since the `Entity.ToNPC` method will return undefined.
|
|
14025
14037
|
*/
|
|
14026
|
-
export declare function spawnNPC(entityType: EntityType, variant: int, subType: int,
|
|
14038
|
+
export declare function spawnNPC(entityType: EntityType, variant: int, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityNPC;
|
|
14027
14039
|
|
|
14028
14040
|
/**
|
|
14029
14041
|
* Helper function to spawn an NPC with a specific seed.
|
|
@@ -14031,22 +14043,22 @@ export declare function spawnNPC(entityType: EntityType, variant: int, subType:
|
|
|
14031
14043
|
* Note that if you pass a non-NPC `EntityType` to this function, it will cause a run-time error,
|
|
14032
14044
|
* since the `Entity.ToNPC` method will return undefined.
|
|
14033
14045
|
*/
|
|
14034
|
-
export declare function spawnNPCWithSeed(entityType: EntityType, variant: int, subType: int,
|
|
14046
|
+
export declare function spawnNPCWithSeed(entityType: EntityType, variant: int, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityNPC;
|
|
14035
14047
|
|
|
14036
14048
|
/** Helper function to spawn a `EntityType.PICKUP` (5). */
|
|
14037
|
-
export declare function spawnPickup(pickupVariant: PickupVariant, subType: int,
|
|
14049
|
+
export declare function spawnPickup(pickupVariant: PickupVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickup;
|
|
14038
14050
|
|
|
14039
14051
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with a specific seed. */
|
|
14040
|
-
export declare function spawnPickupWithSeed(pickupVariant: PickupVariant, subType: int,
|
|
14052
|
+
export declare function spawnPickupWithSeed(pickupVariant: PickupVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickup;
|
|
14041
14053
|
|
|
14042
14054
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */
|
|
14043
|
-
export declare function spawnPill(pillColor: PillColor,
|
|
14055
|
+
export declare function spawnPill(pillColor: PillColor, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupPill;
|
|
14044
14056
|
|
|
14045
14057
|
/**
|
|
14046
14058
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70) and a
|
|
14047
14059
|
* specific seed.
|
|
14048
14060
|
*/
|
|
14049
|
-
export declare function spawnPillWithSeed(pillColor: PillColor,
|
|
14061
|
+
export declare function spawnPillWithSeed(pillColor: PillColor, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupPill;
|
|
14050
14062
|
|
|
14051
14063
|
/** Helper function to spawn a `GridEntityType.DOOR` (16) with a specific variant. */
|
|
14052
14064
|
export declare function spawnPit(gridIndexOrPosition: int | Vector): GridEntityPit | undefined;
|
|
@@ -14067,10 +14079,10 @@ export declare function spawnPressurePlate(gridIndexOrPosition: int | Vector): G
|
|
|
14067
14079
|
export declare function spawnPressurePlateWithVariant(pressurePlateVariant: PressurePlateVariant, gridIndexOrPosition: int | Vector): GridEntityPressurePlate | undefined;
|
|
14068
14080
|
|
|
14069
14081
|
/** Helper function to spawn a `EntityType.PROJECTILE` (9). */
|
|
14070
|
-
export declare function spawnProjectile(projectileVariant: ProjectileVariant, subType: int,
|
|
14082
|
+
export declare function spawnProjectile(projectileVariant: ProjectileVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityProjectile;
|
|
14071
14083
|
|
|
14072
14084
|
/** Helper function to spawn a `EntityType.PROJECTILE` (9) with a specific seed. */
|
|
14073
|
-
export declare function spawnProjectileWithSeed(projectileVariant: ProjectileVariant, subType: int,
|
|
14085
|
+
export declare function spawnProjectileWithSeed(projectileVariant: ProjectileVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityProjectile;
|
|
14074
14086
|
|
|
14075
14087
|
/** Helper function to spawn a `GridEntityType.ROCK` (2). */
|
|
14076
14088
|
export declare function spawnRock(gridIndexOrPosition: int | Vector): GridEntityRock | undefined;
|
|
@@ -14101,7 +14113,7 @@ declare class SpawnRockAltRewards extends Feature {
|
|
|
14101
14113
|
* In order to use this function, you must upgrade your mod with
|
|
14102
14114
|
* `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
|
|
14103
14115
|
*
|
|
14104
|
-
* @param
|
|
14116
|
+
* @param positionOrGridIndex The position or grid index to spawn the reward.
|
|
14105
14117
|
* @param rockAltType The type of reward to spawn. For example, `RockAltType.URN` will have a
|
|
14106
14118
|
* chance at spawning coins and spiders.
|
|
14107
14119
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
@@ -14109,7 +14121,7 @@ declare class SpawnRockAltRewards extends Feature {
|
|
|
14109
14121
|
* you should pass the `InitSeed` of the grid entity that was broken.
|
|
14110
14122
|
* @returns Whether or not this function spawned something.
|
|
14111
14123
|
*/
|
|
14112
|
-
spawnRockAltReward(
|
|
14124
|
+
spawnRockAltReward(positionOrGridIndex: Vector | int, rockAltType: RockAltType, seedOrRNG?: Seed | RNG): boolean;
|
|
14113
14125
|
/**
|
|
14114
14126
|
* Helper function for emulating what happens when a vanilla `GridEntityType.ROCK_ALT` grid entity
|
|
14115
14127
|
* breaks of `RockAltType.URN`.
|
|
@@ -14176,19 +14188,19 @@ declare class SpawnRockAltRewards extends Feature {
|
|
|
14176
14188
|
export declare function spawnRockWithVariant(rockVariant: RockVariant, gridIndexOrPosition: int | Vector): GridEntityRock | undefined;
|
|
14177
14189
|
|
|
14178
14190
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69). */
|
|
14179
|
-
export declare function spawnSack(sackSubType: SackSubType,
|
|
14191
|
+
export declare function spawnSack(sackSubType: SackSubType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupSack;
|
|
14180
14192
|
|
|
14181
14193
|
/**
|
|
14182
14194
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69) and a
|
|
14183
14195
|
* specific seed.
|
|
14184
14196
|
*/
|
|
14185
|
-
export declare function spawnSackWithSeed(sackSubType: SackSubType,
|
|
14197
|
+
export declare function spawnSackWithSeed(sackSubType: SackSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupSack;
|
|
14186
14198
|
|
|
14187
14199
|
/** Helper function to spawn a `EntityType.SLOT` (6). */
|
|
14188
|
-
export declare function spawnSlot(slotVariant: SlotVariant, subType: int,
|
|
14200
|
+
export declare function spawnSlot(slotVariant: SlotVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntitySlot;
|
|
14189
14201
|
|
|
14190
14202
|
/** Helper function to spawn a `EntityType.SLOT` (6) with a specific seed. */
|
|
14191
|
-
export declare function spawnSlotWithSeed(slotVariant: SlotVariant, subType: int,
|
|
14203
|
+
export declare function spawnSlotWithSeed(slotVariant: SlotVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntitySlot;
|
|
14192
14204
|
|
|
14193
14205
|
/** Helper function to spawn a `GridEntityType.SPIKES` (8). */
|
|
14194
14206
|
export declare function spawnSpikes(gridIndexOrPosition: int | Vector): GridEntitySpikes | undefined;
|
|
@@ -14197,10 +14209,10 @@ export declare function spawnSpikes(gridIndexOrPosition: int | Vector): GridEnti
|
|
|
14197
14209
|
export declare function spawnSpikesWithVariant(variant: int, gridIndexOrPosition: int | Vector): GridEntitySpikes | undefined;
|
|
14198
14210
|
|
|
14199
14211
|
/** Helper function to spawn a `EntityType.TEAR` (2). */
|
|
14200
|
-
export declare function spawnTear(tearVariant: TearVariant, subType: int,
|
|
14212
|
+
export declare function spawnTear(tearVariant: TearVariant, subType: int, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityTear;
|
|
14201
14213
|
|
|
14202
14214
|
/** Helper function to spawn a `EntityType.EntityType` (2) with a specific seed. */
|
|
14203
|
-
export declare function spawnTearWithSeed(tearVariant: TearVariant, subType: int,
|
|
14215
|
+
export declare function spawnTearWithSeed(tearVariant: TearVariant, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityTear;
|
|
14204
14216
|
|
|
14205
14217
|
/** Helper function to spawn a `GridEntityType.TELEPORTER` (23). */
|
|
14206
14218
|
export declare function spawnTeleporter(gridIndexOrPosition: int | Vector): GridEntity | undefined;
|
|
@@ -14223,13 +14235,13 @@ export declare function spawnTrapdoorWithVariant(trapdoorVariant: TrapdoorVarian
|
|
|
14223
14235
|
/**
|
|
14224
14236
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
14225
14237
|
*/
|
|
14226
|
-
export declare function spawnTrinket(trinketType: TrinketType,
|
|
14238
|
+
export declare function spawnTrinket(trinketType: TrinketType, positionOrGridIndex: Vector | int, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupTrinket;
|
|
14227
14239
|
|
|
14228
14240
|
/**
|
|
14229
14241
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350) and
|
|
14230
14242
|
* a specific seed.
|
|
14231
14243
|
*/
|
|
14232
|
-
export declare function spawnTrinketWithSeed(trinketType: TrinketType,
|
|
14244
|
+
export declare function spawnTrinketWithSeed(trinketType: TrinketType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupTrinket;
|
|
14233
14245
|
|
|
14234
14246
|
/**
|
|
14235
14247
|
* Helper function to spawn a Void Portal. This is more complicated than simply spawning a trapdoor
|
|
@@ -14241,7 +14253,7 @@ export declare function spawnVoidPortal(gridIndex: int): GridEntity | undefined;
|
|
|
14241
14253
|
* Helper function to spawn an entity. Use this instead of the `Game.Spawn` method if you do not
|
|
14242
14254
|
* need to specify the velocity or spawner.
|
|
14243
14255
|
*/
|
|
14244
|
-
export declare function spawnWithSeed(entityType: EntityType, variant: int, subType: int,
|
|
14256
|
+
export declare function spawnWithSeed(entityType: EntityType, variant: int, subType: int, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): Entity;
|
|
14245
14257
|
|
|
14246
14258
|
/**
|
|
14247
14259
|
* Helper function to check if two sprite layers have the same sprite sheet by using the
|