isaacscript-common 15.0.4 → 15.1.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.
Files changed (29) hide show
  1. package/dist/index.d.ts +93 -49
  2. package/dist/isaacscript-common.lua +161 -53
  3. package/dist/src/callbacks.d.ts +52 -48
  4. package/dist/src/callbacks.d.ts.map +1 -1
  5. package/dist/src/callbacks.lua +6 -0
  6. package/dist/src/classes/callbacks/PostNPCInitFilter.d.ts +14 -0
  7. package/dist/src/classes/callbacks/PostNPCInitFilter.d.ts.map +1 -0
  8. package/dist/src/classes/callbacks/PostNPCInitFilter.lua +26 -0
  9. package/dist/src/classes/callbacks/PostNPCUpdateFilter.d.ts +14 -0
  10. package/dist/src/classes/callbacks/PostNPCUpdateFilter.d.ts.map +1 -0
  11. package/dist/src/classes/callbacks/PostNPCUpdateFilter.lua +26 -0
  12. package/dist/src/enums/ModCallbackCustom.d.ts +74 -48
  13. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  14. package/dist/src/enums/ModCallbackCustom.lua +52 -48
  15. package/dist/src/functions/gridEntities.d.ts +4 -0
  16. package/dist/src/functions/gridEntities.d.ts.map +1 -1
  17. package/dist/src/functions/gridEntities.lua +48 -4
  18. package/dist/src/functions/math.d.ts +1 -1
  19. package/dist/src/functions/math.lua +1 -1
  20. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +12 -0
  21. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  22. package/package.json +1 -1
  23. package/src/callbacks.ts +4 -0
  24. package/src/classes/callbacks/PostNPCInitFilter.ts +27 -0
  25. package/src/classes/callbacks/PostNPCUpdateFilter.ts +27 -0
  26. package/src/enums/ModCallbackCustom.ts +28 -0
  27. package/src/functions/gridEntities.ts +68 -13
  28. package/src/functions/math.ts +1 -1
  29. package/src/interfaces/private/AddCallbackParametersCustom.ts +14 -0
package/dist/index.d.ts CHANGED
@@ -271,6 +271,12 @@ declare interface AddCallbackParametersCustom {
271
271
  [ModCallbackCustom.POST_NEW_LEVEL_REORDERED]: [callback: () => void];
272
272
  [ModCallbackCustom.POST_NEW_ROOM_EARLY]: [callback: () => void];
273
273
  [ModCallbackCustom.POST_NEW_ROOM_REORDERED]: [callback: () => void];
274
+ [ModCallbackCustom.POST_NPC_INIT_FILTER]: [
275
+ callback: (npc: EntityNPC) => void,
276
+ entityType?: EntityType,
277
+ variant?: int,
278
+ subType?: int
279
+ ];
274
280
  [ModCallbackCustom.POST_NPC_INIT_LATE]: [
275
281
  callback: (npc: EntityNPC) => void,
276
282
  entityType?: EntityType,
@@ -283,6 +289,12 @@ declare interface AddCallbackParametersCustom {
283
289
  variant?: int,
284
290
  subType?: int
285
291
  ];
292
+ [ModCallbackCustom.POST_NPC_UPDATE_FILTER]: [
293
+ callback: (npc: EntityNPC) => void,
294
+ entityType?: EntityType,
295
+ variant?: int,
296
+ subType?: int
297
+ ];
286
298
  [ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED]: [
287
299
  callback: (player: EntityPlayer) => void,
288
300
  playerVariant?: PlayerVariant,
@@ -4704,6 +4716,9 @@ export declare function getGridEntities(...gridEntityTypes: GridEntityType[]): G
4704
4716
  */
4705
4717
  export declare function getGridEntitiesExcept(...gridEntityTypes: GridEntityType[]): GridEntity[];
4706
4718
 
4719
+ /** Helper function to get all grid entities in a given radius around a given point. */
4720
+ export declare function getGridEntitiesInRadius(targetPosition: Vector, radius: number): GridEntity[];
4721
+
4707
4722
  /**
4708
4723
  * Helper function to get a map of every grid entity in the current room. The indexes of the map are
4709
4724
  * equal to the grid index. The values of the map are equal to the grid entities.
@@ -4713,6 +4728,9 @@ export declare function getGridEntitiesExcept(...gridEntityTypes: GridEntityType
4713
4728
  */
4714
4729
  export declare function getGridEntitiesMap(...gridEntityTypes: GridEntityType[]): Map<int, GridEntity>;
4715
4730
 
4731
+ /** Helper function to get the top left and bottom right corners of a given grid entity. */
4732
+ export declare function getGridEntityCollisionPoints(gridEntity: GridEntity): [topLeft: Vector, bottomRight: Vector];
4733
+
4716
4734
  /** Helper function to get a string containing the grid entity's type and variant. */
4717
4735
  export declare function getGridEntityID(gridEntity: GridEntity): string;
4718
4736
 
@@ -9164,6 +9182,19 @@ export declare enum ModCallbackCustom {
9164
9182
  * ```
9165
9183
  */
9166
9184
  POST_NEW_ROOM_REORDERED = 44,
9185
+ /**
9186
+ * The exact same thing as the vanilla `POST_NPC_INIT` callback, except this callback allows you
9187
+ * to specify extra arguments for additional filtration.
9188
+ *
9189
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
9190
+ * - You can provide an optional third argument that will make the callback only fire if it
9191
+ * matches the `EntityType` provided.
9192
+ * - You can provide an optional fourth argument that will make the callback only fire if it
9193
+ * matches the variant provided.
9194
+ * - You can provide an optional fifth argument that will make the callback only fire if it
9195
+ * matches the sub-type provided.
9196
+ */
9197
+ POST_NPC_INIT_FILTER = 45,
9167
9198
  /**
9168
9199
  * Fires on the first `NPC_UPDATE` frame for each NPC.
9169
9200
  *
@@ -9182,7 +9213,7 @@ export declare enum ModCallbackCustom {
9182
9213
  * function postNPCInitLate(npc: EntityNPC): void {}
9183
9214
  * ```
9184
9215
  */
9185
- POST_NPC_INIT_LATE = 45,
9216
+ POST_NPC_INIT_LATE = 46,
9186
9217
  /**
9187
9218
  * Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
9188
9219
  * the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
@@ -9203,7 +9234,20 @@ export declare enum ModCallbackCustom {
9203
9234
  * ): void {}
9204
9235
  * ```
9205
9236
  */
9206
- POST_NPC_STATE_CHANGED = 46,
9237
+ POST_NPC_STATE_CHANGED = 47,
9238
+ /**
9239
+ * The exact same thing as the vanilla `POST_NPC_UPDATE` callback, except this callback allows you
9240
+ * to specify extra arguments for additional filtration.
9241
+ *
9242
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
9243
+ * - You can provide an optional third argument that will make the callback only fire if it
9244
+ * matches the `EntityType` provided.
9245
+ * - You can provide an optional fourth argument that will make the callback only fire if it
9246
+ * matches the variant provided.
9247
+ * - You can provide an optional fifth argument that will make the callback only fire if it
9248
+ * matches the sub-type provided.
9249
+ */
9250
+ POST_NPC_UPDATE_FILTER = 48,
9207
9251
  /**
9208
9252
  * Similar to the vanilla callback of the same name, but fires after the
9209
9253
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -9228,7 +9272,7 @@ export declare enum ModCallbackCustom {
9228
9272
  * function postPEffectUpdateReordered(player: EntityPlayer): void {}
9229
9273
  * ```
9230
9274
  */
9231
- POST_PEFFECT_UPDATE_REORDERED = 47,
9275
+ POST_PEFFECT_UPDATE_REORDERED = 49,
9232
9276
  /**
9233
9277
  * Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
9234
9278
  *
@@ -9244,7 +9288,7 @@ export declare enum ModCallbackCustom {
9244
9288
  * function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
9245
9289
  * ```
9246
9290
  */
9247
- POST_PICKUP_COLLECT = 48,
9291
+ POST_PICKUP_COLLECT = 50,
9248
9292
  /**
9249
9293
  * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
9250
9294
  * respective pickup on the run.
@@ -9262,7 +9306,7 @@ export declare enum ModCallbackCustom {
9262
9306
  * function postPickupInitFirst(pickup: EntityPickup): void {}
9263
9307
  * ```
9264
9308
  */
9265
- POST_PICKUP_INIT_FIRST = 49,
9309
+ POST_PICKUP_INIT_FIRST = 51,
9266
9310
  /**
9267
9311
  * Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
9268
9312
  *
@@ -9279,7 +9323,7 @@ export declare enum ModCallbackCustom {
9279
9323
  * function postPickupInitLate(pickup: EntityPickup): void {}
9280
9324
  * ```
9281
9325
  */
9282
- POST_PICKUP_INIT_LATE = 50,
9326
+ POST_PICKUP_INIT_LATE = 52,
9283
9327
  /**
9284
9328
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
9285
9329
  * on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
@@ -9298,7 +9342,7 @@ export declare enum ModCallbackCustom {
9298
9342
  * ): void {}
9299
9343
  * ```
9300
9344
  */
9301
- POST_PICKUP_STATE_CHANGED = 51,
9345
+ POST_PICKUP_STATE_CHANGED = 53,
9302
9346
  /**
9303
9347
  * Fires from the `POST_RENDER` callback on every frame that a pit exists.
9304
9348
  *
@@ -9310,7 +9354,7 @@ export declare enum ModCallbackCustom {
9310
9354
  * function postPitRender(pit: GridEntityPit): void {}
9311
9355
  * ```
9312
9356
  */
9313
- POST_PIT_RENDER = 52,
9357
+ POST_PIT_RENDER = 54,
9314
9358
  /**
9315
9359
  * Fires from the `POST_UPDATE` callback on every frame that a pit exists.
9316
9360
  *
@@ -9322,7 +9366,7 @@ export declare enum ModCallbackCustom {
9322
9366
  * function postPitUpdate(pit: GridEntityPit): void {}
9323
9367
  * ```
9324
9368
  */
9325
- POST_PIT_UPDATE = 53,
9369
+ POST_PIT_UPDATE = 55,
9326
9370
  /**
9327
9371
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player's health (i.e. hearts) is different
9328
9372
  * than what it was on the previous frame. For more information, see the `PlayerHealth` enum.
@@ -9343,7 +9387,7 @@ export declare enum ModCallbackCustom {
9343
9387
  * ): void {}
9344
9388
  * ```
9345
9389
  */
9346
- POST_PLAYER_CHANGE_HEALTH = 54,
9390
+ POST_PLAYER_CHANGE_HEALTH = 56,
9347
9391
  /**
9348
9392
  * Fires from the `POST_PEFFECT_UPDATE` callback when one of the player's stats change from what
9349
9393
  * they were on the previous frame.
@@ -9373,7 +9417,7 @@ export declare enum ModCallbackCustom {
9373
9417
  * ) => void {}
9374
9418
  * ```
9375
9419
  */
9376
- POST_PLAYER_CHANGE_STAT = 55,
9420
+ POST_PLAYER_CHANGE_STAT = 57,
9377
9421
  /**
9378
9422
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player entity changes its player type
9379
9423
  * (i.e. character) from what it was on the previous frame. For example, it will fire after using
@@ -9395,7 +9439,7 @@ export declare enum ModCallbackCustom {
9395
9439
  * ): void {}
9396
9440
  * ```
9397
9441
  */
9398
- POST_PLAYER_CHANGE_TYPE = 56,
9442
+ POST_PLAYER_CHANGE_TYPE = 58,
9399
9443
  /**
9400
9444
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is higher than
9401
9445
  * what it was on the previous frame, or when the active items change, or when the build is
@@ -9412,7 +9456,7 @@ export declare enum ModCallbackCustom {
9412
9456
  * ): void {}
9413
9457
  * ```
9414
9458
  */
9415
- POST_PLAYER_COLLECTIBLE_ADDED = 57,
9459
+ POST_PLAYER_COLLECTIBLE_ADDED = 59,
9416
9460
  /**
9417
9461
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is lower than
9418
9462
  * what it was on the previous frame, or when the active items change, or when the build is
@@ -9429,7 +9473,7 @@ export declare enum ModCallbackCustom {
9429
9473
  * ): void {}
9430
9474
  * ```
9431
9475
  */
9432
- POST_PLAYER_COLLECTIBLE_REMOVED = 58,
9476
+ POST_PLAYER_COLLECTIBLE_REMOVED = 60,
9433
9477
  /**
9434
9478
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
9435
9479
  * prevent the fatal damage.
@@ -9447,7 +9491,7 @@ export declare enum ModCallbackCustom {
9447
9491
  * function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
9448
9492
  * ```
9449
9493
  */
9450
- POST_PLAYER_FATAL_DAMAGE = 59,
9494
+ POST_PLAYER_FATAL_DAMAGE = 61,
9451
9495
  /**
9452
9496
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
9453
9497
  * `POST_PLAYER_INIT_LATE` callback, with two changes:
@@ -9469,7 +9513,7 @@ export declare enum ModCallbackCustom {
9469
9513
  * function postPlayerInitFirst(player: EntityPlayer): void {}
9470
9514
  * ```
9471
9515
  */
9472
- POST_PLAYER_INIT_FIRST = 60,
9516
+ POST_PLAYER_INIT_FIRST = 62,
9473
9517
  /**
9474
9518
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
9475
9519
  *
@@ -9489,7 +9533,7 @@ export declare enum ModCallbackCustom {
9489
9533
  * function postPlayerInitLate(pickup: EntityPickup): void {}
9490
9534
  * ```
9491
9535
  */
9492
- POST_PLAYER_INIT_LATE = 61,
9536
+ POST_PLAYER_INIT_LATE = 63,
9493
9537
  /**
9494
9538
  * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
9495
9539
  * callback fires (if the player is spawning on the 0th game frame of the run).
@@ -9513,7 +9557,7 @@ export declare enum ModCallbackCustom {
9513
9557
  * function postPlayerRenderReordered(player: EntityPlayer): void {}
9514
9558
  * ```
9515
9559
  */
9516
- POST_PLAYER_RENDER_REORDERED = 62,
9560
+ POST_PLAYER_RENDER_REORDERED = 64,
9517
9561
  /**
9518
9562
  * Similar to the vanilla callback of the same name, but fires after the
9519
9563
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -9538,7 +9582,7 @@ export declare enum ModCallbackCustom {
9538
9582
  * function postPlayerUpdateReordered(player: EntityPlayer): void {}
9539
9583
  * ```
9540
9584
  */
9541
- POST_PLAYER_UPDATE_REORDERED = 63,
9585
+ POST_PLAYER_UPDATE_REORDERED = 65,
9542
9586
  /**
9543
9587
  * Fires from the `POST_RENDER` callback on every frame that a poop exists.
9544
9588
  *
@@ -9550,7 +9594,7 @@ export declare enum ModCallbackCustom {
9550
9594
  * function postPoopRender(poop: GridEntityPoop): void {}
9551
9595
  * ```
9552
9596
  */
9553
- POST_POOP_RENDER = 64,
9597
+ POST_POOP_RENDER = 66,
9554
9598
  /**
9555
9599
  * Fires from the `POST_UPDATE` callback on every frame that a poop exists.
9556
9600
  *
@@ -9562,7 +9606,7 @@ export declare enum ModCallbackCustom {
9562
9606
  * function postPoopUpdate(poop: GridEntityPoop): void {}
9563
9607
  * ```
9564
9608
  */
9565
- POST_POOP_UPDATE = 65,
9609
+ POST_POOP_UPDATE = 67,
9566
9610
  /**
9567
9611
  * Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
9568
9612
  *
@@ -9574,7 +9618,7 @@ export declare enum ModCallbackCustom {
9574
9618
  * function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
9575
9619
  * ```
9576
9620
  */
9577
- POST_PRESSURE_PLATE_RENDER = 66,
9621
+ POST_PRESSURE_PLATE_RENDER = 68,
9578
9622
  /**
9579
9623
  * Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
9580
9624
  *
@@ -9586,7 +9630,7 @@ export declare enum ModCallbackCustom {
9586
9630
  * function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
9587
9631
  * ```
9588
9632
  */
9589
- POST_PRESSURE_PLATE_UPDATE = 67,
9633
+ POST_PRESSURE_PLATE_UPDATE = 69,
9590
9634
  /**
9591
9635
  * Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
9592
9636
  *
@@ -9603,7 +9647,7 @@ export declare enum ModCallbackCustom {
9603
9647
  * function postProjectileInitLate(projectile: EntityProjectile): void {}
9604
9648
  * ```
9605
9649
  */
9606
- POST_PROJECTILE_INIT_LATE = 68,
9650
+ POST_PROJECTILE_INIT_LATE = 70,
9607
9651
  /**
9608
9652
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player first picks up a new item. The
9609
9653
  * pickup returned in the callback is assumed to be the first pickup that no longer exists.
@@ -9618,7 +9662,7 @@ export declare enum ModCallbackCustom {
9618
9662
  * function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
9619
9663
  * ```
9620
9664
  */
9621
- POST_PURCHASE = 69,
9665
+ POST_PURCHASE = 71,
9622
9666
  /**
9623
9667
  * Fires from the `POST_RENDER` callback on every frame that a rock exists.
9624
9668
  *
@@ -9632,7 +9676,7 @@ export declare enum ModCallbackCustom {
9632
9676
  * function postRockRender(rock: GridEntityRock): void {}
9633
9677
  * ```
9634
9678
  */
9635
- POST_ROCK_RENDER = 70,
9679
+ POST_ROCK_RENDER = 72,
9636
9680
  /**
9637
9681
  * Fires from the `POST_UPDATE` callback on every frame that a rock exists.
9638
9682
  *
@@ -9646,7 +9690,7 @@ export declare enum ModCallbackCustom {
9646
9690
  * function postRockUpdate(rock: GridEntityRock): void {}
9647
9691
  * ```
9648
9692
  */
9649
- POST_ROCK_UPDATE = 71,
9693
+ POST_ROCK_UPDATE = 73,
9650
9694
  /**
9651
9695
  * Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
9652
9696
  * the `Room.IsClear` method).
@@ -9663,7 +9707,7 @@ export declare enum ModCallbackCustom {
9663
9707
  * function postRoomClearChanged(roomClear: boolean): void {}
9664
9708
  * ```
9665
9709
  */
9666
- POST_ROOM_CLEAR_CHANGED = 72,
9710
+ POST_ROOM_CLEAR_CHANGED = 74,
9667
9711
  /**
9668
9712
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
9669
9713
  * Room.
@@ -9678,7 +9722,7 @@ export declare enum ModCallbackCustom {
9678
9722
  * function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
9679
9723
  * ```
9680
9724
  */
9681
- POST_SACRIFICE = 73,
9725
+ POST_SACRIFICE = 75,
9682
9726
  /**
9683
9727
  * Fires from the `POST_RENDER` callback when a slot entity's animation changes.
9684
9728
  *
@@ -9692,7 +9736,7 @@ export declare enum ModCallbackCustom {
9692
9736
  * function postSlotAnimationChanged(slot: Entity): void {}
9693
9737
  * ```
9694
9738
  */
9695
- POST_SLOT_ANIMATION_CHANGED = 74,
9739
+ POST_SLOT_ANIMATION_CHANGED = 76,
9696
9740
  /**
9697
9741
  * Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
9698
9742
  * (It will not fire if any other type of entity collides with the slot entity.)
@@ -9716,7 +9760,7 @@ export declare enum ModCallbackCustom {
9716
9760
  * ): void {}
9717
9761
  * ```
9718
9762
  */
9719
- POST_SLOT_COLLISION = 75,
9763
+ POST_SLOT_COLLISION = 77,
9720
9764
  /**
9721
9765
  * Fires from the `POST_RENDER` callback when a slot plays the animation that indicates that it
9722
9766
  * has broken.
@@ -9731,7 +9775,7 @@ export declare enum ModCallbackCustom {
9731
9775
  * function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
9732
9776
  * ```
9733
9777
  */
9734
- POST_SLOT_DESTROYED = 76,
9778
+ POST_SLOT_DESTROYED = 78,
9735
9779
  /**
9736
9780
  * Fires when a new slot entity is initialized. Specifically, this is either:
9737
9781
  *
@@ -9750,7 +9794,7 @@ export declare enum ModCallbackCustom {
9750
9794
  * function postSlotInit(slot: Entity): void {}
9751
9795
  * ```
9752
9796
  */
9753
- POST_SLOT_INIT = 77,
9797
+ POST_SLOT_INIT = 79,
9754
9798
  /**
9755
9799
  * Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
9756
9800
  *
@@ -9764,7 +9808,7 @@ export declare enum ModCallbackCustom {
9764
9808
  * function postSlotRender(slot: Entity): void {}
9765
9809
  * ```
9766
9810
  */
9767
- POST_SLOT_RENDER = 78,
9811
+ POST_SLOT_RENDER = 80,
9768
9812
  /**
9769
9813
  * Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
9770
9814
  *
@@ -9778,7 +9822,7 @@ export declare enum ModCallbackCustom {
9778
9822
  * function postSlotUpdate(slot: Entity): void {}
9779
9823
  * ```
9780
9824
  */
9781
- POST_SLOT_UPDATE = 79,
9825
+ POST_SLOT_UPDATE = 81,
9782
9826
  /**
9783
9827
  * Fires from the `POST_RENDER` callback on every frame that spikes exist.
9784
9828
  *
@@ -9790,7 +9834,7 @@ export declare enum ModCallbackCustom {
9790
9834
  * function postSpikesRender(spikes: GridEntitySpikes): void {}
9791
9835
  * ```
9792
9836
  */
9793
- POST_SPIKES_RENDER = 80,
9837
+ POST_SPIKES_RENDER = 82,
9794
9838
  /**
9795
9839
  * Fires from the `POST_UPDATE` callback on every frame that spikes exist.
9796
9840
  *
@@ -9802,7 +9846,7 @@ export declare enum ModCallbackCustom {
9802
9846
  * function postSpikesUpdate(spikes: GridEntitySpikes): void {}
9803
9847
  * ```
9804
9848
  */
9805
- POST_SPIKES_UPDATE = 81,
9849
+ POST_SPIKES_UPDATE = 83,
9806
9850
  /**
9807
9851
  * Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
9808
9852
  * `EntityTear.FrameCount` is equal to 0).
@@ -9820,7 +9864,7 @@ export declare enum ModCallbackCustom {
9820
9864
  * function postTearInitLate(tear: EntityTear): void {}
9821
9865
  * ```
9822
9866
  */
9823
- POST_TEAR_INIT_LATE = 82,
9867
+ POST_TEAR_INIT_LATE = 84,
9824
9868
  /**
9825
9869
  * Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
9826
9870
  * `EntityTear.FrameCount` is equal to 1).
@@ -9837,7 +9881,7 @@ export declare enum ModCallbackCustom {
9837
9881
  * function postTearInitVeryLate(tear: EntityTear): void {}
9838
9882
  * ```
9839
9883
  */
9840
- POST_TEAR_INIT_VERY_LATE = 83,
9884
+ POST_TEAR_INIT_VERY_LATE = 85,
9841
9885
  /**
9842
9886
  * Fires from the `POST_RENDER` callback on every frame that a TNT exists.
9843
9887
  *
@@ -9849,7 +9893,7 @@ export declare enum ModCallbackCustom {
9849
9893
  * function postTNTRender(tnt: GridEntityTNT): void {}
9850
9894
  * ```
9851
9895
  */
9852
- POST_TNT_RENDER = 84,
9896
+ POST_TNT_RENDER = 86,
9853
9897
  /**
9854
9898
  * Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
9855
9899
  *
@@ -9861,7 +9905,7 @@ export declare enum ModCallbackCustom {
9861
9905
  * function postTNTUpdate(tnt: GridEntityTNT): void {}
9862
9906
  * ```
9863
9907
  */
9864
- POST_TNT_UPDATE = 85,
9908
+ POST_TNT_UPDATE = 87,
9865
9909
  /**
9866
9910
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player gains or loses a new
9867
9911
  * transformation.
@@ -9880,7 +9924,7 @@ export declare enum ModCallbackCustom {
9880
9924
  * ): void {}
9881
9925
  * ```
9882
9926
  */
9883
- POST_TRANSFORMATION = 86,
9927
+ POST_TRANSFORMATION = 88,
9884
9928
  /**
9885
9929
  * Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
9886
9930
  *
@@ -9895,7 +9939,7 @@ export declare enum ModCallbackCustom {
9895
9939
  * ): void {}
9896
9940
  * ```
9897
9941
  */
9898
- POST_TRINKET_BREAK = 87,
9942
+ POST_TRINKET_BREAK = 89,
9899
9943
  /**
9900
9944
  * Fires from the `POST_PEFFECT_UPDATE` callback on the frame before a Berserk effect ends when
9901
9945
  * the player is predicted to die (e.g. they currently have no health left or they took damage in
@@ -9911,7 +9955,7 @@ export declare enum ModCallbackCustom {
9911
9955
  * function preBerserkDeath(player: EntityPlayer): void {}
9912
9956
  * ```
9913
9957
  */
9914
- PRE_BERSERK_DEATH = 88,
9958
+ PRE_BERSERK_DEATH = 90,
9915
9959
  /**
9916
9960
  * Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
9917
9961
  * to initiate a custom revival, return an integer that corresponds to the item or type of revival
@@ -9930,7 +9974,7 @@ export declare enum ModCallbackCustom {
9930
9974
  * function preCustomRevive(player: EntityPlayer): int | undefined {}
9931
9975
  * ```
9932
9976
  */
9933
- PRE_CUSTOM_REVIVE = 89,
9977
+ PRE_CUSTOM_REVIVE = 91,
9934
9978
  /**
9935
9979
  * Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
9936
9980
  * meets all of the conditions to pick it up.
@@ -9950,7 +9994,7 @@ export declare enum ModCallbackCustom {
9950
9994
  * function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
9951
9995
  * ```
9952
9996
  */
9953
- PRE_GET_PEDESTAL = 90,
9997
+ PRE_GET_PEDESTAL = 92,
9954
9998
  /**
9955
9999
  * Fires from the `POST_PEFFECT_UPDATE` callback when an item becomes queued (i.e. when the player
9956
10000
  * begins to hold the item above their head).
@@ -9970,7 +10014,7 @@ export declare enum ModCallbackCustom {
9970
10014
  * ): void {}
9971
10015
  * ```
9972
10016
  */
9973
- PRE_ITEM_PICKUP = 91,
10017
+ PRE_ITEM_PICKUP = 93,
9974
10018
  /**
9975
10019
  * Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
9976
10020
  * player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
@@ -9984,7 +10028,7 @@ export declare enum ModCallbackCustom {
9984
10028
  * function preNewLevel(player: EntityPlayer): void {}
9985
10029
  * ```
9986
10030
  */
9987
- PRE_NEW_LEVEL = 92
10031
+ PRE_NEW_LEVEL = 94
9988
10032
  }
9989
10033
 
9990
10034
  /**
@@ -12306,7 +12350,7 @@ export declare function roomUpdateSafe(): void;
12306
12350
  * From: http://lua-users.org/wiki/SimpleRound
12307
12351
  *
12308
12352
  * @param num The number to round.
12309
- * @param numDecimalPlaces Default is 0.
12353
+ * @param numDecimalPlaces Optional. Default is 0.
12310
12354
  */
12311
12355
  export declare function round(num: float, numDecimalPlaces?: number): float;
12312
12356