isaacscript-common 75.2.1 → 76.0.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/classes/features/other/DeployJSONRoom.d.ts +0 -1
- package/dist/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
- package/dist/classes/features/other/DeployJSONRoom.lua +6 -4
- package/dist/classes/features/other/SpawnRockAltRewards.lua +14 -14
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +3 -3
- package/dist/enums/ISCFeature.d.ts +12 -14
- package/dist/enums/ISCFeature.d.ts.map +1 -1
- package/dist/enums/ISCFeature.lua +12 -16
- package/dist/features.d.ts +12 -18
- package/dist/features.d.ts.map +1 -1
- package/dist/features.lua +1 -9
- package/dist/functions/collectibles.d.ts +8 -0
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +19 -0
- package/dist/functions/spawnCollectible.d.ts +28 -6
- package/dist/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/functions/spawnCollectible.lua +50 -7
- package/dist/index.rollup.d.ts +48 -104
- package/dist/isaacscript-common.lua +197 -329
- package/package.json +1 -1
- package/src/classes/features/other/DeployJSONRoom.ts +4 -12
- package/src/classes/features/other/SpawnRockAltRewards.ts +14 -14
- package/src/classes/features/other/extraConsoleCommands/commands.ts +3 -3
- package/src/enums/ISCFeature.ts +0 -2
- package/src/features.ts +1 -15
- package/src/functions/collectibles.ts +25 -0
- package/src/functions/spawnCollectible.ts +58 -8
- package/dist/classes/features/other/PreventCollectibleRotation.d.ts +0 -28
- package/dist/classes/features/other/PreventCollectibleRotation.d.ts.map +0 -1
- package/dist/classes/features/other/PreventCollectibleRotation.lua +0 -112
- package/dist/classes/features/other/SpawnCollectible.d.ts +0 -58
- package/dist/classes/features/other/SpawnCollectible.d.ts.map +0 -1
- package/dist/classes/features/other/SpawnCollectible.lua +0 -68
- package/src/classes/features/other/PreventCollectibleRotation.ts +0 -205
- package/src/classes/features/other/SpawnCollectible.ts +0 -124
package/dist/index.rollup.d.ts
CHANGED
|
@@ -3588,7 +3588,6 @@ export declare function deleteSetsFromSet<T>(mainSet: Set<T>, ...setsToRemove: A
|
|
|
3588
3588
|
|
|
3589
3589
|
declare class DeployJSONRoom extends Feature {
|
|
3590
3590
|
private readonly preventGridEntityRespawn;
|
|
3591
|
-
private readonly spawnCollectible;
|
|
3592
3591
|
private spawnAllEntities;
|
|
3593
3592
|
private spawnNormalEntityForJSONRoom;
|
|
3594
3593
|
/**
|
|
@@ -9000,20 +8999,18 @@ export declare enum ISCFeature {
|
|
|
9000
8999
|
PONY_DETECTION = 41,
|
|
9001
9000
|
PRESS_INPUT = 42,
|
|
9002
9001
|
PREVENT_CHILD_ENTITIES = 43,
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
TAINTED_LAZARUS_PLAYERS = 56,
|
|
9016
|
-
UNLOCK_ACHIEVEMENTS_DETECTION = 57
|
|
9002
|
+
PREVENT_GRID_ENTITY_RESPAWN = 44,
|
|
9003
|
+
ROOM_CLEAR_FRAME = 45,
|
|
9004
|
+
ROOM_HISTORY = 46,
|
|
9005
|
+
RUN_IN_N_FRAMES = 47,
|
|
9006
|
+
RUN_NEXT_ROOM = 48,
|
|
9007
|
+
RUN_NEXT_RUN = 49,
|
|
9008
|
+
SAVE_DATA_MANAGER = 50,
|
|
9009
|
+
SPAWN_ALT_ROCK_REWARDS = 51,
|
|
9010
|
+
STAGE_HISTORY = 52,
|
|
9011
|
+
START_AMBUSH = 53,
|
|
9012
|
+
TAINTED_LAZARUS_PLAYERS = 54,
|
|
9013
|
+
UNLOCK_ACHIEVEMENTS_DETECTION = 55
|
|
9017
9014
|
}
|
|
9018
9015
|
|
|
9019
9016
|
/**
|
|
@@ -9067,7 +9064,6 @@ declare interface ISCFeatureToClass {
|
|
|
9067
9064
|
[ISCFeature.PONY_DETECTION]: PonyDetection;
|
|
9068
9065
|
[ISCFeature.PRESS_INPUT]: PressInput;
|
|
9069
9066
|
[ISCFeature.PREVENT_CHILD_ENTITIES]: PreventChildEntities;
|
|
9070
|
-
[ISCFeature.PREVENT_COLLECTIBLE_ROTATION]: PreventCollectibleRotation;
|
|
9071
9067
|
[ISCFeature.PREVENT_GRID_ENTITY_RESPAWN]: PreventGridEntityRespawn;
|
|
9072
9068
|
[ISCFeature.ROOM_CLEAR_FRAME]: RoomClearFrame;
|
|
9073
9069
|
[ISCFeature.ROOM_HISTORY]: RoomHistory;
|
|
@@ -9076,7 +9072,6 @@ declare interface ISCFeatureToClass {
|
|
|
9076
9072
|
[ISCFeature.RUN_NEXT_RUN]: RunNextRun;
|
|
9077
9073
|
[ISCFeature.SAVE_DATA_MANAGER]: SaveDataManager;
|
|
9078
9074
|
[ISCFeature.SPAWN_ALT_ROCK_REWARDS]: SpawnRockAltRewards;
|
|
9079
|
-
[ISCFeature.SPAWN_COLLECTIBLE]: SpawnCollectible;
|
|
9080
9075
|
[ISCFeature.STAGE_HISTORY]: StageHistory;
|
|
9081
9076
|
[ISCFeature.START_AMBUSH]: StartAmbush;
|
|
9082
9077
|
[ISCFeature.TAINTED_LAZARUS_PLAYERS]: TaintedLazarusPlayers;
|
|
@@ -15511,31 +15506,14 @@ declare class PreventChildEntities extends Feature {
|
|
|
15511
15506
|
preventChildEntities(entity: Entity): void;
|
|
15512
15507
|
}
|
|
15513
15508
|
|
|
15514
|
-
|
|
15515
|
-
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
|
|
15522
|
-
private readonly postUseCardSoulOfIsaac;
|
|
15523
|
-
private readonly postDiceRoomActivated;
|
|
15524
|
-
private readonly postPickupChanged;
|
|
15525
|
-
/**
|
|
15526
|
-
* Helper function to prevent a collectible from being affected by Tainted Isaac's rotation
|
|
15527
|
-
* mechanic. (This mechanic also happens from Glitched Crown and Binge Eater.) This is useful
|
|
15528
|
-
* because quest items that are manually spawned by mods will be automatically be affected by this
|
|
15529
|
-
* mechanic.
|
|
15530
|
-
*
|
|
15531
|
-
* It is required to pass the intended collectible type to this function since it is possible for
|
|
15532
|
-
* collectibles to rotate on the first frame that they are spawned.
|
|
15533
|
-
*
|
|
15534
|
-
* In order to use this function, you must upgrade your mod with
|
|
15535
|
-
* `ISCFeature.PREVENT_COLLECTIBLE_ROTATION`.
|
|
15536
|
-
*/
|
|
15537
|
-
preventCollectibleRotation(collectible: EntityPickup, collectibleType: CollectibleType): void;
|
|
15538
|
-
}
|
|
15509
|
+
/**
|
|
15510
|
+
* Helper function to remove the rotation behavior from a collectible. This will happen by default
|
|
15511
|
+
* when collectibles are spawned when playing as Tainted Isaac or when having Binge Eater.
|
|
15512
|
+
*
|
|
15513
|
+
* Under the hood, this is accomplished by morphing the collectible with the `ignoreModifiers`
|
|
15514
|
+
* argument set to true.
|
|
15515
|
+
*/
|
|
15516
|
+
export declare function preventCollectibleRotation(collectible: EntityPickup): void;
|
|
15539
15517
|
|
|
15540
15518
|
declare class PreventGridEntityRespawn extends Feature {
|
|
15541
15519
|
private readonly runInNFrames;
|
|
@@ -17771,71 +17749,12 @@ export declare function spawnCoin(coinSubType: CoinSubType, positionOrGridIndex:
|
|
|
17771
17749
|
*/
|
|
17772
17750
|
export declare function spawnCoinWithSeed(coinSubType: CoinSubType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCoin;
|
|
17773
17751
|
|
|
17774
|
-
declare class SpawnCollectible extends Feature {
|
|
17775
|
-
private readonly preventCollectibleRotation;
|
|
17776
|
-
/**
|
|
17777
|
-
* Helper function to spawn a collectible.
|
|
17778
|
-
*
|
|
17779
|
-
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
17780
|
-
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
17781
|
-
* rotation mechanic.
|
|
17782
|
-
*
|
|
17783
|
-
* If you do not need to handle quest items being rotated (i.e. the collectible is guaranteed not
|
|
17784
|
-
* to be a quest item), then you can use the `spawnCollectibleUnsafe` helper function instead
|
|
17785
|
-
* (which does not require an upgraded mod).
|
|
17786
|
-
*
|
|
17787
|
-
* If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
|
|
17788
|
-
* `seedOrRNG` parameter.
|
|
17789
|
-
*
|
|
17790
|
-
* In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
|
|
17791
|
-
*
|
|
17792
|
-
* @param collectibleType The collectible type to spawn.
|
|
17793
|
-
* @param positionOrGridIndex The position or grid index to spawn the collectible at.
|
|
17794
|
-
* @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
17795
|
-
* `RNG.Next` method will be called. If `undefined` is provided, it will default
|
|
17796
|
-
* to a random seed.
|
|
17797
|
-
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
17798
|
-
* collectible. Default is false.
|
|
17799
|
-
* @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
17800
|
-
* Tainted Keeper. Default is false.
|
|
17801
|
-
* @param spawner Optional.
|
|
17802
|
-
*/
|
|
17803
|
-
spawnCollectible(collectibleType: CollectibleType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
17804
|
-
/**
|
|
17805
|
-
* Helper function to spawn a collectible from a specific item pool.
|
|
17806
|
-
*
|
|
17807
|
-
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
17808
|
-
* collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
|
|
17809
|
-
* rotation mechanic.
|
|
17810
|
-
*
|
|
17811
|
-
* If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
|
|
17812
|
-
* `seedOrRNG` parameter.
|
|
17813
|
-
*
|
|
17814
|
-
* In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
|
|
17815
|
-
*
|
|
17816
|
-
* @param itemPoolType The item pool to draw the collectible type from.
|
|
17817
|
-
* @param positionOrGridIndex The position or grid index to spawn the collectible at.
|
|
17818
|
-
* @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
17819
|
-
* `RNG.Next` method will be called. If `undefined` is provided, it will default
|
|
17820
|
-
* to a random seed.
|
|
17821
|
-
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
17822
|
-
* collectible. Default is false.
|
|
17823
|
-
* @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
17824
|
-
* Tainted Keeper. Default is false.
|
|
17825
|
-
* @param spawner Optional.
|
|
17826
|
-
*/
|
|
17827
|
-
spawnCollectibleFromPool(itemPoolType: ItemPoolType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
17828
|
-
}
|
|
17829
|
-
|
|
17830
17752
|
/**
|
|
17831
17753
|
* Helper function to spawn a collectible.
|
|
17832
17754
|
*
|
|
17833
17755
|
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
17834
|
-
* collectibles costing coins
|
|
17835
|
-
*
|
|
17836
|
-
* This function is unsafe because it will not correctly handle quest items being rotated by Tainted
|
|
17837
|
-
* Isaac's rotation mechanic. To handle that, use the `spawnCollectible` helper function instead
|
|
17838
|
-
* (which is provided by `ISCFeature.SPAWN_COLLECTIBLE`).
|
|
17756
|
+
* collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
|
|
17757
|
+
* rotation mechanic.
|
|
17839
17758
|
*
|
|
17840
17759
|
* If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
|
|
17841
17760
|
* `seedOrRNG` parameter.
|
|
@@ -17851,7 +17770,32 @@ declare class SpawnCollectible extends Feature {
|
|
|
17851
17770
|
* Tainted Keeper. Default is false.
|
|
17852
17771
|
* @param spawner Optional.
|
|
17853
17772
|
*/
|
|
17854
|
-
export declare function
|
|
17773
|
+
export declare function spawnCollectible(collectibleType: CollectibleType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
17774
|
+
|
|
17775
|
+
/**
|
|
17776
|
+
* Helper function to spawn a collectible from a specific item pool.
|
|
17777
|
+
*
|
|
17778
|
+
* Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
17779
|
+
* collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
|
|
17780
|
+
* rotation mechanic.
|
|
17781
|
+
*
|
|
17782
|
+
* If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
|
|
17783
|
+
* `seedOrRNG` parameter.
|
|
17784
|
+
*
|
|
17785
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
|
|
17786
|
+
*
|
|
17787
|
+
* @param itemPoolType The item pool to draw the collectible type from.
|
|
17788
|
+
* @param positionOrGridIndex The position or grid index to spawn the collectible at.
|
|
17789
|
+
* @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
17790
|
+
* `RNG.Next` method will be called. If `undefined` is provided, it will default to
|
|
17791
|
+
* a random seed.
|
|
17792
|
+
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
17793
|
+
* collectible. Default is false.
|
|
17794
|
+
* @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
17795
|
+
* Tainted Keeper. Default is false.
|
|
17796
|
+
* @param spawner Optional.
|
|
17797
|
+
*/
|
|
17798
|
+
export declare function spawnCollectibleFromPool(itemPoolType: ItemPoolType, positionOrGridIndex: Vector | int, seedOrRNG: Seed | RNG | undefined, options?: boolean, forceFreeItem?: boolean, spawner?: Entity): EntityPickupCollectible;
|
|
17855
17799
|
|
|
17856
17800
|
/** Helper function to spawn a `GridEntityType.CRAWL_SPACE` (18). */
|
|
17857
17801
|
export declare function spawnCrawlSpace(gridIndexOrPosition: int | Vector): GridEntity | undefined;
|