isaacscript-common 27.12.0 → 28.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.
Files changed (74) hide show
  1. package/dist/index.rollup.d.ts +244 -76
  2. package/dist/isaacscript-common.lua +393 -133
  3. package/dist/src/callbackClasses.d.ts +8 -0
  4. package/dist/src/callbackClasses.d.ts.map +1 -1
  5. package/dist/src/callbackClasses.lua +40 -0
  6. package/dist/src/callbacks.d.ts +78 -70
  7. package/dist/src/callbacks.d.ts.map +1 -1
  8. package/dist/src/callbacks.lua +9 -1
  9. package/dist/src/classes/callbacks/PostItemDischarge.d.ts +1 -1
  10. package/dist/src/classes/callbacks/PostKnifeInitFilter.d.ts +9 -0
  11. package/dist/src/classes/callbacks/PostKnifeInitFilter.d.ts.map +1 -0
  12. package/dist/src/classes/callbacks/PostKnifeInitFilter.lua +23 -0
  13. package/dist/src/classes/callbacks/PostKnifeRenderFilter.d.ts +9 -0
  14. package/dist/src/classes/callbacks/PostKnifeRenderFilter.d.ts.map +1 -0
  15. package/dist/src/classes/callbacks/PostKnifeRenderFilter.lua +23 -0
  16. package/dist/src/classes/callbacks/PostKnifeUpdateFilter.d.ts +9 -0
  17. package/dist/src/classes/callbacks/PostKnifeUpdateFilter.d.ts.map +1 -0
  18. package/dist/src/classes/callbacks/PostKnifeUpdateFilter.lua +23 -0
  19. package/dist/src/classes/callbacks/PostNPCStateChanged.d.ts +2 -2
  20. package/dist/src/classes/callbacks/PostTearInitFilter.d.ts +9 -0
  21. package/dist/src/classes/callbacks/PostTearInitFilter.d.ts.map +1 -0
  22. package/dist/src/classes/callbacks/PostTearInitFilter.lua +23 -0
  23. package/dist/src/classes/callbacks/PostTearRenderFilter.d.ts +9 -0
  24. package/dist/src/classes/callbacks/PostTearRenderFilter.d.ts.map +1 -0
  25. package/dist/src/classes/callbacks/PostTearRenderFilter.lua +23 -0
  26. package/dist/src/classes/callbacks/PostTearUpdateFilter.d.ts +9 -0
  27. package/dist/src/classes/callbacks/PostTearUpdateFilter.d.ts.map +1 -0
  28. package/dist/src/classes/callbacks/PostTearUpdateFilter.lua +23 -0
  29. package/dist/src/classes/callbacks/PreKnifeCollisionFilter.d.ts +9 -0
  30. package/dist/src/classes/callbacks/PreKnifeCollisionFilter.d.ts.map +1 -0
  31. package/dist/src/classes/callbacks/PreKnifeCollisionFilter.lua +21 -0
  32. package/dist/src/classes/callbacks/PreTearCollisionFilter.d.ts +9 -0
  33. package/dist/src/classes/callbacks/PreTearCollisionFilter.d.ts.map +1 -0
  34. package/dist/src/classes/callbacks/PreTearCollisionFilter.lua +21 -0
  35. package/dist/src/classes/features/other/customStages/v.d.ts.map +1 -1
  36. package/dist/src/classes/features/other/extraConsoleCommands/v.d.ts.map +1 -1
  37. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
  38. package/dist/src/core/constants.d.ts +1 -1
  39. package/dist/src/core/constants.lua +1 -1
  40. package/dist/src/enums/ModCallbackCustom.d.ts +198 -70
  41. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  42. package/dist/src/enums/ModCallbackCustom.lua +86 -70
  43. package/dist/src/functions/mergeTests.lua +14 -14
  44. package/dist/src/functions/npcs.d.ts +2 -2
  45. package/dist/src/functions/npcs.lua +6 -6
  46. package/dist/src/functions/types.d.ts +3 -3
  47. package/dist/src/functions/types.lua +2 -2
  48. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +40 -0
  49. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  50. package/dist/src/shouldFire.d.ts +3 -3
  51. package/dist/src/shouldFire.d.ts.map +1 -1
  52. package/package.json +2 -2
  53. package/src/callbackClasses.ts +8 -0
  54. package/src/callbacks.ts +8 -0
  55. package/src/classes/callbacks/PostItemDischarge.ts +1 -1
  56. package/src/classes/callbacks/PostKnifeInitFilter.ts +22 -0
  57. package/src/classes/callbacks/PostKnifeRenderFilter.ts +22 -0
  58. package/src/classes/callbacks/PostKnifeUpdateFilter.ts +22 -0
  59. package/src/classes/callbacks/PostNPCStateChanged.ts +2 -2
  60. package/src/classes/callbacks/PostTearInitFilter.ts +22 -0
  61. package/src/classes/callbacks/PostTearRenderFilter.ts +22 -0
  62. package/src/classes/callbacks/PostTearUpdateFilter.ts +22 -0
  63. package/src/classes/callbacks/PreKnifeCollisionFilter.ts +24 -0
  64. package/src/classes/callbacks/PreTearCollisionFilter.ts +24 -0
  65. package/src/classes/features/other/customStages/v.ts +2 -0
  66. package/src/classes/features/other/extraConsoleCommands/v.ts +2 -0
  67. package/src/classes/private/CustomCallback.ts +4 -0
  68. package/src/core/constants.ts +1 -1
  69. package/src/enums/ModCallbackCustom.ts +136 -0
  70. package/src/functions/mergeTests.ts +14 -14
  71. package/src/functions/npcs.ts +6 -6
  72. package/src/functions/types.ts +3 -3
  73. package/src/interfaces/private/AddCallbackParametersCustom.ts +56 -0
  74. package/src/shouldFire.ts +12 -3
@@ -900,6 +900,21 @@ export declare enum ModCallbackCustom {
900
900
  * ```
901
901
  */
902
902
  POST_KEYBOARD_CHANGED = 51,
903
+ /**
904
+ * The exact same thing as the vanilla `POST_KNIFE_INIT` callback, except this callback allows you
905
+ * to specify extra arguments for additional filtration.
906
+ *
907
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
908
+ * - You can provide an optional third argument that will make the callback only fire if it
909
+ * matches the `KnifeVariant` provided.
910
+ * - You can provide an optional fourth argument that will make the callback only fire if it
911
+ * matches the sub-type provided.
912
+ *
913
+ * ```ts
914
+ * function postKnifeInitFilter(knife: EntityKnife): void {}
915
+ * ```
916
+ */
917
+ POST_KNIFE_INIT_FILTER = 52,
903
918
  /**
904
919
  * Fires on the first `POST_KNIFE_UPDATE` frame for each knife.
905
920
  *
@@ -916,7 +931,37 @@ export declare enum ModCallbackCustom {
916
931
  * function postKnifeInitLate(knife: EntityKnife): void {}
917
932
  * ```
918
933
  */
919
- POST_KNIFE_INIT_LATE = 52,
934
+ POST_KNIFE_INIT_LATE = 53,
935
+ /**
936
+ * The exact same thing as the vanilla `POST_KNIFE_RENDER` callback, except this callback allows
937
+ * you to specify extra arguments for additional filtration.
938
+ *
939
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
940
+ * - You can provide an optional third argument that will make the callback only fire if it
941
+ * matches the `KnifeVariant` provided.
942
+ * - You can provide an optional fourth argument that will make the callback only fire if it
943
+ * matches the sub-type provided.
944
+ *
945
+ * ```ts
946
+ * function postKnifeRenderFilter(knife: EntityKnife, renderOffset: Vector): void {}
947
+ * ```
948
+ */
949
+ POST_KNIFE_RENDER_FILTER = 54,
950
+ /**
951
+ * The exact same thing as the vanilla `POST_KNIFE_UPDATE` callback, except this callback allows
952
+ * you to specify extra arguments for additional filtration.
953
+ *
954
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
955
+ * - You can provide an optional third argument that will make the callback only fire if it
956
+ * matches the `KnifeVariant` provided.
957
+ * - You can provide an optional fourth argument that will make the callback only fire if it
958
+ * matches the sub-type provided.
959
+ *
960
+ * ```ts
961
+ * function postKnifeUpdateFilter(knife: EntityKnife): void {}
962
+ * ```
963
+ */
964
+ POST_KNIFE_UPDATE_FILTER = 55,
920
965
  /**
921
966
  * The exact same thing as the vanilla `POST_LASER_INIT` callback, except this callback allows you
922
967
  * to specify extra arguments for additional filtration.
@@ -931,7 +976,7 @@ export declare enum ModCallbackCustom {
931
976
  * function postLaserInitFilter(laser: EntityLaser): void {}
932
977
  * ```
933
978
  */
934
- POST_LASER_INIT_FILTER = 53,
979
+ POST_LASER_INIT_FILTER = 56,
935
980
  /**
936
981
  * Fires on the first `POST_LASER_UPDATE` frame for each laser.
937
982
  *
@@ -948,7 +993,7 @@ export declare enum ModCallbackCustom {
948
993
  * function postLaserInitLate(laser: EntityLaser): void {}
949
994
  * ```
950
995
  */
951
- POST_LASER_INIT_LATE = 54,
996
+ POST_LASER_INIT_LATE = 57,
952
997
  /**
953
998
  * The exact same thing as the vanilla `POST_LASER_RENDER` callback, except this callback allows
954
999
  * you to specify extra arguments for additional filtration.
@@ -963,7 +1008,7 @@ export declare enum ModCallbackCustom {
963
1008
  * function postLaserRenderFilter(laser: EntityLaser, renderOffset: Vector): void {}
964
1009
  * ```
965
1010
  */
966
- POST_LASER_RENDER_FILTER = 55,
1011
+ POST_LASER_RENDER_FILTER = 58,
967
1012
  /**
968
1013
  * The exact same thing as the vanilla `POST_LASER_UPDATE` callback, except this callback allows
969
1014
  * you to specify extra arguments for additional filtration.
@@ -978,7 +1023,7 @@ export declare enum ModCallbackCustom {
978
1023
  * function postLaserUpdateFilter(laser: EntityLaser): void {}
979
1024
  * ```
980
1025
  */
981
- POST_LASER_UPDATE_FILTER = 56,
1026
+ POST_LASER_UPDATE_FILTER = 59,
982
1027
  /**
983
1028
  * The same as the vanilla callback of the same name, but fires in the correct order with respect
984
1029
  * to the `POST_GAME_STARTED` and the `POST_NEW_ROOM` callbacks:
@@ -1004,7 +1049,7 @@ export declare enum ModCallbackCustom {
1004
1049
  * function postNewLevelReordered(stage: LevelStage, stageType: StageType): void {}
1005
1050
  * ```
1006
1051
  */
1007
- POST_NEW_LEVEL_REORDERED = 57,
1052
+ POST_NEW_LEVEL_REORDERED = 60,
1008
1053
  /**
1009
1054
  * Fires on the first `POST_NEW_ROOM` or `PRE_ENTITY_SPAWN` callback where being in a new room is
1010
1055
  * detected. This is useful because the vanilla `POST_NEW_ROOM` callback fires only after entities
@@ -1021,7 +1066,7 @@ export declare enum ModCallbackCustom {
1021
1066
  * function postNewRoomEarly(roomType: RoomType): void {}
1022
1067
  * ```
1023
1068
  */
1024
- POST_NEW_ROOM_EARLY = 58,
1069
+ POST_NEW_ROOM_EARLY = 61,
1025
1070
  /**
1026
1071
  * The same as the vanilla callback of the same name, but fires in the correct order with respect
1027
1072
  * to the `POST_GAME_STARTED` and the `POST_NEW_LEVEL` callbacks:
@@ -1044,7 +1089,7 @@ export declare enum ModCallbackCustom {
1044
1089
  * function postNewRoomReordered(roomType: RoomType): void {}
1045
1090
  * ```
1046
1091
  */
1047
- POST_NEW_ROOM_REORDERED = 59,
1092
+ POST_NEW_ROOM_REORDERED = 62,
1048
1093
  /**
1049
1094
  * The exact same thing as the vanilla `POST_NPC_DEATH` callback, except this callback allows you
1050
1095
  * to specify extra arguments for additional filtration.
@@ -1061,7 +1106,7 @@ export declare enum ModCallbackCustom {
1061
1106
  * function postNPCDeathFilter(npc: EntityNPC): void {}
1062
1107
  * ```
1063
1108
  */
1064
- POST_NPC_DEATH_FILTER = 60,
1109
+ POST_NPC_DEATH_FILTER = 63,
1065
1110
  /**
1066
1111
  * The exact same thing as the vanilla `POST_NPC_INIT` callback, except this callback allows you
1067
1112
  * to specify extra arguments for additional filtration.
@@ -1078,7 +1123,7 @@ export declare enum ModCallbackCustom {
1078
1123
  * function postNPCInitFilter(npc: EntityNPC): void {}
1079
1124
  * ```
1080
1125
  */
1081
- POST_NPC_INIT_FILTER = 61,
1126
+ POST_NPC_INIT_FILTER = 64,
1082
1127
  /**
1083
1128
  * Fires on the first `NPC_UPDATE` frame for each NPC.
1084
1129
  *
@@ -1097,7 +1142,7 @@ export declare enum ModCallbackCustom {
1097
1142
  * function postNPCInitLate(npc: EntityNPC): void {}
1098
1143
  * ```
1099
1144
  */
1100
- POST_NPC_INIT_LATE = 62,
1145
+ POST_NPC_INIT_LATE = 65,
1101
1146
  /**
1102
1147
  * The exact same thing as the vanilla `POST_NPC_RENDER` callback, except this callback allows you
1103
1148
  * to specify extra arguments for additional filtration.
@@ -1114,7 +1159,7 @@ export declare enum ModCallbackCustom {
1114
1159
  * function postNPCRenderFilter(npc: EntityNPC, renderOffset: Vector): void {}
1115
1160
  * ```
1116
1161
  */
1117
- POST_NPC_RENDER_FILTER = 63,
1162
+ POST_NPC_RENDER_FILTER = 66,
1118
1163
  /**
1119
1164
  * Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
1120
1165
  * the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
@@ -1135,7 +1180,7 @@ export declare enum ModCallbackCustom {
1135
1180
  * ): void {}
1136
1181
  * ```
1137
1182
  */
1138
- POST_NPC_STATE_CHANGED = 64,
1183
+ POST_NPC_STATE_CHANGED = 67,
1139
1184
  /**
1140
1185
  * The exact same thing as the vanilla `POST_NPC_UPDATE` callback, except this callback allows you
1141
1186
  * to specify extra arguments for additional filtration.
@@ -1152,7 +1197,7 @@ export declare enum ModCallbackCustom {
1152
1197
  * function postNPCUpdateFilter(npc: EntityNPC): void {}
1153
1198
  * ```
1154
1199
  */
1155
- POST_NPC_UPDATE_FILTER = 65,
1200
+ POST_NPC_UPDATE_FILTER = 68,
1156
1201
  /**
1157
1202
  * Similar to the vanilla callback of the same name, but fires after the
1158
1203
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -1177,7 +1222,7 @@ export declare enum ModCallbackCustom {
1177
1222
  * function postPEffectUpdateReordered(player: EntityPlayer): void {}
1178
1223
  * ```
1179
1224
  */
1180
- POST_PEFFECT_UPDATE_REORDERED = 66,
1225
+ POST_PEFFECT_UPDATE_REORDERED = 69,
1181
1226
  /**
1182
1227
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup has a different variant or sub-type
1183
1228
  * than what it was on the previous frame.
@@ -1198,7 +1243,7 @@ export declare enum ModCallbackCustom {
1198
1243
  * ): void {}
1199
1244
  * ```
1200
1245
  */
1201
- POST_PICKUP_CHANGED = 67,
1246
+ POST_PICKUP_CHANGED = 70,
1202
1247
  /**
1203
1248
  * Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
1204
1249
  *
@@ -1217,7 +1262,7 @@ export declare enum ModCallbackCustom {
1217
1262
  * function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
1218
1263
  * ```
1219
1264
  */
1220
- POST_PICKUP_COLLECT = 68,
1265
+ POST_PICKUP_COLLECT = 71,
1221
1266
  /**
1222
1267
  * The exact same thing as the vanilla `POST_PICKUP_INIT` callback, except this callback allows
1223
1268
  * you to specify extra arguments for additional filtration.
@@ -1232,7 +1277,7 @@ export declare enum ModCallbackCustom {
1232
1277
  * function postPickupInitFilter(pickup: EntityPickup): void {}
1233
1278
  * ```
1234
1279
  */
1235
- POST_PICKUP_INIT_FILTER = 69,
1280
+ POST_PICKUP_INIT_FILTER = 72,
1236
1281
  /**
1237
1282
  * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
1238
1283
  * respective pickup on the run.
@@ -1250,7 +1295,7 @@ export declare enum ModCallbackCustom {
1250
1295
  * function postPickupInitFirst(pickup: EntityPickup): void {}
1251
1296
  * ```
1252
1297
  */
1253
- POST_PICKUP_INIT_FIRST = 70,
1298
+ POST_PICKUP_INIT_FIRST = 73,
1254
1299
  /**
1255
1300
  * Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
1256
1301
  *
@@ -1267,7 +1312,7 @@ export declare enum ModCallbackCustom {
1267
1312
  * function postPickupInitLate(pickup: EntityPickup): void {}
1268
1313
  * ```
1269
1314
  */
1270
- POST_PICKUP_INIT_LATE = 71,
1315
+ POST_PICKUP_INIT_LATE = 74,
1271
1316
  /**
1272
1317
  * The exact same thing as the vanilla `POST_PICKUP_RENDER` callback, except this callback allows
1273
1318
  * you to specify extra arguments for additional filtration.
@@ -1282,7 +1327,7 @@ export declare enum ModCallbackCustom {
1282
1327
  * function postPickupRenderFilter(pickup: EntityPickup, renderOffset: Vector): void {}
1283
1328
  * ```
1284
1329
  */
1285
- POST_PICKUP_RENDER_FILTER = 72,
1330
+ POST_PICKUP_RENDER_FILTER = 75,
1286
1331
  /**
1287
1332
  * The exact same thing as the vanilla `POST_PICKUP_SELECTION` callback, except this callback
1288
1333
  * allows you to specify extra arguments for additional filtration.
@@ -1301,7 +1346,7 @@ export declare enum ModCallbackCustom {
1301
1346
  * ): [PickupVariant, int] | undefined {}
1302
1347
  * ```
1303
1348
  */
1304
- POST_PICKUP_SELECTION_FILTER = 73,
1349
+ POST_PICKUP_SELECTION_FILTER = 76,
1305
1350
  /**
1306
1351
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
1307
1352
  * on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
@@ -1320,7 +1365,7 @@ export declare enum ModCallbackCustom {
1320
1365
  * ): void {}
1321
1366
  * ```
1322
1367
  */
1323
- POST_PICKUP_STATE_CHANGED = 74,
1368
+ POST_PICKUP_STATE_CHANGED = 77,
1324
1369
  /**
1325
1370
  * The exact same thing as the vanilla `POST_PICKUP_UPDATE` callback, except this callback allows
1326
1371
  * you to specify extra arguments for additional filtration.
@@ -1335,7 +1380,7 @@ export declare enum ModCallbackCustom {
1335
1380
  * function postPickupUpdateFilter(pickup: EntityPickup): void {}
1336
1381
  * ```
1337
1382
  */
1338
- POST_PICKUP_UPDATE_FILTER = 75,
1383
+ POST_PICKUP_UPDATE_FILTER = 78,
1339
1384
  /**
1340
1385
  * Fires from the `POST_RENDER` callback on every frame that a pit exists.
1341
1386
  *
@@ -1347,7 +1392,7 @@ export declare enum ModCallbackCustom {
1347
1392
  * function postPitRender(pit: GridEntityPit): void {}
1348
1393
  * ```
1349
1394
  */
1350
- POST_PIT_RENDER = 76,
1395
+ POST_PIT_RENDER = 79,
1351
1396
  /**
1352
1397
  * Fires from the `POST_UPDATE` callback on every frame that a pit exists.
1353
1398
  *
@@ -1359,7 +1404,7 @@ export declare enum ModCallbackCustom {
1359
1404
  * function postPitUpdate(pit: GridEntityPit): void {}
1360
1405
  * ```
1361
1406
  */
1362
- POST_PIT_UPDATE = 77,
1407
+ POST_PIT_UPDATE = 80,
1363
1408
  /**
1364
1409
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's health (i.e. hearts) is
1365
1410
  * different than what it was on the previous frame. For more information, see the `PlayerHealth`
@@ -1381,7 +1426,7 @@ export declare enum ModCallbackCustom {
1381
1426
  * ): void {}
1382
1427
  * ```
1383
1428
  */
1384
- POST_PLAYER_CHANGE_HEALTH = 78,
1429
+ POST_PLAYER_CHANGE_HEALTH = 81,
1385
1430
  /**
1386
1431
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when one of the player's stats change
1387
1432
  * from what they were on the previous frame.
@@ -1411,7 +1456,7 @@ export declare enum ModCallbackCustom {
1411
1456
  * ) => void {}
1412
1457
  * ```
1413
1458
  */
1414
- POST_PLAYER_CHANGE_STAT = 79,
1459
+ POST_PLAYER_CHANGE_STAT = 82,
1415
1460
  /**
1416
1461
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player entity changes its player
1417
1462
  * type
@@ -1434,7 +1479,7 @@ export declare enum ModCallbackCustom {
1434
1479
  * ): void {}
1435
1480
  * ```
1436
1481
  */
1437
- POST_PLAYER_CHANGE_TYPE = 80,
1482
+ POST_PLAYER_CHANGE_TYPE = 83,
1438
1483
  /**
1439
1484
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
1440
1485
  * higher than what it was on the previous frame, or when the active items change, or when the
@@ -1451,7 +1496,7 @@ export declare enum ModCallbackCustom {
1451
1496
  * ): void {}
1452
1497
  * ```
1453
1498
  */
1454
- POST_PLAYER_COLLECTIBLE_ADDED = 81,
1499
+ POST_PLAYER_COLLECTIBLE_ADDED = 84,
1455
1500
  /**
1456
1501
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
1457
1502
  * lower than what it was on the previous frame, or when the active items change, or when the
@@ -1468,7 +1513,7 @@ export declare enum ModCallbackCustom {
1468
1513
  * ): void {}
1469
1514
  * ```
1470
1515
  */
1471
- POST_PLAYER_COLLECTIBLE_REMOVED = 82,
1516
+ POST_PLAYER_COLLECTIBLE_REMOVED = 85,
1472
1517
  /**
1473
1518
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
1474
1519
  * prevent the fatal damage.
@@ -1486,7 +1531,7 @@ export declare enum ModCallbackCustom {
1486
1531
  * function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
1487
1532
  * ```
1488
1533
  */
1489
- POST_PLAYER_FATAL_DAMAGE = 83,
1534
+ POST_PLAYER_FATAL_DAMAGE = 86,
1490
1535
  /**
1491
1536
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
1492
1537
  * `POST_PLAYER_INIT_LATE` callback, with two changes:
@@ -1508,7 +1553,7 @@ export declare enum ModCallbackCustom {
1508
1553
  * function postPlayerInitFirst(player: EntityPlayer): void {}
1509
1554
  * ```
1510
1555
  */
1511
- POST_PLAYER_INIT_FIRST = 84,
1556
+ POST_PLAYER_INIT_FIRST = 87,
1512
1557
  /**
1513
1558
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
1514
1559
  *
@@ -1528,7 +1573,7 @@ export declare enum ModCallbackCustom {
1528
1573
  * function postPlayerInitLate(pickup: EntityPickup): void {}
1529
1574
  * ```
1530
1575
  */
1531
- POST_PLAYER_INIT_LATE = 85,
1576
+ POST_PLAYER_INIT_LATE = 88,
1532
1577
  /**
1533
1578
  * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
1534
1579
  * callback fires (if the player is spawning on the 0th game frame of the run).
@@ -1552,7 +1597,7 @@ export declare enum ModCallbackCustom {
1552
1597
  * function postPlayerRenderReordered(player: EntityPlayer, renderOffset: Vector): void {}
1553
1598
  * ```
1554
1599
  */
1555
- POST_PLAYER_RENDER_REORDERED = 86,
1600
+ POST_PLAYER_RENDER_REORDERED = 89,
1556
1601
  /**
1557
1602
  * Similar to the vanilla callback of the same name, but fires after the
1558
1603
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -1577,7 +1622,7 @@ export declare enum ModCallbackCustom {
1577
1622
  * function postPlayerUpdateReordered(player: EntityPlayer): void {}
1578
1623
  * ```
1579
1624
  */
1580
- POST_PLAYER_UPDATE_REORDERED = 87,
1625
+ POST_PLAYER_UPDATE_REORDERED = 90,
1581
1626
  /**
1582
1627
  * Fires from the `POST_RENDER` callback on every frame that a poop exists.
1583
1628
  *
@@ -1589,7 +1634,7 @@ export declare enum ModCallbackCustom {
1589
1634
  * function postPoopRender(poop: GridEntityPoop): void {}
1590
1635
  * ```
1591
1636
  */
1592
- POST_POOP_RENDER = 88,
1637
+ POST_POOP_RENDER = 91,
1593
1638
  /**
1594
1639
  * Fires from the `POST_UPDATE` callback on every frame that a poop exists.
1595
1640
  *
@@ -1601,7 +1646,7 @@ export declare enum ModCallbackCustom {
1601
1646
  * function postPoopUpdate(poop: GridEntityPoop): void {}
1602
1647
  * ```
1603
1648
  */
1604
- POST_POOP_UPDATE = 89,
1649
+ POST_POOP_UPDATE = 92,
1605
1650
  /**
1606
1651
  * Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
1607
1652
  *
@@ -1613,7 +1658,7 @@ export declare enum ModCallbackCustom {
1613
1658
  * function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
1614
1659
  * ```
1615
1660
  */
1616
- POST_PRESSURE_PLATE_RENDER = 90,
1661
+ POST_PRESSURE_PLATE_RENDER = 93,
1617
1662
  /**
1618
1663
  * Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
1619
1664
  *
@@ -1625,7 +1670,7 @@ export declare enum ModCallbackCustom {
1625
1670
  * function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
1626
1671
  * ```
1627
1672
  */
1628
- POST_PRESSURE_PLATE_UPDATE = 91,
1673
+ POST_PRESSURE_PLATE_UPDATE = 94,
1629
1674
  /**
1630
1675
  * Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
1631
1676
  *
@@ -1642,7 +1687,7 @@ export declare enum ModCallbackCustom {
1642
1687
  * function postProjectileInitLate(projectile: EntityProjectile): void {}
1643
1688
  * ```
1644
1689
  */
1645
- POST_PROJECTILE_INIT_LATE = 92,
1690
+ POST_PROJECTILE_INIT_LATE = 95,
1646
1691
  /**
1647
1692
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player first picks up a new
1648
1693
  * item. The pickup returned in the callback is assumed to be the first pickup that no longer
@@ -1658,7 +1703,7 @@ export declare enum ModCallbackCustom {
1658
1703
  * function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
1659
1704
  * ```
1660
1705
  */
1661
- POST_PURCHASE = 93,
1706
+ POST_PURCHASE = 96,
1662
1707
  /**
1663
1708
  * Fires from the `POST_RENDER` callback on every frame that a rock exists.
1664
1709
  *
@@ -1672,7 +1717,7 @@ export declare enum ModCallbackCustom {
1672
1717
  * function postRockRender(rock: GridEntityRock): void {}
1673
1718
  * ```
1674
1719
  */
1675
- POST_ROCK_RENDER = 94,
1720
+ POST_ROCK_RENDER = 97,
1676
1721
  /**
1677
1722
  * Fires from the `POST_UPDATE` callback on every frame that a rock exists.
1678
1723
  *
@@ -1686,7 +1731,7 @@ export declare enum ModCallbackCustom {
1686
1731
  * function postRockUpdate(rock: GridEntityRock): void {}
1687
1732
  * ```
1688
1733
  */
1689
- POST_ROCK_UPDATE = 95,
1734
+ POST_ROCK_UPDATE = 98,
1690
1735
  /**
1691
1736
  * Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
1692
1737
  * the `Room.IsClear` method).
@@ -1703,7 +1748,7 @@ export declare enum ModCallbackCustom {
1703
1748
  * function postRoomClearChanged(roomClear: boolean): void {}
1704
1749
  * ```
1705
1750
  */
1706
- POST_ROOM_CLEAR_CHANGED = 96,
1751
+ POST_ROOM_CLEAR_CHANGED = 99,
1707
1752
  /**
1708
1753
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
1709
1754
  * Room.
@@ -1718,7 +1763,7 @@ export declare enum ModCallbackCustom {
1718
1763
  * function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
1719
1764
  * ```
1720
1765
  */
1721
- POST_SACRIFICE = 97,
1766
+ POST_SACRIFICE = 100,
1722
1767
  /**
1723
1768
  * Fires from the `POST_RENDER` callback when a slot entity's animation changes.
1724
1769
  *
@@ -1736,7 +1781,7 @@ export declare enum ModCallbackCustom {
1736
1781
  * ): void {}
1737
1782
  * ```
1738
1783
  */
1739
- POST_SLOT_ANIMATION_CHANGED = 98,
1784
+ POST_SLOT_ANIMATION_CHANGED = 101,
1740
1785
  /**
1741
1786
  * Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
1742
1787
  * (It will not fire if any other type of entity collides with the slot entity.)
@@ -1760,7 +1805,7 @@ export declare enum ModCallbackCustom {
1760
1805
  * ): void {}
1761
1806
  * ```
1762
1807
  */
1763
- POST_SLOT_COLLISION = 99,
1808
+ POST_SLOT_COLLISION = 102,
1764
1809
  /**
1765
1810
  * Fires from the `POST_SLOT_UPDATE` or the `POST_ENTITY_REMOVE` callback when a slot machine is
1766
1811
  * destroyed or a beggar is removed.
@@ -1802,7 +1847,7 @@ export declare enum ModCallbackCustom {
1802
1847
  * function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
1803
1848
  * ```
1804
1849
  */
1805
- POST_SLOT_DESTROYED = 100,
1850
+ POST_SLOT_DESTROYED = 103,
1806
1851
  /**
1807
1852
  * Fires when a new slot entity is initialized. Specifically, this is either:
1808
1853
  *
@@ -1821,7 +1866,7 @@ export declare enum ModCallbackCustom {
1821
1866
  * function postSlotInit(slot: Entity): void {}
1822
1867
  * ```
1823
1868
  */
1824
- POST_SLOT_INIT = 101,
1869
+ POST_SLOT_INIT = 104,
1825
1870
  /**
1826
1871
  * Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
1827
1872
  *
@@ -1835,7 +1880,7 @@ export declare enum ModCallbackCustom {
1835
1880
  * function postSlotRender(slot: Entity): void {}
1836
1881
  * ```
1837
1882
  */
1838
- POST_SLOT_RENDER = 102,
1883
+ POST_SLOT_RENDER = 105,
1839
1884
  /**
1840
1885
  * Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
1841
1886
  *
@@ -1849,7 +1894,7 @@ export declare enum ModCallbackCustom {
1849
1894
  * function postSlotUpdate(slot: Entity): void {}
1850
1895
  * ```
1851
1896
  */
1852
- POST_SLOT_UPDATE = 103,
1897
+ POST_SLOT_UPDATE = 106,
1853
1898
  /**
1854
1899
  * Fires from the `POST_RENDER` callback on every frame that spikes exist.
1855
1900
  *
@@ -1861,7 +1906,7 @@ export declare enum ModCallbackCustom {
1861
1906
  * function postSpikesRender(spikes: GridEntitySpikes): void {}
1862
1907
  * ```
1863
1908
  */
1864
- POST_SPIKES_RENDER = 104,
1909
+ POST_SPIKES_RENDER = 107,
1865
1910
  /**
1866
1911
  * Fires from the `POST_UPDATE` callback on every frame that spikes exist.
1867
1912
  *
@@ -1873,7 +1918,22 @@ export declare enum ModCallbackCustom {
1873
1918
  * function postSpikesUpdate(spikes: GridEntitySpikes): void {}
1874
1919
  * ```
1875
1920
  */
1876
- POST_SPIKES_UPDATE = 105,
1921
+ POST_SPIKES_UPDATE = 108,
1922
+ /**
1923
+ * The exact same thing as the vanilla `POST_TEAR_INIT` callback, except this callback allows you
1924
+ * to specify extra arguments for additional filtration.
1925
+ *
1926
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1927
+ * - You can provide an optional third argument that will make the callback only fire if it
1928
+ * matches the `TearVariant` provided.
1929
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1930
+ * matches the sub-type provided.
1931
+ *
1932
+ * ```ts
1933
+ * function postTearInitFilter(tear: EntityTear): void {}
1934
+ * ```
1935
+ */
1936
+ POST_TEAR_INIT_FILTER = 109,
1877
1937
  /**
1878
1938
  * Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
1879
1939
  * `EntityTear.FrameCount` is equal to 0).
@@ -1891,7 +1951,7 @@ export declare enum ModCallbackCustom {
1891
1951
  * function postTearInitLate(tear: EntityTear): void {}
1892
1952
  * ```
1893
1953
  */
1894
- POST_TEAR_INIT_LATE = 106,
1954
+ POST_TEAR_INIT_LATE = 110,
1895
1955
  /**
1896
1956
  * Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
1897
1957
  * `EntityTear.FrameCount` is equal to 1).
@@ -1908,7 +1968,37 @@ export declare enum ModCallbackCustom {
1908
1968
  * function postTearInitVeryLate(tear: EntityTear): void {}
1909
1969
  * ```
1910
1970
  */
1911
- POST_TEAR_INIT_VERY_LATE = 107,
1971
+ POST_TEAR_INIT_VERY_LATE = 111,
1972
+ /**
1973
+ * The exact same thing as the vanilla `POST_TEAR_RENDER` callback, except this callback allows
1974
+ * you to specify extra arguments for additional filtration.
1975
+ *
1976
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1977
+ * - You can provide an optional third argument that will make the callback only fire if it
1978
+ * matches the `TearVariant` provided.
1979
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1980
+ * matches the sub-type provided.
1981
+ *
1982
+ * ```ts
1983
+ * function postTearRenderFilter(tear: EntityTear, renderOffset: Vector): void {}
1984
+ * ```
1985
+ */
1986
+ POST_TEAR_RENDER_FILTER = 112,
1987
+ /**
1988
+ * The exact same thing as the vanilla `POST_TEAR_INIT` callback, except this callback allows you
1989
+ * to specify extra arguments for additional filtration.
1990
+ *
1991
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1992
+ * - You can provide an optional third argument that will make the callback only fire if it
1993
+ * matches the `TearVariant` provided.
1994
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1995
+ * matches the sub-type provided.
1996
+ *
1997
+ * ```ts
1998
+ * function postTearUpdateFilter(tear: EntityTear): void {}
1999
+ * ```
2000
+ */
2001
+ POST_TEAR_UPDATE_FILTER = 113,
1912
2002
  /**
1913
2003
  * Fires from the `POST_RENDER` callback on every frame that a TNT exists.
1914
2004
  *
@@ -1920,7 +2010,7 @@ export declare enum ModCallbackCustom {
1920
2010
  * function postTNTRender(tnt: GridEntityTNT): void {}
1921
2011
  * ```
1922
2012
  */
1923
- POST_TNT_RENDER = 108,
2013
+ POST_TNT_RENDER = 114,
1924
2014
  /**
1925
2015
  * Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
1926
2016
  *
@@ -1932,7 +2022,7 @@ export declare enum ModCallbackCustom {
1932
2022
  * function postTNTUpdate(tnt: GridEntityTNT): void {}
1933
2023
  * ```
1934
2024
  */
1935
- POST_TNT_UPDATE = 109,
2025
+ POST_TNT_UPDATE = 115,
1936
2026
  /**
1937
2027
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player gains or loses a new
1938
2028
  * transformation.
@@ -1951,7 +2041,7 @@ export declare enum ModCallbackCustom {
1951
2041
  * ): void {}
1952
2042
  * ```
1953
2043
  */
1954
- POST_TRANSFORMATION = 110,
2044
+ POST_TRANSFORMATION = 116,
1955
2045
  /**
1956
2046
  * Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
1957
2047
  *
@@ -1966,7 +2056,7 @@ export declare enum ModCallbackCustom {
1966
2056
  * ): void {}
1967
2057
  * ```
1968
2058
  */
1969
- POST_TRINKET_BREAK = 111,
2059
+ POST_TRINKET_BREAK = 117,
1970
2060
  /**
1971
2061
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback on the frame before a Berserk effect
1972
2062
  * ends when the player is predicted to die (e.g. they currently have no health left or they took
@@ -1982,7 +2072,7 @@ export declare enum ModCallbackCustom {
1982
2072
  * function preBerserkDeath(player: EntityPlayer): void {}
1983
2073
  * ```
1984
2074
  */
1985
- PRE_BERSERK_DEATH = 112,
2075
+ PRE_BERSERK_DEATH = 118,
1986
2076
  /**
1987
2077
  * Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
1988
2078
  * to initiate a custom revival, return an integer that corresponds to the item or type of revival
@@ -2001,7 +2091,7 @@ export declare enum ModCallbackCustom {
2001
2091
  * function preCustomRevive(player: EntityPlayer): int | undefined {}
2002
2092
  * ```
2003
2093
  */
2004
- PRE_CUSTOM_REVIVE = 113,
2094
+ PRE_CUSTOM_REVIVE = 119,
2005
2095
  /**
2006
2096
  * The exact same thing as the vanilla `PRE_ENTITY_SPAWN` callback, except this callback allows
2007
2097
  * you to specify extra arguments for additional filtration.
@@ -2026,7 +2116,7 @@ export declare enum ModCallbackCustom {
2026
2116
  * ): [EntityType, int, int, int] | undefined {}
2027
2117
  * ```
2028
2118
  */
2029
- PRE_ENTITY_SPAWN_FILTER = 114,
2119
+ PRE_ENTITY_SPAWN_FILTER = 120,
2030
2120
  /**
2031
2121
  * The exact same thing as the vanilla `PRE_FAMILIAR_COLLISION` callback, except this callback
2032
2122
  * allows you to specify extra arguments for additional filtration.
@@ -2045,7 +2135,7 @@ export declare enum ModCallbackCustom {
2045
2135
  * ): void {}
2046
2136
  * ```
2047
2137
  */
2048
- PRE_FAMILIAR_COLLISION_FILTER = 115,
2138
+ PRE_FAMILIAR_COLLISION_FILTER = 121,
2049
2139
  /**
2050
2140
  * Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
2051
2141
  * meets all of the conditions to pick it up.
@@ -2065,7 +2155,7 @@ export declare enum ModCallbackCustom {
2065
2155
  * function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
2066
2156
  * ```
2067
2157
  */
2068
- PRE_GET_PEDESTAL = 116,
2158
+ PRE_GET_PEDESTAL = 122,
2069
2159
  /**
2070
2160
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item becomes queued (i.e. when
2071
2161
  * the player begins to hold the item above their head).
@@ -2085,7 +2175,26 @@ export declare enum ModCallbackCustom {
2085
2175
  * ): void {}
2086
2176
  * ```
2087
2177
  */
2088
- PRE_ITEM_PICKUP = 117,
2178
+ PRE_ITEM_PICKUP = 123,
2179
+ /**
2180
+ * The exact same thing as the vanilla `PRE_KNIFE_COLLISION` callback, except this callback allows
2181
+ * you to specify extra arguments for additional filtration.
2182
+ *
2183
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
2184
+ * - You can provide an optional third argument that will make the callback only fire if it
2185
+ * matches the `KnifeVariant` provided.
2186
+ * - You can provide an optional fourth argument that will make the callback only fire if it
2187
+ * matches the sub-type provided.
2188
+ *
2189
+ * ```ts
2190
+ * function preKnifeCollisionFilter(
2191
+ * knife: EntityKnife,
2192
+ * collider: Entity,
2193
+ * low: boolean,
2194
+ * ): void {}
2195
+ * ```
2196
+ */
2197
+ PRE_KNIFE_COLLISION_FILTER = 124,
2089
2198
  /**
2090
2199
  * Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
2091
2200
  * player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
@@ -2099,7 +2208,7 @@ export declare enum ModCallbackCustom {
2099
2208
  * function preNewLevel(player: EntityPlayer): void {}
2100
2209
  * ```
2101
2210
  */
2102
- PRE_NEW_LEVEL = 118,
2211
+ PRE_NEW_LEVEL = 125,
2103
2212
  /**
2104
2213
  * The exact same thing as the vanilla `PRE_NPC_COLLISION` callback, except this callback allows
2105
2214
  * you to specify extra arguments for additional filtration.
@@ -2120,7 +2229,7 @@ export declare enum ModCallbackCustom {
2120
2229
  * ): boolean | undefined {}
2121
2230
  * ```
2122
2231
  */
2123
- PRE_NPC_COLLISION_FILTER = 119,
2232
+ PRE_NPC_COLLISION_FILTER = 126,
2124
2233
  /**
2125
2234
  * The exact same thing as the vanilla `PRE_NPC_UPDATE` callback, except this callback allows you
2126
2235
  * to specify extra arguments for additional filtration.
@@ -2137,7 +2246,7 @@ export declare enum ModCallbackCustom {
2137
2246
  * function preNPCUpdateFilter(entity: Entity): boolean | undefined {}
2138
2247
  * ```
2139
2248
  */
2140
- PRE_NPC_UPDATE_FILTER = 120,
2249
+ PRE_NPC_UPDATE_FILTER = 127,
2141
2250
  /**
2142
2251
  * The exact same thing as the vanilla `PRE_ROOM_ENTITY_SPAWN` callback, except this callback
2143
2252
  * allows you to specify extra arguments for additional filtration.
@@ -2160,6 +2269,25 @@ export declare enum ModCallbackCustom {
2160
2269
  * ): [EntityType | GridEntityXMLType, int, int] | undefined {}
2161
2270
  * ```
2162
2271
  */
2163
- PRE_ROOM_ENTITY_SPAWN_FILTER = 121
2272
+ PRE_ROOM_ENTITY_SPAWN_FILTER = 128,
2273
+ /**
2274
+ * The exact same thing as the vanilla `PRE_TEAR_COLLISION` callback, except this callback allows
2275
+ * you to specify extra arguments for additional filtration.
2276
+ *
2277
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
2278
+ * - You can provide an optional third argument that will make the callback only fire if it
2279
+ * matches the `TearVariant` provided.
2280
+ * - You can provide an optional fourth argument that will make the callback only fire if it
2281
+ * matches the sub-type provided.
2282
+ *
2283
+ * ```ts
2284
+ * function preTearCollisionFilter(
2285
+ * tear: EntityTear,
2286
+ * collider: Entity,
2287
+ * low: boolean,
2288
+ * ): void {}
2289
+ * ```
2290
+ */
2291
+ PRE_TEAR_COLLISION_FILTER = 129
2164
2292
  }
2165
2293
  //# sourceMappingURL=ModCallbackCustom.d.ts.map