isaacscript-common 21.6.6 → 21.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.rollup.d.ts +160 -99
- package/dist/isaacscript-common.lua +4200 -4036
- package/dist/src/arrays/cachedEnumValues.d.ts +2 -1
- package/dist/src/arrays/cachedEnumValues.d.ts.map +1 -1
- package/dist/src/arrays/cachedEnumValues.lua +2 -0
- package/dist/src/callbackClasses.d.ts +1 -0
- package/dist/src/callbackClasses.d.ts.map +1 -1
- package/dist/src/callbackClasses.lua +5 -0
- package/dist/src/callbacks.d.ts +54 -53
- package/dist/src/callbacks.d.ts.map +1 -1
- package/dist/src/callbacks.lua +1 -0
- package/dist/src/classes/callbacks/PostPickupChanged.d.ts +8 -0
- package/dist/src/classes/callbacks/PostPickupChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPickupChanged.lua +20 -0
- package/dist/src/classes/features/callbackLogic/PickupChangeDetection.d.ts +18 -0
- package/dist/src/classes/features/callbackLogic/PickupChangeDetection.d.ts.map +1 -0
- package/dist/src/classes/features/callbackLogic/PickupChangeDetection.lua +47 -0
- package/dist/src/enums/ISCFeature.d.ts +47 -46
- package/dist/src/enums/ISCFeature.d.ts.map +1 -1
- package/dist/src/enums/ISCFeature.lua +48 -46
- package/dist/src/enums/ModCallbackCustom.d.ts +74 -53
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +55 -53
- package/dist/src/features.d.ts +49 -46
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +3 -0
- package/dist/src/functions/itemPool.d.ts +8 -0
- package/dist/src/functions/itemPool.d.ts.map +1 -0
- package/dist/src/functions/itemPool.lua +63 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +8 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +5 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/dist/src/shouldFire.d.ts +7 -1
- package/dist/src/shouldFire.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/arrays/cachedEnumValues.ts +4 -0
- package/src/callbackClasses.ts +1 -0
- package/src/callbacks.ts +1 -0
- package/src/classes/callbacks/PostPickupChanged.ts +14 -0
- package/src/classes/features/callbackLogic/PickupChangeDetection.ts +61 -0
- package/src/enums/ISCFeature.ts +1 -0
- package/src/enums/ModCallbackCustom.ts +22 -0
- package/src/features.ts +6 -0
- package/src/functions/itemPool.ts +50 -0
- package/src/index.ts +1 -0
- package/src/interfaces/private/AddCallbackParametersCustom.ts +12 -0
- package/src/shouldFire.ts +8 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -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,
|
|
@@ -5916,6 +5921,13 @@ export declare function getRandomIndexFromWeightedArray<T>(weightedArray: Weight
|
|
|
5916
5921
|
*/
|
|
5917
5922
|
export declare function getRandomInt(min: int, max: int, seedOrRNG?: Seed | RNG, exceptions?: int[] | readonly int[]): int;
|
|
5918
5923
|
|
|
5924
|
+
/**
|
|
5925
|
+
* Helper function to get a random item pool. This is as simple as getting a random value from the
|
|
5926
|
+
* `ItemPoolType` enum, since `ItemPoolType.SHELL_GAME` (7) is not a real item pool and the Greed
|
|
5927
|
+
* Mode item pools should be excluded if not playing in Greed Mode.
|
|
5928
|
+
*/
|
|
5929
|
+
export declare function getRandomItemPool(): ItemPoolType;
|
|
5930
|
+
|
|
5919
5931
|
/**
|
|
5920
5932
|
* Helper function to get a random JSON entity from an array of JSON entities.
|
|
5921
5933
|
*
|
|
@@ -7392,52 +7404,53 @@ export declare enum ISCFeature {
|
|
|
7392
7404
|
GRID_ENTITY_UPDATE_DETECTION = 5,
|
|
7393
7405
|
GAME_REORDERED_CALLBACKS = 6,
|
|
7394
7406
|
ITEM_PICKUP_DETECTION = 7,
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7407
|
+
PICKUP_CHANGE_DETECTION = 8,
|
|
7408
|
+
PLAYER_COLLECTIBLE_DETECTION = 9,
|
|
7409
|
+
PLAYER_REORDERED_CALLBACKS = 10,
|
|
7410
|
+
SLOT_DESTROYED_DETECTION = 11,
|
|
7411
|
+
SLOT_RENDER_DETECTION = 12,
|
|
7412
|
+
SLOT_UPDATE_DETECTION = 13,
|
|
7413
|
+
CHARACTER_HEALTH_CONVERSION = 14,
|
|
7414
|
+
CHARACTER_STATS = 15,
|
|
7415
|
+
COLLECTIBLE_ITEM_POOL_TYPE = 16,
|
|
7416
|
+
CUSTOM_GRID_ENTITIES = 17,
|
|
7417
|
+
CUSTOM_ITEM_POOLS = 18,
|
|
7418
|
+
CUSTOM_HOTKEYS = 19,
|
|
7419
|
+
CUSTOM_PICKUPS = 20,
|
|
7420
|
+
CUSTOM_STAGES = 21,
|
|
7421
|
+
CUSTOM_TRAPDOORS = 22,
|
|
7422
|
+
DEBUG_DISPLAY = 23,
|
|
7423
|
+
DEPLOY_JSON_ROOM = 24,
|
|
7424
|
+
DISABLE_ALL_SOUND = 25,
|
|
7425
|
+
DISABLE_INPUTS = 26,
|
|
7426
|
+
FADE_IN_REMOVER = 27,
|
|
7427
|
+
FAST_RESET = 28,
|
|
7428
|
+
FLYING_DETECTION = 29,
|
|
7429
|
+
FORGOTTEN_SWITCH = 30,
|
|
7430
|
+
EXTRA_CONSOLE_COMMANDS = 31,
|
|
7431
|
+
ITEM_POOL_DETECTION = 32,
|
|
7432
|
+
MODDED_ELEMENT_DETECTION = 33,
|
|
7433
|
+
MODDED_ELEMENT_SETS = 34,
|
|
7434
|
+
NO_SIREN_STEAL = 35,
|
|
7435
|
+
PAUSE = 36,
|
|
7436
|
+
PERSISTENT_ENTITIES = 37,
|
|
7437
|
+
PICKUP_INDEX_CREATION = 38,
|
|
7438
|
+
PLAYER_INVENTORY = 39,
|
|
7439
|
+
PONY_DETECTION = 40,
|
|
7440
|
+
PRESS_INPUT = 41,
|
|
7441
|
+
PREVENT_CHILD_ENTITIES = 42,
|
|
7442
|
+
PREVENT_COLLECTIBLE_ROTATION = 43,
|
|
7443
|
+
PREVENT_GRID_ENTITY_RESPAWN = 44,
|
|
7444
|
+
ROOM_CLEAR_FRAME = 45,
|
|
7445
|
+
ROOM_HISTORY = 46,
|
|
7446
|
+
RUN_IN_N_FRAMES = 47,
|
|
7447
|
+
RUN_NEXT_ROOM = 48,
|
|
7448
|
+
SAVE_DATA_MANAGER = 49,
|
|
7449
|
+
SPAWN_ALT_ROCK_REWARDS = 50,
|
|
7450
|
+
SPAWN_COLLECTIBLE = 51,
|
|
7451
|
+
STAGE_HISTORY = 52,
|
|
7452
|
+
START_AMBUSH = 53,
|
|
7453
|
+
TAINTED_LAZARUS_PLAYERS = 54
|
|
7441
7454
|
}
|
|
7442
7455
|
|
|
7443
7456
|
/**
|
|
@@ -7455,6 +7468,7 @@ declare interface ISCFeatureToClass {
|
|
|
7455
7468
|
[ISCFeature.GRID_ENTITY_UPDATE_DETECTION]: GridEntityUpdateDetection;
|
|
7456
7469
|
[ISCFeature.GAME_REORDERED_CALLBACKS]: GameReorderedCallbacks;
|
|
7457
7470
|
[ISCFeature.ITEM_PICKUP_DETECTION]: ItemPickupDetection;
|
|
7471
|
+
[ISCFeature.PICKUP_CHANGE_DETECTION]: PickupChangeDetection;
|
|
7458
7472
|
[ISCFeature.PLAYER_COLLECTIBLE_DETECTION]: PlayerCollectibleDetection;
|
|
7459
7473
|
[ISCFeature.PLAYER_REORDERED_CALLBACKS]: PlayerReorderedCallbacks;
|
|
7460
7474
|
[ISCFeature.SLOT_DESTROYED_DETECTION]: SlotDestroyedDetection;
|
|
@@ -9884,6 +9898,27 @@ export declare enum ModCallbackCustom {
|
|
|
9884
9898
|
* ```
|
|
9885
9899
|
*/
|
|
9886
9900
|
POST_PEFFECT_UPDATE_REORDERED = 56,
|
|
9901
|
+
/**
|
|
9902
|
+
* Fires from the `POST_PICKUP_UPDATE` callback when a pickup has a different variant or sub-type
|
|
9903
|
+
* than what it was on the previous frame.
|
|
9904
|
+
*
|
|
9905
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9906
|
+
* - You can provide an optional third argument that will make the callback only fire if the new
|
|
9907
|
+
* pickup matches the `PickupVariant` provided.
|
|
9908
|
+
* - You can provide an optional third argument that will make the callback only fire if the new
|
|
9909
|
+
* pickup matches the sub-type provided.
|
|
9910
|
+
*
|
|
9911
|
+
* ```ts
|
|
9912
|
+
* function postPickupChanged(
|
|
9913
|
+
* pickup: EntityPickup,
|
|
9914
|
+
* oldVariant: PickupVariant,
|
|
9915
|
+
* oldSubType: int,
|
|
9916
|
+
* newVariant: PickupVariant,
|
|
9917
|
+
* newSubType: int,
|
|
9918
|
+
* ): void {}
|
|
9919
|
+
* ```
|
|
9920
|
+
*/
|
|
9921
|
+
POST_PICKUP_CHANGED = 57,
|
|
9887
9922
|
/**
|
|
9888
9923
|
* Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
|
|
9889
9924
|
*
|
|
@@ -9902,7 +9937,7 @@ export declare enum ModCallbackCustom {
|
|
|
9902
9937
|
* function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
|
|
9903
9938
|
* ```
|
|
9904
9939
|
*/
|
|
9905
|
-
POST_PICKUP_COLLECT =
|
|
9940
|
+
POST_PICKUP_COLLECT = 58,
|
|
9906
9941
|
/**
|
|
9907
9942
|
* The exact same thing as the vanilla `POST_PICKUP_INIT` callback, except this callback allows
|
|
9908
9943
|
* you to specify extra arguments for additional filtration.
|
|
@@ -9917,7 +9952,7 @@ export declare enum ModCallbackCustom {
|
|
|
9917
9952
|
* function postPickupInitFilter(pickup: EntityPickup): void {}
|
|
9918
9953
|
* ```
|
|
9919
9954
|
*/
|
|
9920
|
-
POST_PICKUP_INIT_FILTER =
|
|
9955
|
+
POST_PICKUP_INIT_FILTER = 59,
|
|
9921
9956
|
/**
|
|
9922
9957
|
* Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
|
|
9923
9958
|
* respective pickup on the run.
|
|
@@ -9935,7 +9970,7 @@ export declare enum ModCallbackCustom {
|
|
|
9935
9970
|
* function postPickupInitFirst(pickup: EntityPickup): void {}
|
|
9936
9971
|
* ```
|
|
9937
9972
|
*/
|
|
9938
|
-
POST_PICKUP_INIT_FIRST =
|
|
9973
|
+
POST_PICKUP_INIT_FIRST = 60,
|
|
9939
9974
|
/**
|
|
9940
9975
|
* Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
|
|
9941
9976
|
*
|
|
@@ -9952,7 +9987,7 @@ export declare enum ModCallbackCustom {
|
|
|
9952
9987
|
* function postPickupInitLate(pickup: EntityPickup): void {}
|
|
9953
9988
|
* ```
|
|
9954
9989
|
*/
|
|
9955
|
-
POST_PICKUP_INIT_LATE =
|
|
9990
|
+
POST_PICKUP_INIT_LATE = 61,
|
|
9956
9991
|
/**
|
|
9957
9992
|
* The exact same thing as the vanilla `POST_PICKUP_RENDER` callback, except this callback allows
|
|
9958
9993
|
* you to specify extra arguments for additional filtration.
|
|
@@ -9967,7 +10002,7 @@ export declare enum ModCallbackCustom {
|
|
|
9967
10002
|
* function postPickupRenderFilter(pickup: EntityPickup, renderOffset: Vector): void {}
|
|
9968
10003
|
* ```
|
|
9969
10004
|
*/
|
|
9970
|
-
POST_PICKUP_RENDER_FILTER =
|
|
10005
|
+
POST_PICKUP_RENDER_FILTER = 62,
|
|
9971
10006
|
/**
|
|
9972
10007
|
* The exact same thing as the vanilla `POST_PICKUP_SELECTION` callback, except this callback
|
|
9973
10008
|
* allows you to specify extra arguments for additional filtration.
|
|
@@ -9986,7 +10021,7 @@ export declare enum ModCallbackCustom {
|
|
|
9986
10021
|
* ): [PickupVariant, int] | undefined {}
|
|
9987
10022
|
* ```
|
|
9988
10023
|
*/
|
|
9989
|
-
POST_PICKUP_SELECTION_FILTER =
|
|
10024
|
+
POST_PICKUP_SELECTION_FILTER = 63,
|
|
9990
10025
|
/**
|
|
9991
10026
|
* Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
|
|
9992
10027
|
* on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
|
|
@@ -10005,7 +10040,7 @@ export declare enum ModCallbackCustom {
|
|
|
10005
10040
|
* ): void {}
|
|
10006
10041
|
* ```
|
|
10007
10042
|
*/
|
|
10008
|
-
POST_PICKUP_STATE_CHANGED =
|
|
10043
|
+
POST_PICKUP_STATE_CHANGED = 64,
|
|
10009
10044
|
/**
|
|
10010
10045
|
* The exact same thing as the vanilla `POST_PICKUP_UPDATE` callback, except this callback allows
|
|
10011
10046
|
* you to specify extra arguments for additional filtration.
|
|
@@ -10020,7 +10055,7 @@ export declare enum ModCallbackCustom {
|
|
|
10020
10055
|
* function postPickupUpdateFilter(pickup: EntityPickup): void {}
|
|
10021
10056
|
* ```
|
|
10022
10057
|
*/
|
|
10023
|
-
POST_PICKUP_UPDATE_FILTER =
|
|
10058
|
+
POST_PICKUP_UPDATE_FILTER = 65,
|
|
10024
10059
|
/**
|
|
10025
10060
|
* Fires from the `POST_RENDER` callback on every frame that a pit exists.
|
|
10026
10061
|
*
|
|
@@ -10032,7 +10067,7 @@ export declare enum ModCallbackCustom {
|
|
|
10032
10067
|
* function postPitRender(pit: GridEntityPit): void {}
|
|
10033
10068
|
* ```
|
|
10034
10069
|
*/
|
|
10035
|
-
POST_PIT_RENDER =
|
|
10070
|
+
POST_PIT_RENDER = 66,
|
|
10036
10071
|
/**
|
|
10037
10072
|
* Fires from the `POST_UPDATE` callback on every frame that a pit exists.
|
|
10038
10073
|
*
|
|
@@ -10044,7 +10079,7 @@ export declare enum ModCallbackCustom {
|
|
|
10044
10079
|
* function postPitUpdate(pit: GridEntityPit): void {}
|
|
10045
10080
|
* ```
|
|
10046
10081
|
*/
|
|
10047
|
-
POST_PIT_UPDATE =
|
|
10082
|
+
POST_PIT_UPDATE = 67,
|
|
10048
10083
|
/**
|
|
10049
10084
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's health (i.e. hearts) is
|
|
10050
10085
|
* different than what it was on the previous frame. For more information, see the `PlayerHealth`
|
|
@@ -10066,7 +10101,7 @@ export declare enum ModCallbackCustom {
|
|
|
10066
10101
|
* ): void {}
|
|
10067
10102
|
* ```
|
|
10068
10103
|
*/
|
|
10069
|
-
POST_PLAYER_CHANGE_HEALTH =
|
|
10104
|
+
POST_PLAYER_CHANGE_HEALTH = 68,
|
|
10070
10105
|
/**
|
|
10071
10106
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when one of the player's stats change
|
|
10072
10107
|
* from what they were on the previous frame.
|
|
@@ -10096,7 +10131,7 @@ export declare enum ModCallbackCustom {
|
|
|
10096
10131
|
* ) => void {}
|
|
10097
10132
|
* ```
|
|
10098
10133
|
*/
|
|
10099
|
-
POST_PLAYER_CHANGE_STAT =
|
|
10134
|
+
POST_PLAYER_CHANGE_STAT = 69,
|
|
10100
10135
|
/**
|
|
10101
10136
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player entity changes its player
|
|
10102
10137
|
* type
|
|
@@ -10119,7 +10154,7 @@ export declare enum ModCallbackCustom {
|
|
|
10119
10154
|
* ): void {}
|
|
10120
10155
|
* ```
|
|
10121
10156
|
*/
|
|
10122
|
-
POST_PLAYER_CHANGE_TYPE =
|
|
10157
|
+
POST_PLAYER_CHANGE_TYPE = 70,
|
|
10123
10158
|
/**
|
|
10124
10159
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
|
|
10125
10160
|
* higher than what it was on the previous frame, or when the active items change, or when the
|
|
@@ -10136,7 +10171,7 @@ export declare enum ModCallbackCustom {
|
|
|
10136
10171
|
* ): void {}
|
|
10137
10172
|
* ```
|
|
10138
10173
|
*/
|
|
10139
|
-
POST_PLAYER_COLLECTIBLE_ADDED =
|
|
10174
|
+
POST_PLAYER_COLLECTIBLE_ADDED = 71,
|
|
10140
10175
|
/**
|
|
10141
10176
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
|
|
10142
10177
|
* lower than what it was on the previous frame, or when the active items change, or when the
|
|
@@ -10153,7 +10188,7 @@ export declare enum ModCallbackCustom {
|
|
|
10153
10188
|
* ): void {}
|
|
10154
10189
|
* ```
|
|
10155
10190
|
*/
|
|
10156
|
-
POST_PLAYER_COLLECTIBLE_REMOVED =
|
|
10191
|
+
POST_PLAYER_COLLECTIBLE_REMOVED = 72,
|
|
10157
10192
|
/**
|
|
10158
10193
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
|
|
10159
10194
|
* prevent the fatal damage.
|
|
@@ -10171,7 +10206,7 @@ export declare enum ModCallbackCustom {
|
|
|
10171
10206
|
* function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
|
|
10172
10207
|
* ```
|
|
10173
10208
|
*/
|
|
10174
|
-
POST_PLAYER_FATAL_DAMAGE =
|
|
10209
|
+
POST_PLAYER_FATAL_DAMAGE = 73,
|
|
10175
10210
|
/**
|
|
10176
10211
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
|
|
10177
10212
|
* `POST_PLAYER_INIT_LATE` callback, with two changes:
|
|
@@ -10193,7 +10228,7 @@ export declare enum ModCallbackCustom {
|
|
|
10193
10228
|
* function postPlayerInitFirst(player: EntityPlayer): void {}
|
|
10194
10229
|
* ```
|
|
10195
10230
|
*/
|
|
10196
|
-
POST_PLAYER_INIT_FIRST =
|
|
10231
|
+
POST_PLAYER_INIT_FIRST = 74,
|
|
10197
10232
|
/**
|
|
10198
10233
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
|
|
10199
10234
|
*
|
|
@@ -10213,7 +10248,7 @@ export declare enum ModCallbackCustom {
|
|
|
10213
10248
|
* function postPlayerInitLate(pickup: EntityPickup): void {}
|
|
10214
10249
|
* ```
|
|
10215
10250
|
*/
|
|
10216
|
-
POST_PLAYER_INIT_LATE =
|
|
10251
|
+
POST_PLAYER_INIT_LATE = 75,
|
|
10217
10252
|
/**
|
|
10218
10253
|
* Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
|
|
10219
10254
|
* callback fires (if the player is spawning on the 0th game frame of the run).
|
|
@@ -10237,7 +10272,7 @@ export declare enum ModCallbackCustom {
|
|
|
10237
10272
|
* function postPlayerRenderReordered(player: EntityPlayer): void {}
|
|
10238
10273
|
* ```
|
|
10239
10274
|
*/
|
|
10240
|
-
POST_PLAYER_RENDER_REORDERED =
|
|
10275
|
+
POST_PLAYER_RENDER_REORDERED = 76,
|
|
10241
10276
|
/**
|
|
10242
10277
|
* Similar to the vanilla callback of the same name, but fires after the
|
|
10243
10278
|
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
@@ -10262,7 +10297,7 @@ export declare enum ModCallbackCustom {
|
|
|
10262
10297
|
* function postPlayerUpdateReordered(player: EntityPlayer): void {}
|
|
10263
10298
|
* ```
|
|
10264
10299
|
*/
|
|
10265
|
-
POST_PLAYER_UPDATE_REORDERED =
|
|
10300
|
+
POST_PLAYER_UPDATE_REORDERED = 77,
|
|
10266
10301
|
/**
|
|
10267
10302
|
* Fires from the `POST_RENDER` callback on every frame that a poop exists.
|
|
10268
10303
|
*
|
|
@@ -10274,7 +10309,7 @@ export declare enum ModCallbackCustom {
|
|
|
10274
10309
|
* function postPoopRender(poop: GridEntityPoop): void {}
|
|
10275
10310
|
* ```
|
|
10276
10311
|
*/
|
|
10277
|
-
POST_POOP_RENDER =
|
|
10312
|
+
POST_POOP_RENDER = 78,
|
|
10278
10313
|
/**
|
|
10279
10314
|
* Fires from the `POST_UPDATE` callback on every frame that a poop exists.
|
|
10280
10315
|
*
|
|
@@ -10286,7 +10321,7 @@ export declare enum ModCallbackCustom {
|
|
|
10286
10321
|
* function postPoopUpdate(poop: GridEntityPoop): void {}
|
|
10287
10322
|
* ```
|
|
10288
10323
|
*/
|
|
10289
|
-
POST_POOP_UPDATE =
|
|
10324
|
+
POST_POOP_UPDATE = 79,
|
|
10290
10325
|
/**
|
|
10291
10326
|
* Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
|
|
10292
10327
|
*
|
|
@@ -10298,7 +10333,7 @@ export declare enum ModCallbackCustom {
|
|
|
10298
10333
|
* function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
|
|
10299
10334
|
* ```
|
|
10300
10335
|
*/
|
|
10301
|
-
POST_PRESSURE_PLATE_RENDER =
|
|
10336
|
+
POST_PRESSURE_PLATE_RENDER = 80,
|
|
10302
10337
|
/**
|
|
10303
10338
|
* Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
|
|
10304
10339
|
*
|
|
@@ -10310,7 +10345,7 @@ export declare enum ModCallbackCustom {
|
|
|
10310
10345
|
* function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
|
|
10311
10346
|
* ```
|
|
10312
10347
|
*/
|
|
10313
|
-
POST_PRESSURE_PLATE_UPDATE =
|
|
10348
|
+
POST_PRESSURE_PLATE_UPDATE = 81,
|
|
10314
10349
|
/**
|
|
10315
10350
|
* Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
|
|
10316
10351
|
*
|
|
@@ -10327,7 +10362,7 @@ export declare enum ModCallbackCustom {
|
|
|
10327
10362
|
* function postProjectileInitLate(projectile: EntityProjectile): void {}
|
|
10328
10363
|
* ```
|
|
10329
10364
|
*/
|
|
10330
|
-
POST_PROJECTILE_INIT_LATE =
|
|
10365
|
+
POST_PROJECTILE_INIT_LATE = 82,
|
|
10331
10366
|
/**
|
|
10332
10367
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player first picks up a new
|
|
10333
10368
|
* item. The pickup returned in the callback is assumed to be the first pickup that no longer
|
|
@@ -10343,7 +10378,7 @@ export declare enum ModCallbackCustom {
|
|
|
10343
10378
|
* function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
|
|
10344
10379
|
* ```
|
|
10345
10380
|
*/
|
|
10346
|
-
POST_PURCHASE =
|
|
10381
|
+
POST_PURCHASE = 83,
|
|
10347
10382
|
/**
|
|
10348
10383
|
* Fires from the `POST_RENDER` callback on every frame that a rock exists.
|
|
10349
10384
|
*
|
|
@@ -10357,7 +10392,7 @@ export declare enum ModCallbackCustom {
|
|
|
10357
10392
|
* function postRockRender(rock: GridEntityRock): void {}
|
|
10358
10393
|
* ```
|
|
10359
10394
|
*/
|
|
10360
|
-
POST_ROCK_RENDER =
|
|
10395
|
+
POST_ROCK_RENDER = 84,
|
|
10361
10396
|
/**
|
|
10362
10397
|
* Fires from the `POST_UPDATE` callback on every frame that a rock exists.
|
|
10363
10398
|
*
|
|
@@ -10371,7 +10406,7 @@ export declare enum ModCallbackCustom {
|
|
|
10371
10406
|
* function postRockUpdate(rock: GridEntityRock): void {}
|
|
10372
10407
|
* ```
|
|
10373
10408
|
*/
|
|
10374
|
-
POST_ROCK_UPDATE =
|
|
10409
|
+
POST_ROCK_UPDATE = 85,
|
|
10375
10410
|
/**
|
|
10376
10411
|
* Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
|
|
10377
10412
|
* the `Room.IsClear` method).
|
|
@@ -10388,7 +10423,7 @@ export declare enum ModCallbackCustom {
|
|
|
10388
10423
|
* function postRoomClearChanged(roomClear: boolean): void {}
|
|
10389
10424
|
* ```
|
|
10390
10425
|
*/
|
|
10391
|
-
POST_ROOM_CLEAR_CHANGED =
|
|
10426
|
+
POST_ROOM_CLEAR_CHANGED = 86,
|
|
10392
10427
|
/**
|
|
10393
10428
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
|
|
10394
10429
|
* Room.
|
|
@@ -10403,7 +10438,7 @@ export declare enum ModCallbackCustom {
|
|
|
10403
10438
|
* function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
|
|
10404
10439
|
* ```
|
|
10405
10440
|
*/
|
|
10406
|
-
POST_SACRIFICE =
|
|
10441
|
+
POST_SACRIFICE = 87,
|
|
10407
10442
|
/**
|
|
10408
10443
|
* Fires from the `POST_RENDER` callback when a slot entity's animation changes.
|
|
10409
10444
|
*
|
|
@@ -10421,7 +10456,7 @@ export declare enum ModCallbackCustom {
|
|
|
10421
10456
|
* ): void {}
|
|
10422
10457
|
* ```
|
|
10423
10458
|
*/
|
|
10424
|
-
POST_SLOT_ANIMATION_CHANGED =
|
|
10459
|
+
POST_SLOT_ANIMATION_CHANGED = 88,
|
|
10425
10460
|
/**
|
|
10426
10461
|
* Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
|
|
10427
10462
|
* (It will not fire if any other type of entity collides with the slot entity.)
|
|
@@ -10445,7 +10480,7 @@ export declare enum ModCallbackCustom {
|
|
|
10445
10480
|
* ): void {}
|
|
10446
10481
|
* ```
|
|
10447
10482
|
*/
|
|
10448
|
-
POST_SLOT_COLLISION =
|
|
10483
|
+
POST_SLOT_COLLISION = 89,
|
|
10449
10484
|
/**
|
|
10450
10485
|
* Fires from the `POST_SLOT_UPDATE` or the `POST_ENTITY_REMOVE` callback when a slot machine is
|
|
10451
10486
|
* destroyed or a beggar is removed.
|
|
@@ -10487,7 +10522,7 @@ export declare enum ModCallbackCustom {
|
|
|
10487
10522
|
* function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
|
|
10488
10523
|
* ```
|
|
10489
10524
|
*/
|
|
10490
|
-
POST_SLOT_DESTROYED =
|
|
10525
|
+
POST_SLOT_DESTROYED = 90,
|
|
10491
10526
|
/**
|
|
10492
10527
|
* Fires when a new slot entity is initialized. Specifically, this is either:
|
|
10493
10528
|
*
|
|
@@ -10506,7 +10541,7 @@ export declare enum ModCallbackCustom {
|
|
|
10506
10541
|
* function postSlotInit(slot: Entity): void {}
|
|
10507
10542
|
* ```
|
|
10508
10543
|
*/
|
|
10509
|
-
POST_SLOT_INIT =
|
|
10544
|
+
POST_SLOT_INIT = 91,
|
|
10510
10545
|
/**
|
|
10511
10546
|
* Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
|
|
10512
10547
|
*
|
|
@@ -10520,7 +10555,7 @@ export declare enum ModCallbackCustom {
|
|
|
10520
10555
|
* function postSlotRender(slot: Entity): void {}
|
|
10521
10556
|
* ```
|
|
10522
10557
|
*/
|
|
10523
|
-
POST_SLOT_RENDER =
|
|
10558
|
+
POST_SLOT_RENDER = 92,
|
|
10524
10559
|
/**
|
|
10525
10560
|
* Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
|
|
10526
10561
|
*
|
|
@@ -10534,7 +10569,7 @@ export declare enum ModCallbackCustom {
|
|
|
10534
10569
|
* function postSlotUpdate(slot: Entity): void {}
|
|
10535
10570
|
* ```
|
|
10536
10571
|
*/
|
|
10537
|
-
POST_SLOT_UPDATE =
|
|
10572
|
+
POST_SLOT_UPDATE = 93,
|
|
10538
10573
|
/**
|
|
10539
10574
|
* Fires from the `POST_RENDER` callback on every frame that spikes exist.
|
|
10540
10575
|
*
|
|
@@ -10546,7 +10581,7 @@ export declare enum ModCallbackCustom {
|
|
|
10546
10581
|
* function postSpikesRender(spikes: GridEntitySpikes): void {}
|
|
10547
10582
|
* ```
|
|
10548
10583
|
*/
|
|
10549
|
-
POST_SPIKES_RENDER =
|
|
10584
|
+
POST_SPIKES_RENDER = 94,
|
|
10550
10585
|
/**
|
|
10551
10586
|
* Fires from the `POST_UPDATE` callback on every frame that spikes exist.
|
|
10552
10587
|
*
|
|
@@ -10558,7 +10593,7 @@ export declare enum ModCallbackCustom {
|
|
|
10558
10593
|
* function postSpikesUpdate(spikes: GridEntitySpikes): void {}
|
|
10559
10594
|
* ```
|
|
10560
10595
|
*/
|
|
10561
|
-
POST_SPIKES_UPDATE =
|
|
10596
|
+
POST_SPIKES_UPDATE = 95,
|
|
10562
10597
|
/**
|
|
10563
10598
|
* Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
10564
10599
|
* `EntityTear.FrameCount` is equal to 0).
|
|
@@ -10576,7 +10611,7 @@ export declare enum ModCallbackCustom {
|
|
|
10576
10611
|
* function postTearInitLate(tear: EntityTear): void {}
|
|
10577
10612
|
* ```
|
|
10578
10613
|
*/
|
|
10579
|
-
POST_TEAR_INIT_LATE =
|
|
10614
|
+
POST_TEAR_INIT_LATE = 96,
|
|
10580
10615
|
/**
|
|
10581
10616
|
* Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
10582
10617
|
* `EntityTear.FrameCount` is equal to 1).
|
|
@@ -10593,7 +10628,7 @@ export declare enum ModCallbackCustom {
|
|
|
10593
10628
|
* function postTearInitVeryLate(tear: EntityTear): void {}
|
|
10594
10629
|
* ```
|
|
10595
10630
|
*/
|
|
10596
|
-
POST_TEAR_INIT_VERY_LATE =
|
|
10631
|
+
POST_TEAR_INIT_VERY_LATE = 97,
|
|
10597
10632
|
/**
|
|
10598
10633
|
* Fires from the `POST_RENDER` callback on every frame that a TNT exists.
|
|
10599
10634
|
*
|
|
@@ -10605,7 +10640,7 @@ export declare enum ModCallbackCustom {
|
|
|
10605
10640
|
* function postTNTRender(tnt: GridEntityTNT): void {}
|
|
10606
10641
|
* ```
|
|
10607
10642
|
*/
|
|
10608
|
-
POST_TNT_RENDER =
|
|
10643
|
+
POST_TNT_RENDER = 98,
|
|
10609
10644
|
/**
|
|
10610
10645
|
* Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
|
|
10611
10646
|
*
|
|
@@ -10617,7 +10652,7 @@ export declare enum ModCallbackCustom {
|
|
|
10617
10652
|
* function postTNTUpdate(tnt: GridEntityTNT): void {}
|
|
10618
10653
|
* ```
|
|
10619
10654
|
*/
|
|
10620
|
-
POST_TNT_UPDATE =
|
|
10655
|
+
POST_TNT_UPDATE = 99,
|
|
10621
10656
|
/**
|
|
10622
10657
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player gains or loses a new
|
|
10623
10658
|
* transformation.
|
|
@@ -10636,7 +10671,7 @@ export declare enum ModCallbackCustom {
|
|
|
10636
10671
|
* ): void {}
|
|
10637
10672
|
* ```
|
|
10638
10673
|
*/
|
|
10639
|
-
POST_TRANSFORMATION =
|
|
10674
|
+
POST_TRANSFORMATION = 100,
|
|
10640
10675
|
/**
|
|
10641
10676
|
* Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
|
|
10642
10677
|
*
|
|
@@ -10651,7 +10686,7 @@ export declare enum ModCallbackCustom {
|
|
|
10651
10686
|
* ): void {}
|
|
10652
10687
|
* ```
|
|
10653
10688
|
*/
|
|
10654
|
-
POST_TRINKET_BREAK =
|
|
10689
|
+
POST_TRINKET_BREAK = 101,
|
|
10655
10690
|
/**
|
|
10656
10691
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback on the frame before a Berserk effect
|
|
10657
10692
|
* ends when the player is predicted to die (e.g. they currently have no health left or they took
|
|
@@ -10667,7 +10702,7 @@ export declare enum ModCallbackCustom {
|
|
|
10667
10702
|
* function preBerserkDeath(player: EntityPlayer): void {}
|
|
10668
10703
|
* ```
|
|
10669
10704
|
*/
|
|
10670
|
-
PRE_BERSERK_DEATH =
|
|
10705
|
+
PRE_BERSERK_DEATH = 102,
|
|
10671
10706
|
/**
|
|
10672
10707
|
* Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
|
|
10673
10708
|
* to initiate a custom revival, return an integer that corresponds to the item or type of revival
|
|
@@ -10686,7 +10721,7 @@ export declare enum ModCallbackCustom {
|
|
|
10686
10721
|
* function preCustomRevive(player: EntityPlayer): int | undefined {}
|
|
10687
10722
|
* ```
|
|
10688
10723
|
*/
|
|
10689
|
-
PRE_CUSTOM_REVIVE =
|
|
10724
|
+
PRE_CUSTOM_REVIVE = 103,
|
|
10690
10725
|
/**
|
|
10691
10726
|
* The exact same thing as the vanilla `PRE_ENTITY_SPAWN` callback, except this callback allows
|
|
10692
10727
|
* you to specify extra arguments for additional filtration.
|
|
@@ -10711,7 +10746,7 @@ export declare enum ModCallbackCustom {
|
|
|
10711
10746
|
* ): [EntityType, int, int, int] | undefined {}
|
|
10712
10747
|
* ```
|
|
10713
10748
|
*/
|
|
10714
|
-
PRE_ENTITY_SPAWN_FILTER =
|
|
10749
|
+
PRE_ENTITY_SPAWN_FILTER = 104,
|
|
10715
10750
|
/**
|
|
10716
10751
|
* Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
|
|
10717
10752
|
* meets all of the conditions to pick it up.
|
|
@@ -10731,7 +10766,7 @@ export declare enum ModCallbackCustom {
|
|
|
10731
10766
|
* function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
|
|
10732
10767
|
* ```
|
|
10733
10768
|
*/
|
|
10734
|
-
PRE_GET_PEDESTAL =
|
|
10769
|
+
PRE_GET_PEDESTAL = 105,
|
|
10735
10770
|
/**
|
|
10736
10771
|
* Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item becomes queued (i.e. when
|
|
10737
10772
|
* the player begins to hold the item above their head).
|
|
@@ -10751,7 +10786,7 @@ export declare enum ModCallbackCustom {
|
|
|
10751
10786
|
* ): void {}
|
|
10752
10787
|
* ```
|
|
10753
10788
|
*/
|
|
10754
|
-
PRE_ITEM_PICKUP =
|
|
10789
|
+
PRE_ITEM_PICKUP = 106,
|
|
10755
10790
|
/**
|
|
10756
10791
|
* Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
|
|
10757
10792
|
* player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
|
|
@@ -10765,7 +10800,7 @@ export declare enum ModCallbackCustom {
|
|
|
10765
10800
|
* function preNewLevel(player: EntityPlayer): void {}
|
|
10766
10801
|
* ```
|
|
10767
10802
|
*/
|
|
10768
|
-
PRE_NEW_LEVEL =
|
|
10803
|
+
PRE_NEW_LEVEL = 107,
|
|
10769
10804
|
/**
|
|
10770
10805
|
* The exact same thing as the vanilla `PRE_NPC_COLLISION` callback, except this callback allows
|
|
10771
10806
|
* you to specify extra arguments for additional filtration.
|
|
@@ -10786,7 +10821,7 @@ export declare enum ModCallbackCustom {
|
|
|
10786
10821
|
* ): boolean | undefined {}
|
|
10787
10822
|
* ```
|
|
10788
10823
|
*/
|
|
10789
|
-
PRE_NPC_COLLISION_FILTER =
|
|
10824
|
+
PRE_NPC_COLLISION_FILTER = 108,
|
|
10790
10825
|
/**
|
|
10791
10826
|
* The exact same thing as the vanilla `PRE_NPC_UPDATE` callback, except this callback allows you
|
|
10792
10827
|
* to specify extra arguments for additional filtration.
|
|
@@ -10803,7 +10838,7 @@ export declare enum ModCallbackCustom {
|
|
|
10803
10838
|
* function preNPCUpdateFilter(entity: Entity): boolean | undefined {}
|
|
10804
10839
|
* ```
|
|
10805
10840
|
*/
|
|
10806
|
-
PRE_NPC_UPDATE_FILTER =
|
|
10841
|
+
PRE_NPC_UPDATE_FILTER = 109,
|
|
10807
10842
|
/**
|
|
10808
10843
|
* The exact same thing as the vanilla `PRE_ROOM_ENTITY_SPAWN` callback, except this callback
|
|
10809
10844
|
* allows you to specify extra arguments for additional filtration.
|
|
@@ -10826,7 +10861,7 @@ export declare enum ModCallbackCustom {
|
|
|
10826
10861
|
* ): [EntityType | GridEntityXMLType, int, int] | undefined {}
|
|
10827
10862
|
* ```
|
|
10828
10863
|
*/
|
|
10829
|
-
PRE_ROOM_ENTITY_SPAWN_FILTER =
|
|
10864
|
+
PRE_ROOM_ENTITY_SPAWN_FILTER = 110
|
|
10830
10865
|
}
|
|
10831
10866
|
|
|
10832
10867
|
/**
|
|
@@ -12120,6 +12155,19 @@ export declare interface PickingUpItemTrinket {
|
|
|
12120
12155
|
subType: TrinketType;
|
|
12121
12156
|
}
|
|
12122
12157
|
|
|
12158
|
+
declare class PickupChangeDetection extends Feature {
|
|
12159
|
+
v: {
|
|
12160
|
+
room: {
|
|
12161
|
+
pickupVariants: Map<PickupIndex, PickupVariant>;
|
|
12162
|
+
pickupSubTypes: Map<PickupIndex, number>;
|
|
12163
|
+
};
|
|
12164
|
+
};
|
|
12165
|
+
private postPickupChanged;
|
|
12166
|
+
private pickupIndexCreation;
|
|
12167
|
+
constructor(postPickupChanged: PostPickupChanged, pickupIndexCreation: PickupIndexCreation);
|
|
12168
|
+
private postPickupUpdate;
|
|
12169
|
+
}
|
|
12170
|
+
|
|
12123
12171
|
/**
|
|
12124
12172
|
* `PickupIndex` is a specific type of number that represents a unique identifier for a pickup. Mods
|
|
12125
12173
|
* can signify that data structures handle collectibles by using this type.
|
|
@@ -12506,6 +12554,11 @@ declare class PostPEffectUpdateReordered extends CustomCallback<ModCallbackCusto
|
|
|
12506
12554
|
protected shouldFire: typeof shouldFirePlayer;
|
|
12507
12555
|
}
|
|
12508
12556
|
|
|
12557
|
+
declare class PostPickupChanged extends CustomCallback<ModCallbackCustom.POST_PICKUP_CHANGED> {
|
|
12558
|
+
constructor();
|
|
12559
|
+
protected shouldFire: typeof shouldFirePickup;
|
|
12560
|
+
}
|
|
12561
|
+
|
|
12509
12562
|
declare class PostPlayerCollectibleAdded extends CustomCallback<ModCallbackCustom.POST_PLAYER_COLLECTIBLE_ADDED> {
|
|
12510
12563
|
constructor();
|
|
12511
12564
|
protected shouldFire: typeof shouldFireCollectibleType;
|
|
@@ -14391,6 +14444,14 @@ newState: int
|
|
|
14391
14444
|
|
|
14392
14445
|
declare function shouldFireItemPickup(fireArgs: [player: EntityPlayer, pickingUpItem: PickingUpItem], optionalArgs: [itemType?: ItemType, subType?: int]): boolean;
|
|
14393
14446
|
|
|
14447
|
+
declare function shouldFirePickup(fireArgs: [pickup: EntityPickup] | [pickup: EntityPickup, renderOffset: Vector] | [pickup: EntityPickup, player: EntityPlayer] | [pickup: EntityPickup, previousState: int, currentState: int] | [
|
|
14448
|
+
pickup: EntityPickup,
|
|
14449
|
+
oldVariant: PickupVariant,
|
|
14450
|
+
oldSubType: int,
|
|
14451
|
+
newVariant: PickupVariant,
|
|
14452
|
+
newSubType: int
|
|
14453
|
+
], optionalArgs: [pickupVariant?: PickupVariant, subType?: int]): boolean;
|
|
14454
|
+
|
|
14394
14455
|
declare function shouldFirePlayer(fireArgs: [player: EntityPlayer] | [player: EntityPlayer, numSacrifices: int] | [player: EntityPlayer, collectible: EntityPickupCollectible] | [player: EntityPlayer, oldCharacter: PlayerType, newCharacter: PlayerType] | [
|
|
14395
14456
|
player: EntityPlayer,
|
|
14396
14457
|
healthType: HealthType,
|