isaacscript-common 21.6.5 → 21.7.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 (39) hide show
  1. package/dist/index.rollup.d.ts +153 -99
  2. package/dist/isaacscript-common.lua +4175 -4084
  3. package/dist/src/callbackClasses.d.ts +1 -0
  4. package/dist/src/callbackClasses.d.ts.map +1 -1
  5. package/dist/src/callbackClasses.lua +5 -0
  6. package/dist/src/callbacks.d.ts +54 -53
  7. package/dist/src/callbacks.d.ts.map +1 -1
  8. package/dist/src/callbacks.lua +1 -0
  9. package/dist/src/classes/callbacks/PostPickupChanged.d.ts +8 -0
  10. package/dist/src/classes/callbacks/PostPickupChanged.d.ts.map +1 -0
  11. package/dist/src/classes/callbacks/PostPickupChanged.lua +20 -0
  12. package/dist/src/classes/features/callbackLogic/PickupChangeDetection.d.ts +18 -0
  13. package/dist/src/classes/features/callbackLogic/PickupChangeDetection.d.ts.map +1 -0
  14. package/dist/src/classes/features/callbackLogic/PickupChangeDetection.lua +47 -0
  15. package/dist/src/enums/ISCFeature.d.ts +47 -46
  16. package/dist/src/enums/ISCFeature.d.ts.map +1 -1
  17. package/dist/src/enums/ISCFeature.lua +48 -46
  18. package/dist/src/enums/ModCallbackCustom.d.ts +74 -53
  19. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  20. package/dist/src/enums/ModCallbackCustom.lua +55 -53
  21. package/dist/src/features.d.ts +49 -46
  22. package/dist/src/features.d.ts.map +1 -1
  23. package/dist/src/features.lua +3 -0
  24. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +5 -0
  25. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  26. package/dist/src/sets/entitiesWithArmorSet.lua +5 -5
  27. package/dist/src/shouldFire.d.ts +7 -1
  28. package/dist/src/shouldFire.d.ts.map +1 -1
  29. package/package.json +2 -2
  30. package/src/callbackClasses.ts +1 -0
  31. package/src/callbacks.ts +1 -0
  32. package/src/classes/callbacks/PostPickupChanged.ts +14 -0
  33. package/src/classes/features/callbackLogic/PickupChangeDetection.ts +61 -0
  34. package/src/enums/ISCFeature.ts +1 -0
  35. package/src/enums/ModCallbackCustom.ts +22 -0
  36. package/src/features.ts +6 -0
  37. package/src/interfaces/private/AddCallbackParametersCustom.ts +12 -0
  38. package/src/sets/entitiesWithArmorSet.ts +5 -5
  39. package/src/shouldFire.ts +8 -1
@@ -339,6 +339,11 @@ declare interface AddCallbackParametersCustom {
339
339
  playerVariant?: PlayerVariant,
340
340
  character?: PlayerType
341
341
  ];
342
+ [ModCallbackCustom.POST_PICKUP_CHANGED]: [
343
+ callback: (pickup: EntityPickup, oldVariant: PickupVariant, oldSubType: int, newVariant: PickupVariant, newSubType: int) => void,
344
+ pickupVariant?: PickupVariant,
345
+ subType?: int
346
+ ];
342
347
  [ModCallbackCustom.POST_PICKUP_COLLECT]: [
343
348
  callback: (pickup: EntityPickup, player: EntityPlayer) => void,
344
349
  pickupVariant?: PickupVariant,
@@ -7392,52 +7397,53 @@ export declare enum ISCFeature {
7392
7397
  GRID_ENTITY_UPDATE_DETECTION = 5,
7393
7398
  GAME_REORDERED_CALLBACKS = 6,
7394
7399
  ITEM_PICKUP_DETECTION = 7,
7395
- PLAYER_COLLECTIBLE_DETECTION = 8,
7396
- PLAYER_REORDERED_CALLBACKS = 9,
7397
- SLOT_DESTROYED_DETECTION = 10,
7398
- SLOT_RENDER_DETECTION = 11,
7399
- SLOT_UPDATE_DETECTION = 12,
7400
- CHARACTER_HEALTH_CONVERSION = 13,
7401
- CHARACTER_STATS = 14,
7402
- COLLECTIBLE_ITEM_POOL_TYPE = 15,
7403
- CUSTOM_GRID_ENTITIES = 16,
7404
- CUSTOM_ITEM_POOLS = 17,
7405
- CUSTOM_HOTKEYS = 18,
7406
- CUSTOM_PICKUPS = 19,
7407
- CUSTOM_STAGES = 20,
7408
- CUSTOM_TRAPDOORS = 21,
7409
- DEBUG_DISPLAY = 22,
7410
- DEPLOY_JSON_ROOM = 23,
7411
- DISABLE_ALL_SOUND = 24,
7412
- DISABLE_INPUTS = 25,
7413
- FADE_IN_REMOVER = 26,
7414
- FAST_RESET = 27,
7415
- FLYING_DETECTION = 28,
7416
- FORGOTTEN_SWITCH = 29,
7417
- EXTRA_CONSOLE_COMMANDS = 30,
7418
- ITEM_POOL_DETECTION = 31,
7419
- MODDED_ELEMENT_DETECTION = 32,
7420
- MODDED_ELEMENT_SETS = 33,
7421
- NO_SIREN_STEAL = 34,
7422
- PAUSE = 35,
7423
- PERSISTENT_ENTITIES = 36,
7424
- PICKUP_INDEX_CREATION = 37,
7425
- PLAYER_INVENTORY = 38,
7426
- PONY_DETECTION = 39,
7427
- PRESS_INPUT = 40,
7428
- PREVENT_CHILD_ENTITIES = 41,
7429
- PREVENT_COLLECTIBLE_ROTATION = 42,
7430
- PREVENT_GRID_ENTITY_RESPAWN = 43,
7431
- ROOM_CLEAR_FRAME = 44,
7432
- ROOM_HISTORY = 45,
7433
- RUN_IN_N_FRAMES = 46,
7434
- RUN_NEXT_ROOM = 47,
7435
- SAVE_DATA_MANAGER = 48,
7436
- SPAWN_ALT_ROCK_REWARDS = 49,
7437
- SPAWN_COLLECTIBLE = 50,
7438
- STAGE_HISTORY = 51,
7439
- START_AMBUSH = 52,
7440
- TAINTED_LAZARUS_PLAYERS = 53
7400
+ PICKUP_CHANGE_DETECTION = 8,
7401
+ PLAYER_COLLECTIBLE_DETECTION = 9,
7402
+ PLAYER_REORDERED_CALLBACKS = 10,
7403
+ SLOT_DESTROYED_DETECTION = 11,
7404
+ SLOT_RENDER_DETECTION = 12,
7405
+ SLOT_UPDATE_DETECTION = 13,
7406
+ CHARACTER_HEALTH_CONVERSION = 14,
7407
+ CHARACTER_STATS = 15,
7408
+ COLLECTIBLE_ITEM_POOL_TYPE = 16,
7409
+ CUSTOM_GRID_ENTITIES = 17,
7410
+ CUSTOM_ITEM_POOLS = 18,
7411
+ CUSTOM_HOTKEYS = 19,
7412
+ CUSTOM_PICKUPS = 20,
7413
+ CUSTOM_STAGES = 21,
7414
+ CUSTOM_TRAPDOORS = 22,
7415
+ DEBUG_DISPLAY = 23,
7416
+ DEPLOY_JSON_ROOM = 24,
7417
+ DISABLE_ALL_SOUND = 25,
7418
+ DISABLE_INPUTS = 26,
7419
+ FADE_IN_REMOVER = 27,
7420
+ FAST_RESET = 28,
7421
+ FLYING_DETECTION = 29,
7422
+ FORGOTTEN_SWITCH = 30,
7423
+ EXTRA_CONSOLE_COMMANDS = 31,
7424
+ ITEM_POOL_DETECTION = 32,
7425
+ MODDED_ELEMENT_DETECTION = 33,
7426
+ MODDED_ELEMENT_SETS = 34,
7427
+ NO_SIREN_STEAL = 35,
7428
+ PAUSE = 36,
7429
+ PERSISTENT_ENTITIES = 37,
7430
+ PICKUP_INDEX_CREATION = 38,
7431
+ PLAYER_INVENTORY = 39,
7432
+ PONY_DETECTION = 40,
7433
+ PRESS_INPUT = 41,
7434
+ PREVENT_CHILD_ENTITIES = 42,
7435
+ PREVENT_COLLECTIBLE_ROTATION = 43,
7436
+ PREVENT_GRID_ENTITY_RESPAWN = 44,
7437
+ ROOM_CLEAR_FRAME = 45,
7438
+ ROOM_HISTORY = 46,
7439
+ RUN_IN_N_FRAMES = 47,
7440
+ RUN_NEXT_ROOM = 48,
7441
+ SAVE_DATA_MANAGER = 49,
7442
+ SPAWN_ALT_ROCK_REWARDS = 50,
7443
+ SPAWN_COLLECTIBLE = 51,
7444
+ STAGE_HISTORY = 52,
7445
+ START_AMBUSH = 53,
7446
+ TAINTED_LAZARUS_PLAYERS = 54
7441
7447
  }
7442
7448
 
7443
7449
  /**
@@ -7455,6 +7461,7 @@ declare interface ISCFeatureToClass {
7455
7461
  [ISCFeature.GRID_ENTITY_UPDATE_DETECTION]: GridEntityUpdateDetection;
7456
7462
  [ISCFeature.GAME_REORDERED_CALLBACKS]: GameReorderedCallbacks;
7457
7463
  [ISCFeature.ITEM_PICKUP_DETECTION]: ItemPickupDetection;
7464
+ [ISCFeature.PICKUP_CHANGE_DETECTION]: PickupChangeDetection;
7458
7465
  [ISCFeature.PLAYER_COLLECTIBLE_DETECTION]: PlayerCollectibleDetection;
7459
7466
  [ISCFeature.PLAYER_REORDERED_CALLBACKS]: PlayerReorderedCallbacks;
7460
7467
  [ISCFeature.SLOT_DESTROYED_DETECTION]: SlotDestroyedDetection;
@@ -9884,6 +9891,27 @@ export declare enum ModCallbackCustom {
9884
9891
  * ```
9885
9892
  */
9886
9893
  POST_PEFFECT_UPDATE_REORDERED = 56,
9894
+ /**
9895
+ * Fires from the `POST_PICKUP_UPDATE` callback when a pickup has a different variant or sub-type
9896
+ * than what it was on the previous frame.
9897
+ *
9898
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
9899
+ * - You can provide an optional third argument that will make the callback only fire if the new
9900
+ * pickup matches the `PickupVariant` provided.
9901
+ * - You can provide an optional third argument that will make the callback only fire if the new
9902
+ * pickup matches the sub-type provided.
9903
+ *
9904
+ * ```ts
9905
+ * function postPickupChanged(
9906
+ * pickup: EntityPickup,
9907
+ * oldVariant: PickupVariant,
9908
+ * oldSubType: int,
9909
+ * newVariant: PickupVariant,
9910
+ * newSubType: int,
9911
+ * ): void {}
9912
+ * ```
9913
+ */
9914
+ POST_PICKUP_CHANGED = 57,
9887
9915
  /**
9888
9916
  * Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
9889
9917
  *
@@ -9902,7 +9930,7 @@ export declare enum ModCallbackCustom {
9902
9930
  * function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
9903
9931
  * ```
9904
9932
  */
9905
- POST_PICKUP_COLLECT = 57,
9933
+ POST_PICKUP_COLLECT = 58,
9906
9934
  /**
9907
9935
  * The exact same thing as the vanilla `POST_PICKUP_INIT` callback, except this callback allows
9908
9936
  * you to specify extra arguments for additional filtration.
@@ -9917,7 +9945,7 @@ export declare enum ModCallbackCustom {
9917
9945
  * function postPickupInitFilter(pickup: EntityPickup): void {}
9918
9946
  * ```
9919
9947
  */
9920
- POST_PICKUP_INIT_FILTER = 58,
9948
+ POST_PICKUP_INIT_FILTER = 59,
9921
9949
  /**
9922
9950
  * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
9923
9951
  * respective pickup on the run.
@@ -9935,7 +9963,7 @@ export declare enum ModCallbackCustom {
9935
9963
  * function postPickupInitFirst(pickup: EntityPickup): void {}
9936
9964
  * ```
9937
9965
  */
9938
- POST_PICKUP_INIT_FIRST = 59,
9966
+ POST_PICKUP_INIT_FIRST = 60,
9939
9967
  /**
9940
9968
  * Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
9941
9969
  *
@@ -9952,7 +9980,7 @@ export declare enum ModCallbackCustom {
9952
9980
  * function postPickupInitLate(pickup: EntityPickup): void {}
9953
9981
  * ```
9954
9982
  */
9955
- POST_PICKUP_INIT_LATE = 60,
9983
+ POST_PICKUP_INIT_LATE = 61,
9956
9984
  /**
9957
9985
  * The exact same thing as the vanilla `POST_PICKUP_RENDER` callback, except this callback allows
9958
9986
  * you to specify extra arguments for additional filtration.
@@ -9967,7 +9995,7 @@ export declare enum ModCallbackCustom {
9967
9995
  * function postPickupRenderFilter(pickup: EntityPickup, renderOffset: Vector): void {}
9968
9996
  * ```
9969
9997
  */
9970
- POST_PICKUP_RENDER_FILTER = 61,
9998
+ POST_PICKUP_RENDER_FILTER = 62,
9971
9999
  /**
9972
10000
  * The exact same thing as the vanilla `POST_PICKUP_SELECTION` callback, except this callback
9973
10001
  * allows you to specify extra arguments for additional filtration.
@@ -9986,7 +10014,7 @@ export declare enum ModCallbackCustom {
9986
10014
  * ): [PickupVariant, int] | undefined {}
9987
10015
  * ```
9988
10016
  */
9989
- POST_PICKUP_SELECTION_FILTER = 62,
10017
+ POST_PICKUP_SELECTION_FILTER = 63,
9990
10018
  /**
9991
10019
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
9992
10020
  * on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
@@ -10005,7 +10033,7 @@ export declare enum ModCallbackCustom {
10005
10033
  * ): void {}
10006
10034
  * ```
10007
10035
  */
10008
- POST_PICKUP_STATE_CHANGED = 63,
10036
+ POST_PICKUP_STATE_CHANGED = 64,
10009
10037
  /**
10010
10038
  * The exact same thing as the vanilla `POST_PICKUP_UPDATE` callback, except this callback allows
10011
10039
  * you to specify extra arguments for additional filtration.
@@ -10020,7 +10048,7 @@ export declare enum ModCallbackCustom {
10020
10048
  * function postPickupUpdateFilter(pickup: EntityPickup): void {}
10021
10049
  * ```
10022
10050
  */
10023
- POST_PICKUP_UPDATE_FILTER = 64,
10051
+ POST_PICKUP_UPDATE_FILTER = 65,
10024
10052
  /**
10025
10053
  * Fires from the `POST_RENDER` callback on every frame that a pit exists.
10026
10054
  *
@@ -10032,7 +10060,7 @@ export declare enum ModCallbackCustom {
10032
10060
  * function postPitRender(pit: GridEntityPit): void {}
10033
10061
  * ```
10034
10062
  */
10035
- POST_PIT_RENDER = 65,
10063
+ POST_PIT_RENDER = 66,
10036
10064
  /**
10037
10065
  * Fires from the `POST_UPDATE` callback on every frame that a pit exists.
10038
10066
  *
@@ -10044,7 +10072,7 @@ export declare enum ModCallbackCustom {
10044
10072
  * function postPitUpdate(pit: GridEntityPit): void {}
10045
10073
  * ```
10046
10074
  */
10047
- POST_PIT_UPDATE = 66,
10075
+ POST_PIT_UPDATE = 67,
10048
10076
  /**
10049
10077
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's health (i.e. hearts) is
10050
10078
  * different than what it was on the previous frame. For more information, see the `PlayerHealth`
@@ -10066,7 +10094,7 @@ export declare enum ModCallbackCustom {
10066
10094
  * ): void {}
10067
10095
  * ```
10068
10096
  */
10069
- POST_PLAYER_CHANGE_HEALTH = 67,
10097
+ POST_PLAYER_CHANGE_HEALTH = 68,
10070
10098
  /**
10071
10099
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when one of the player's stats change
10072
10100
  * from what they were on the previous frame.
@@ -10096,7 +10124,7 @@ export declare enum ModCallbackCustom {
10096
10124
  * ) => void {}
10097
10125
  * ```
10098
10126
  */
10099
- POST_PLAYER_CHANGE_STAT = 68,
10127
+ POST_PLAYER_CHANGE_STAT = 69,
10100
10128
  /**
10101
10129
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player entity changes its player
10102
10130
  * type
@@ -10119,7 +10147,7 @@ export declare enum ModCallbackCustom {
10119
10147
  * ): void {}
10120
10148
  * ```
10121
10149
  */
10122
- POST_PLAYER_CHANGE_TYPE = 69,
10150
+ POST_PLAYER_CHANGE_TYPE = 70,
10123
10151
  /**
10124
10152
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
10125
10153
  * higher than what it was on the previous frame, or when the active items change, or when the
@@ -10136,7 +10164,7 @@ export declare enum ModCallbackCustom {
10136
10164
  * ): void {}
10137
10165
  * ```
10138
10166
  */
10139
- POST_PLAYER_COLLECTIBLE_ADDED = 70,
10167
+ POST_PLAYER_COLLECTIBLE_ADDED = 71,
10140
10168
  /**
10141
10169
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
10142
10170
  * lower than what it was on the previous frame, or when the active items change, or when the
@@ -10153,7 +10181,7 @@ export declare enum ModCallbackCustom {
10153
10181
  * ): void {}
10154
10182
  * ```
10155
10183
  */
10156
- POST_PLAYER_COLLECTIBLE_REMOVED = 71,
10184
+ POST_PLAYER_COLLECTIBLE_REMOVED = 72,
10157
10185
  /**
10158
10186
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
10159
10187
  * prevent the fatal damage.
@@ -10171,7 +10199,7 @@ export declare enum ModCallbackCustom {
10171
10199
  * function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
10172
10200
  * ```
10173
10201
  */
10174
- POST_PLAYER_FATAL_DAMAGE = 72,
10202
+ POST_PLAYER_FATAL_DAMAGE = 73,
10175
10203
  /**
10176
10204
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
10177
10205
  * `POST_PLAYER_INIT_LATE` callback, with two changes:
@@ -10193,7 +10221,7 @@ export declare enum ModCallbackCustom {
10193
10221
  * function postPlayerInitFirst(player: EntityPlayer): void {}
10194
10222
  * ```
10195
10223
  */
10196
- POST_PLAYER_INIT_FIRST = 73,
10224
+ POST_PLAYER_INIT_FIRST = 74,
10197
10225
  /**
10198
10226
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
10199
10227
  *
@@ -10213,7 +10241,7 @@ export declare enum ModCallbackCustom {
10213
10241
  * function postPlayerInitLate(pickup: EntityPickup): void {}
10214
10242
  * ```
10215
10243
  */
10216
- POST_PLAYER_INIT_LATE = 74,
10244
+ POST_PLAYER_INIT_LATE = 75,
10217
10245
  /**
10218
10246
  * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
10219
10247
  * callback fires (if the player is spawning on the 0th game frame of the run).
@@ -10237,7 +10265,7 @@ export declare enum ModCallbackCustom {
10237
10265
  * function postPlayerRenderReordered(player: EntityPlayer): void {}
10238
10266
  * ```
10239
10267
  */
10240
- POST_PLAYER_RENDER_REORDERED = 75,
10268
+ POST_PLAYER_RENDER_REORDERED = 76,
10241
10269
  /**
10242
10270
  * Similar to the vanilla callback of the same name, but fires after the
10243
10271
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -10262,7 +10290,7 @@ export declare enum ModCallbackCustom {
10262
10290
  * function postPlayerUpdateReordered(player: EntityPlayer): void {}
10263
10291
  * ```
10264
10292
  */
10265
- POST_PLAYER_UPDATE_REORDERED = 76,
10293
+ POST_PLAYER_UPDATE_REORDERED = 77,
10266
10294
  /**
10267
10295
  * Fires from the `POST_RENDER` callback on every frame that a poop exists.
10268
10296
  *
@@ -10274,7 +10302,7 @@ export declare enum ModCallbackCustom {
10274
10302
  * function postPoopRender(poop: GridEntityPoop): void {}
10275
10303
  * ```
10276
10304
  */
10277
- POST_POOP_RENDER = 77,
10305
+ POST_POOP_RENDER = 78,
10278
10306
  /**
10279
10307
  * Fires from the `POST_UPDATE` callback on every frame that a poop exists.
10280
10308
  *
@@ -10286,7 +10314,7 @@ export declare enum ModCallbackCustom {
10286
10314
  * function postPoopUpdate(poop: GridEntityPoop): void {}
10287
10315
  * ```
10288
10316
  */
10289
- POST_POOP_UPDATE = 78,
10317
+ POST_POOP_UPDATE = 79,
10290
10318
  /**
10291
10319
  * Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
10292
10320
  *
@@ -10298,7 +10326,7 @@ export declare enum ModCallbackCustom {
10298
10326
  * function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
10299
10327
  * ```
10300
10328
  */
10301
- POST_PRESSURE_PLATE_RENDER = 79,
10329
+ POST_PRESSURE_PLATE_RENDER = 80,
10302
10330
  /**
10303
10331
  * Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
10304
10332
  *
@@ -10310,7 +10338,7 @@ export declare enum ModCallbackCustom {
10310
10338
  * function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
10311
10339
  * ```
10312
10340
  */
10313
- POST_PRESSURE_PLATE_UPDATE = 80,
10341
+ POST_PRESSURE_PLATE_UPDATE = 81,
10314
10342
  /**
10315
10343
  * Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
10316
10344
  *
@@ -10327,7 +10355,7 @@ export declare enum ModCallbackCustom {
10327
10355
  * function postProjectileInitLate(projectile: EntityProjectile): void {}
10328
10356
  * ```
10329
10357
  */
10330
- POST_PROJECTILE_INIT_LATE = 81,
10358
+ POST_PROJECTILE_INIT_LATE = 82,
10331
10359
  /**
10332
10360
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player first picks up a new
10333
10361
  * item. The pickup returned in the callback is assumed to be the first pickup that no longer
@@ -10343,7 +10371,7 @@ export declare enum ModCallbackCustom {
10343
10371
  * function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
10344
10372
  * ```
10345
10373
  */
10346
- POST_PURCHASE = 82,
10374
+ POST_PURCHASE = 83,
10347
10375
  /**
10348
10376
  * Fires from the `POST_RENDER` callback on every frame that a rock exists.
10349
10377
  *
@@ -10357,7 +10385,7 @@ export declare enum ModCallbackCustom {
10357
10385
  * function postRockRender(rock: GridEntityRock): void {}
10358
10386
  * ```
10359
10387
  */
10360
- POST_ROCK_RENDER = 83,
10388
+ POST_ROCK_RENDER = 84,
10361
10389
  /**
10362
10390
  * Fires from the `POST_UPDATE` callback on every frame that a rock exists.
10363
10391
  *
@@ -10371,7 +10399,7 @@ export declare enum ModCallbackCustom {
10371
10399
  * function postRockUpdate(rock: GridEntityRock): void {}
10372
10400
  * ```
10373
10401
  */
10374
- POST_ROCK_UPDATE = 84,
10402
+ POST_ROCK_UPDATE = 85,
10375
10403
  /**
10376
10404
  * Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
10377
10405
  * the `Room.IsClear` method).
@@ -10388,7 +10416,7 @@ export declare enum ModCallbackCustom {
10388
10416
  * function postRoomClearChanged(roomClear: boolean): void {}
10389
10417
  * ```
10390
10418
  */
10391
- POST_ROOM_CLEAR_CHANGED = 85,
10419
+ POST_ROOM_CLEAR_CHANGED = 86,
10392
10420
  /**
10393
10421
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
10394
10422
  * Room.
@@ -10403,7 +10431,7 @@ export declare enum ModCallbackCustom {
10403
10431
  * function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
10404
10432
  * ```
10405
10433
  */
10406
- POST_SACRIFICE = 86,
10434
+ POST_SACRIFICE = 87,
10407
10435
  /**
10408
10436
  * Fires from the `POST_RENDER` callback when a slot entity's animation changes.
10409
10437
  *
@@ -10421,7 +10449,7 @@ export declare enum ModCallbackCustom {
10421
10449
  * ): void {}
10422
10450
  * ```
10423
10451
  */
10424
- POST_SLOT_ANIMATION_CHANGED = 87,
10452
+ POST_SLOT_ANIMATION_CHANGED = 88,
10425
10453
  /**
10426
10454
  * Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
10427
10455
  * (It will not fire if any other type of entity collides with the slot entity.)
@@ -10445,7 +10473,7 @@ export declare enum ModCallbackCustom {
10445
10473
  * ): void {}
10446
10474
  * ```
10447
10475
  */
10448
- POST_SLOT_COLLISION = 88,
10476
+ POST_SLOT_COLLISION = 89,
10449
10477
  /**
10450
10478
  * Fires from the `POST_SLOT_UPDATE` or the `POST_ENTITY_REMOVE` callback when a slot machine is
10451
10479
  * destroyed or a beggar is removed.
@@ -10487,7 +10515,7 @@ export declare enum ModCallbackCustom {
10487
10515
  * function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
10488
10516
  * ```
10489
10517
  */
10490
- POST_SLOT_DESTROYED = 89,
10518
+ POST_SLOT_DESTROYED = 90,
10491
10519
  /**
10492
10520
  * Fires when a new slot entity is initialized. Specifically, this is either:
10493
10521
  *
@@ -10506,7 +10534,7 @@ export declare enum ModCallbackCustom {
10506
10534
  * function postSlotInit(slot: Entity): void {}
10507
10535
  * ```
10508
10536
  */
10509
- POST_SLOT_INIT = 90,
10537
+ POST_SLOT_INIT = 91,
10510
10538
  /**
10511
10539
  * Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
10512
10540
  *
@@ -10520,7 +10548,7 @@ export declare enum ModCallbackCustom {
10520
10548
  * function postSlotRender(slot: Entity): void {}
10521
10549
  * ```
10522
10550
  */
10523
- POST_SLOT_RENDER = 91,
10551
+ POST_SLOT_RENDER = 92,
10524
10552
  /**
10525
10553
  * Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
10526
10554
  *
@@ -10534,7 +10562,7 @@ export declare enum ModCallbackCustom {
10534
10562
  * function postSlotUpdate(slot: Entity): void {}
10535
10563
  * ```
10536
10564
  */
10537
- POST_SLOT_UPDATE = 92,
10565
+ POST_SLOT_UPDATE = 93,
10538
10566
  /**
10539
10567
  * Fires from the `POST_RENDER` callback on every frame that spikes exist.
10540
10568
  *
@@ -10546,7 +10574,7 @@ export declare enum ModCallbackCustom {
10546
10574
  * function postSpikesRender(spikes: GridEntitySpikes): void {}
10547
10575
  * ```
10548
10576
  */
10549
- POST_SPIKES_RENDER = 93,
10577
+ POST_SPIKES_RENDER = 94,
10550
10578
  /**
10551
10579
  * Fires from the `POST_UPDATE` callback on every frame that spikes exist.
10552
10580
  *
@@ -10558,7 +10586,7 @@ export declare enum ModCallbackCustom {
10558
10586
  * function postSpikesUpdate(spikes: GridEntitySpikes): void {}
10559
10587
  * ```
10560
10588
  */
10561
- POST_SPIKES_UPDATE = 94,
10589
+ POST_SPIKES_UPDATE = 95,
10562
10590
  /**
10563
10591
  * Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
10564
10592
  * `EntityTear.FrameCount` is equal to 0).
@@ -10576,7 +10604,7 @@ export declare enum ModCallbackCustom {
10576
10604
  * function postTearInitLate(tear: EntityTear): void {}
10577
10605
  * ```
10578
10606
  */
10579
- POST_TEAR_INIT_LATE = 95,
10607
+ POST_TEAR_INIT_LATE = 96,
10580
10608
  /**
10581
10609
  * Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
10582
10610
  * `EntityTear.FrameCount` is equal to 1).
@@ -10593,7 +10621,7 @@ export declare enum ModCallbackCustom {
10593
10621
  * function postTearInitVeryLate(tear: EntityTear): void {}
10594
10622
  * ```
10595
10623
  */
10596
- POST_TEAR_INIT_VERY_LATE = 96,
10624
+ POST_TEAR_INIT_VERY_LATE = 97,
10597
10625
  /**
10598
10626
  * Fires from the `POST_RENDER` callback on every frame that a TNT exists.
10599
10627
  *
@@ -10605,7 +10633,7 @@ export declare enum ModCallbackCustom {
10605
10633
  * function postTNTRender(tnt: GridEntityTNT): void {}
10606
10634
  * ```
10607
10635
  */
10608
- POST_TNT_RENDER = 97,
10636
+ POST_TNT_RENDER = 98,
10609
10637
  /**
10610
10638
  * Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
10611
10639
  *
@@ -10617,7 +10645,7 @@ export declare enum ModCallbackCustom {
10617
10645
  * function postTNTUpdate(tnt: GridEntityTNT): void {}
10618
10646
  * ```
10619
10647
  */
10620
- POST_TNT_UPDATE = 98,
10648
+ POST_TNT_UPDATE = 99,
10621
10649
  /**
10622
10650
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player gains or loses a new
10623
10651
  * transformation.
@@ -10636,7 +10664,7 @@ export declare enum ModCallbackCustom {
10636
10664
  * ): void {}
10637
10665
  * ```
10638
10666
  */
10639
- POST_TRANSFORMATION = 99,
10667
+ POST_TRANSFORMATION = 100,
10640
10668
  /**
10641
10669
  * Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
10642
10670
  *
@@ -10651,7 +10679,7 @@ export declare enum ModCallbackCustom {
10651
10679
  * ): void {}
10652
10680
  * ```
10653
10681
  */
10654
- POST_TRINKET_BREAK = 100,
10682
+ POST_TRINKET_BREAK = 101,
10655
10683
  /**
10656
10684
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback on the frame before a Berserk effect
10657
10685
  * ends when the player is predicted to die (e.g. they currently have no health left or they took
@@ -10667,7 +10695,7 @@ export declare enum ModCallbackCustom {
10667
10695
  * function preBerserkDeath(player: EntityPlayer): void {}
10668
10696
  * ```
10669
10697
  */
10670
- PRE_BERSERK_DEATH = 101,
10698
+ PRE_BERSERK_DEATH = 102,
10671
10699
  /**
10672
10700
  * Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
10673
10701
  * to initiate a custom revival, return an integer that corresponds to the item or type of revival
@@ -10686,7 +10714,7 @@ export declare enum ModCallbackCustom {
10686
10714
  * function preCustomRevive(player: EntityPlayer): int | undefined {}
10687
10715
  * ```
10688
10716
  */
10689
- PRE_CUSTOM_REVIVE = 102,
10717
+ PRE_CUSTOM_REVIVE = 103,
10690
10718
  /**
10691
10719
  * The exact same thing as the vanilla `PRE_ENTITY_SPAWN` callback, except this callback allows
10692
10720
  * you to specify extra arguments for additional filtration.
@@ -10711,7 +10739,7 @@ export declare enum ModCallbackCustom {
10711
10739
  * ): [EntityType, int, int, int] | undefined {}
10712
10740
  * ```
10713
10741
  */
10714
- PRE_ENTITY_SPAWN_FILTER = 103,
10742
+ PRE_ENTITY_SPAWN_FILTER = 104,
10715
10743
  /**
10716
10744
  * Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
10717
10745
  * meets all of the conditions to pick it up.
@@ -10731,7 +10759,7 @@ export declare enum ModCallbackCustom {
10731
10759
  * function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
10732
10760
  * ```
10733
10761
  */
10734
- PRE_GET_PEDESTAL = 104,
10762
+ PRE_GET_PEDESTAL = 105,
10735
10763
  /**
10736
10764
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item becomes queued (i.e. when
10737
10765
  * the player begins to hold the item above their head).
@@ -10751,7 +10779,7 @@ export declare enum ModCallbackCustom {
10751
10779
  * ): void {}
10752
10780
  * ```
10753
10781
  */
10754
- PRE_ITEM_PICKUP = 105,
10782
+ PRE_ITEM_PICKUP = 106,
10755
10783
  /**
10756
10784
  * Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
10757
10785
  * player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
@@ -10765,7 +10793,7 @@ export declare enum ModCallbackCustom {
10765
10793
  * function preNewLevel(player: EntityPlayer): void {}
10766
10794
  * ```
10767
10795
  */
10768
- PRE_NEW_LEVEL = 106,
10796
+ PRE_NEW_LEVEL = 107,
10769
10797
  /**
10770
10798
  * The exact same thing as the vanilla `PRE_NPC_COLLISION` callback, except this callback allows
10771
10799
  * you to specify extra arguments for additional filtration.
@@ -10786,7 +10814,7 @@ export declare enum ModCallbackCustom {
10786
10814
  * ): boolean | undefined {}
10787
10815
  * ```
10788
10816
  */
10789
- PRE_NPC_COLLISION_FILTER = 107,
10817
+ PRE_NPC_COLLISION_FILTER = 108,
10790
10818
  /**
10791
10819
  * The exact same thing as the vanilla `PRE_NPC_UPDATE` callback, except this callback allows you
10792
10820
  * to specify extra arguments for additional filtration.
@@ -10803,7 +10831,7 @@ export declare enum ModCallbackCustom {
10803
10831
  * function preNPCUpdateFilter(entity: Entity): boolean | undefined {}
10804
10832
  * ```
10805
10833
  */
10806
- PRE_NPC_UPDATE_FILTER = 108,
10834
+ PRE_NPC_UPDATE_FILTER = 109,
10807
10835
  /**
10808
10836
  * The exact same thing as the vanilla `PRE_ROOM_ENTITY_SPAWN` callback, except this callback
10809
10837
  * allows you to specify extra arguments for additional filtration.
@@ -10826,7 +10854,7 @@ export declare enum ModCallbackCustom {
10826
10854
  * ): [EntityType | GridEntityXMLType, int, int] | undefined {}
10827
10855
  * ```
10828
10856
  */
10829
- PRE_ROOM_ENTITY_SPAWN_FILTER = 109
10857
+ PRE_ROOM_ENTITY_SPAWN_FILTER = 110
10830
10858
  }
10831
10859
 
10832
10860
  /**
@@ -12120,6 +12148,19 @@ export declare interface PickingUpItemTrinket {
12120
12148
  subType: TrinketType;
12121
12149
  }
12122
12150
 
12151
+ declare class PickupChangeDetection extends Feature {
12152
+ v: {
12153
+ room: {
12154
+ pickupVariants: Map<PickupIndex, PickupVariant>;
12155
+ pickupSubTypes: Map<PickupIndex, number>;
12156
+ };
12157
+ };
12158
+ private postPickupChanged;
12159
+ private pickupIndexCreation;
12160
+ constructor(postPickupChanged: PostPickupChanged, pickupIndexCreation: PickupIndexCreation);
12161
+ private postPickupUpdate;
12162
+ }
12163
+
12123
12164
  /**
12124
12165
  * `PickupIndex` is a specific type of number that represents a unique identifier for a pickup. Mods
12125
12166
  * can signify that data structures handle collectibles by using this type.
@@ -12506,6 +12547,11 @@ declare class PostPEffectUpdateReordered extends CustomCallback<ModCallbackCusto
12506
12547
  protected shouldFire: typeof shouldFirePlayer;
12507
12548
  }
12508
12549
 
12550
+ declare class PostPickupChanged extends CustomCallback<ModCallbackCustom.POST_PICKUP_CHANGED> {
12551
+ constructor();
12552
+ protected shouldFire: typeof shouldFirePickup;
12553
+ }
12554
+
12509
12555
  declare class PostPlayerCollectibleAdded extends CustomCallback<ModCallbackCustom.POST_PLAYER_COLLECTIBLE_ADDED> {
12510
12556
  constructor();
12511
12557
  protected shouldFire: typeof shouldFireCollectibleType;
@@ -14391,6 +14437,14 @@ newState: int
14391
14437
 
14392
14438
  declare function shouldFireItemPickup(fireArgs: [player: EntityPlayer, pickingUpItem: PickingUpItem], optionalArgs: [itemType?: ItemType, subType?: int]): boolean;
14393
14439
 
14440
+ declare function shouldFirePickup(fireArgs: [pickup: EntityPickup] | [pickup: EntityPickup, renderOffset: Vector] | [pickup: EntityPickup, player: EntityPlayer] | [pickup: EntityPickup, previousState: int, currentState: int] | [
14441
+ pickup: EntityPickup,
14442
+ oldVariant: PickupVariant,
14443
+ oldSubType: int,
14444
+ newVariant: PickupVariant,
14445
+ newSubType: int
14446
+ ], optionalArgs: [pickupVariant?: PickupVariant, subType?: int]): boolean;
14447
+
14394
14448
  declare function shouldFirePlayer(fireArgs: [player: EntityPlayer] | [player: EntityPlayer, numSacrifices: int] | [player: EntityPlayer, collectible: EntityPickupCollectible] | [player: EntityPlayer, oldCharacter: PlayerType, newCharacter: PlayerType] | [
14395
14449
  player: EntityPlayer,
14396
14450
  healthType: HealthType,