isaacscript-common 15.0.5 → 15.1.1
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.d.ts +107 -49
- package/dist/isaacscript-common.lua +165 -56
- package/dist/src/callbacks.d.ts +52 -48
- package/dist/src/callbacks.d.ts.map +1 -1
- package/dist/src/callbacks.lua +6 -0
- package/dist/src/classes/ModFeature.d.ts +10 -0
- package/dist/src/classes/ModFeature.d.ts.map +1 -1
- package/dist/src/classes/ModFeature.lua +53 -7
- package/dist/src/classes/callbacks/PostNPCInitFilter.d.ts +14 -0
- package/dist/src/classes/callbacks/PostNPCInitFilter.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostNPCInitFilter.lua +26 -0
- package/dist/src/classes/callbacks/PostNPCUpdateFilter.d.ts +14 -0
- package/dist/src/classes/callbacks/PostNPCUpdateFilter.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostNPCUpdateFilter.lua +26 -0
- package/dist/src/enums/ModCallbackCustom.d.ts +74 -48
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +52 -48
- package/dist/src/functions/arrayLua.d.ts +1 -1
- package/dist/src/functions/arrayLua.lua +1 -1
- package/dist/src/functions/decorators.d.ts.map +1 -1
- package/dist/src/functions/decorators.lua +10 -0
- package/dist/src/functions/tears.d.ts +10 -0
- package/dist/src/functions/tears.d.ts.map +1 -1
- package/dist/src/functions/tears.lua +10 -0
- package/dist/src/indexLua.d.ts +169 -0
- package/dist/src/indexLua.d.ts.map +1 -0
- package/dist/src/indexLua.lua +1042 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +12 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/callbacks.ts +4 -0
- package/src/classes/ModFeature.ts +74 -6
- package/src/classes/callbacks/PostNPCInitFilter.ts +27 -0
- package/src/classes/callbacks/PostNPCUpdateFilter.ts +27 -0
- package/src/enums/ModCallbackCustom.ts +28 -0
- package/src/functions/arrayLua.ts +1 -1
- package/src/functions/decorators.ts +23 -8
- package/src/functions/tears.ts +10 -0
- package/src/interfaces/private/AddCallbackParametersCustom.ts +14 -0
package/dist/index.d.ts
CHANGED
|
@@ -271,6 +271,12 @@ declare interface AddCallbackParametersCustom {
|
|
|
271
271
|
[ModCallbackCustom.POST_NEW_LEVEL_REORDERED]: [callback: () => void];
|
|
272
272
|
[ModCallbackCustom.POST_NEW_ROOM_EARLY]: [callback: () => void];
|
|
273
273
|
[ModCallbackCustom.POST_NEW_ROOM_REORDERED]: [callback: () => void];
|
|
274
|
+
[ModCallbackCustom.POST_NPC_INIT_FILTER]: [
|
|
275
|
+
callback: (npc: EntityNPC) => void,
|
|
276
|
+
entityType?: EntityType,
|
|
277
|
+
variant?: int,
|
|
278
|
+
subType?: int
|
|
279
|
+
];
|
|
274
280
|
[ModCallbackCustom.POST_NPC_INIT_LATE]: [
|
|
275
281
|
callback: (npc: EntityNPC) => void,
|
|
276
282
|
entityType?: EntityType,
|
|
@@ -283,6 +289,12 @@ declare interface AddCallbackParametersCustom {
|
|
|
283
289
|
variant?: int,
|
|
284
290
|
subType?: int
|
|
285
291
|
];
|
|
292
|
+
[ModCallbackCustom.POST_NPC_UPDATE_FILTER]: [
|
|
293
|
+
callback: (npc: EntityNPC) => void,
|
|
294
|
+
entityType?: EntityType,
|
|
295
|
+
variant?: int,
|
|
296
|
+
subType?: int
|
|
297
|
+
];
|
|
286
298
|
[ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED]: [
|
|
287
299
|
callback: (player: EntityPlayer) => void,
|
|
288
300
|
playerVariant?: PlayerVariant,
|
|
@@ -629,6 +641,16 @@ export declare function addSetsToSet<T>(mainSet: Set<T>, ...setsToAdd: Array<Set
|
|
|
629
641
|
* adds it to the player.
|
|
630
642
|
* - This function should only be used inside the `EVALUATE_CACHE` callback.
|
|
631
643
|
* - In this context, the "tears stat" represents what is shown on the in-game stat UI.
|
|
644
|
+
*
|
|
645
|
+
* For example:
|
|
646
|
+
*
|
|
647
|
+
* ```ts
|
|
648
|
+
* function evaluateCacheTears(player: EntityPlayer) {
|
|
649
|
+
* const numFoo = player.GetNumCollectible(CollectibleTypeCustom.FOO);
|
|
650
|
+
* const tearsStat = numFoo * FOO_TEARS_STAT;
|
|
651
|
+
* addTearsStat(player, tearsStat);
|
|
652
|
+
* }
|
|
653
|
+
* ```
|
|
632
654
|
*/
|
|
633
655
|
export declare function addTearsStat(player: EntityPlayer, tearsStat: float): void;
|
|
634
656
|
|
|
@@ -6689,7 +6711,7 @@ export declare function inBossRoomOf(bossID: BossID): boolean;
|
|
|
6689
6711
|
/**
|
|
6690
6712
|
* Helper function for non-TypeScript users to check if an element is in an array.
|
|
6691
6713
|
*
|
|
6692
|
-
* Since this takes O(N) time, using this function is usually a mistake, since you can use a `
|
|
6714
|
+
* Since this takes O(N) time, using this function is usually a mistake, since you can use a `Set`
|
|
6693
6715
|
* data structure to get O(1) lookups.
|
|
6694
6716
|
*
|
|
6695
6717
|
* Internally, this just calls `array.includes`.
|
|
@@ -9170,6 +9192,19 @@ export declare enum ModCallbackCustom {
|
|
|
9170
9192
|
* ```
|
|
9171
9193
|
*/
|
|
9172
9194
|
POST_NEW_ROOM_REORDERED = 44,
|
|
9195
|
+
/**
|
|
9196
|
+
* The exact same thing as the vanilla `POST_NPC_INIT` callback, except this callback allows you
|
|
9197
|
+
* to specify extra arguments for additional filtration.
|
|
9198
|
+
*
|
|
9199
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9200
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9201
|
+
* matches the `EntityType` provided.
|
|
9202
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9203
|
+
* matches the variant provided.
|
|
9204
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
9205
|
+
* matches the sub-type provided.
|
|
9206
|
+
*/
|
|
9207
|
+
POST_NPC_INIT_FILTER = 45,
|
|
9173
9208
|
/**
|
|
9174
9209
|
* Fires on the first `NPC_UPDATE` frame for each NPC.
|
|
9175
9210
|
*
|
|
@@ -9188,7 +9223,7 @@ export declare enum ModCallbackCustom {
|
|
|
9188
9223
|
* function postNPCInitLate(npc: EntityNPC): void {}
|
|
9189
9224
|
* ```
|
|
9190
9225
|
*/
|
|
9191
|
-
POST_NPC_INIT_LATE =
|
|
9226
|
+
POST_NPC_INIT_LATE = 46,
|
|
9192
9227
|
/**
|
|
9193
9228
|
* Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
|
|
9194
9229
|
* the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
|
|
@@ -9209,7 +9244,20 @@ export declare enum ModCallbackCustom {
|
|
|
9209
9244
|
* ): void {}
|
|
9210
9245
|
* ```
|
|
9211
9246
|
*/
|
|
9212
|
-
POST_NPC_STATE_CHANGED =
|
|
9247
|
+
POST_NPC_STATE_CHANGED = 47,
|
|
9248
|
+
/**
|
|
9249
|
+
* The exact same thing as the vanilla `POST_NPC_UPDATE` callback, except this callback allows you
|
|
9250
|
+
* to specify extra arguments for additional filtration.
|
|
9251
|
+
*
|
|
9252
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
9253
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
9254
|
+
* matches the `EntityType` provided.
|
|
9255
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
9256
|
+
* matches the variant provided.
|
|
9257
|
+
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
9258
|
+
* matches the sub-type provided.
|
|
9259
|
+
*/
|
|
9260
|
+
POST_NPC_UPDATE_FILTER = 48,
|
|
9213
9261
|
/**
|
|
9214
9262
|
* Similar to the vanilla callback of the same name, but fires after the
|
|
9215
9263
|
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
@@ -9234,7 +9282,7 @@ export declare enum ModCallbackCustom {
|
|
|
9234
9282
|
* function postPEffectUpdateReordered(player: EntityPlayer): void {}
|
|
9235
9283
|
* ```
|
|
9236
9284
|
*/
|
|
9237
|
-
POST_PEFFECT_UPDATE_REORDERED =
|
|
9285
|
+
POST_PEFFECT_UPDATE_REORDERED = 49,
|
|
9238
9286
|
/**
|
|
9239
9287
|
* Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
|
|
9240
9288
|
*
|
|
@@ -9250,7 +9298,7 @@ export declare enum ModCallbackCustom {
|
|
|
9250
9298
|
* function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
|
|
9251
9299
|
* ```
|
|
9252
9300
|
*/
|
|
9253
|
-
POST_PICKUP_COLLECT =
|
|
9301
|
+
POST_PICKUP_COLLECT = 50,
|
|
9254
9302
|
/**
|
|
9255
9303
|
* Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
|
|
9256
9304
|
* respective pickup on the run.
|
|
@@ -9268,7 +9316,7 @@ export declare enum ModCallbackCustom {
|
|
|
9268
9316
|
* function postPickupInitFirst(pickup: EntityPickup): void {}
|
|
9269
9317
|
* ```
|
|
9270
9318
|
*/
|
|
9271
|
-
POST_PICKUP_INIT_FIRST =
|
|
9319
|
+
POST_PICKUP_INIT_FIRST = 51,
|
|
9272
9320
|
/**
|
|
9273
9321
|
* Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
|
|
9274
9322
|
*
|
|
@@ -9285,7 +9333,7 @@ export declare enum ModCallbackCustom {
|
|
|
9285
9333
|
* function postPickupInitLate(pickup: EntityPickup): void {}
|
|
9286
9334
|
* ```
|
|
9287
9335
|
*/
|
|
9288
|
-
POST_PICKUP_INIT_LATE =
|
|
9336
|
+
POST_PICKUP_INIT_LATE = 52,
|
|
9289
9337
|
/**
|
|
9290
9338
|
* Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
|
|
9291
9339
|
* on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
|
|
@@ -9304,7 +9352,7 @@ export declare enum ModCallbackCustom {
|
|
|
9304
9352
|
* ): void {}
|
|
9305
9353
|
* ```
|
|
9306
9354
|
*/
|
|
9307
|
-
POST_PICKUP_STATE_CHANGED =
|
|
9355
|
+
POST_PICKUP_STATE_CHANGED = 53,
|
|
9308
9356
|
/**
|
|
9309
9357
|
* Fires from the `POST_RENDER` callback on every frame that a pit exists.
|
|
9310
9358
|
*
|
|
@@ -9316,7 +9364,7 @@ export declare enum ModCallbackCustom {
|
|
|
9316
9364
|
* function postPitRender(pit: GridEntityPit): void {}
|
|
9317
9365
|
* ```
|
|
9318
9366
|
*/
|
|
9319
|
-
POST_PIT_RENDER =
|
|
9367
|
+
POST_PIT_RENDER = 54,
|
|
9320
9368
|
/**
|
|
9321
9369
|
* Fires from the `POST_UPDATE` callback on every frame that a pit exists.
|
|
9322
9370
|
*
|
|
@@ -9328,7 +9376,7 @@ export declare enum ModCallbackCustom {
|
|
|
9328
9376
|
* function postPitUpdate(pit: GridEntityPit): void {}
|
|
9329
9377
|
* ```
|
|
9330
9378
|
*/
|
|
9331
|
-
POST_PIT_UPDATE =
|
|
9379
|
+
POST_PIT_UPDATE = 55,
|
|
9332
9380
|
/**
|
|
9333
9381
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's health (i.e. hearts) is different
|
|
9334
9382
|
* than what it was on the previous frame. For more information, see the `PlayerHealth` enum.
|
|
@@ -9349,7 +9397,7 @@ export declare enum ModCallbackCustom {
|
|
|
9349
9397
|
* ): void {}
|
|
9350
9398
|
* ```
|
|
9351
9399
|
*/
|
|
9352
|
-
POST_PLAYER_CHANGE_HEALTH =
|
|
9400
|
+
POST_PLAYER_CHANGE_HEALTH = 56,
|
|
9353
9401
|
/**
|
|
9354
9402
|
* Fires from the `POST_PEFFECT_UPDATE` callback when one of the player's stats change from what
|
|
9355
9403
|
* they were on the previous frame.
|
|
@@ -9379,7 +9427,7 @@ export declare enum ModCallbackCustom {
|
|
|
9379
9427
|
* ) => void {}
|
|
9380
9428
|
* ```
|
|
9381
9429
|
*/
|
|
9382
|
-
POST_PLAYER_CHANGE_STAT =
|
|
9430
|
+
POST_PLAYER_CHANGE_STAT = 57,
|
|
9383
9431
|
/**
|
|
9384
9432
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player entity changes its player type
|
|
9385
9433
|
* (i.e. character) from what it was on the previous frame. For example, it will fire after using
|
|
@@ -9401,7 +9449,7 @@ export declare enum ModCallbackCustom {
|
|
|
9401
9449
|
* ): void {}
|
|
9402
9450
|
* ```
|
|
9403
9451
|
*/
|
|
9404
|
-
POST_PLAYER_CHANGE_TYPE =
|
|
9452
|
+
POST_PLAYER_CHANGE_TYPE = 58,
|
|
9405
9453
|
/**
|
|
9406
9454
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is higher than
|
|
9407
9455
|
* what it was on the previous frame, or when the active items change, or when the build is
|
|
@@ -9418,7 +9466,7 @@ export declare enum ModCallbackCustom {
|
|
|
9418
9466
|
* ): void {}
|
|
9419
9467
|
* ```
|
|
9420
9468
|
*/
|
|
9421
|
-
POST_PLAYER_COLLECTIBLE_ADDED =
|
|
9469
|
+
POST_PLAYER_COLLECTIBLE_ADDED = 59,
|
|
9422
9470
|
/**
|
|
9423
9471
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is lower than
|
|
9424
9472
|
* what it was on the previous frame, or when the active items change, or when the build is
|
|
@@ -9435,7 +9483,7 @@ export declare enum ModCallbackCustom {
|
|
|
9435
9483
|
* ): void {}
|
|
9436
9484
|
* ```
|
|
9437
9485
|
*/
|
|
9438
|
-
POST_PLAYER_COLLECTIBLE_REMOVED =
|
|
9486
|
+
POST_PLAYER_COLLECTIBLE_REMOVED = 60,
|
|
9439
9487
|
/**
|
|
9440
9488
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
|
|
9441
9489
|
* prevent the fatal damage.
|
|
@@ -9453,7 +9501,7 @@ export declare enum ModCallbackCustom {
|
|
|
9453
9501
|
* function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
|
|
9454
9502
|
* ```
|
|
9455
9503
|
*/
|
|
9456
|
-
POST_PLAYER_FATAL_DAMAGE =
|
|
9504
|
+
POST_PLAYER_FATAL_DAMAGE = 61,
|
|
9457
9505
|
/**
|
|
9458
9506
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
|
|
9459
9507
|
* `POST_PLAYER_INIT_LATE` callback, with two changes:
|
|
@@ -9475,7 +9523,7 @@ export declare enum ModCallbackCustom {
|
|
|
9475
9523
|
* function postPlayerInitFirst(player: EntityPlayer): void {}
|
|
9476
9524
|
* ```
|
|
9477
9525
|
*/
|
|
9478
|
-
POST_PLAYER_INIT_FIRST =
|
|
9526
|
+
POST_PLAYER_INIT_FIRST = 62,
|
|
9479
9527
|
/**
|
|
9480
9528
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
|
|
9481
9529
|
*
|
|
@@ -9495,7 +9543,7 @@ export declare enum ModCallbackCustom {
|
|
|
9495
9543
|
* function postPlayerInitLate(pickup: EntityPickup): void {}
|
|
9496
9544
|
* ```
|
|
9497
9545
|
*/
|
|
9498
|
-
POST_PLAYER_INIT_LATE =
|
|
9546
|
+
POST_PLAYER_INIT_LATE = 63,
|
|
9499
9547
|
/**
|
|
9500
9548
|
* Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
|
|
9501
9549
|
* callback fires (if the player is spawning on the 0th game frame of the run).
|
|
@@ -9519,7 +9567,7 @@ export declare enum ModCallbackCustom {
|
|
|
9519
9567
|
* function postPlayerRenderReordered(player: EntityPlayer): void {}
|
|
9520
9568
|
* ```
|
|
9521
9569
|
*/
|
|
9522
|
-
POST_PLAYER_RENDER_REORDERED =
|
|
9570
|
+
POST_PLAYER_RENDER_REORDERED = 64,
|
|
9523
9571
|
/**
|
|
9524
9572
|
* Similar to the vanilla callback of the same name, but fires after the
|
|
9525
9573
|
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
@@ -9544,7 +9592,7 @@ export declare enum ModCallbackCustom {
|
|
|
9544
9592
|
* function postPlayerUpdateReordered(player: EntityPlayer): void {}
|
|
9545
9593
|
* ```
|
|
9546
9594
|
*/
|
|
9547
|
-
POST_PLAYER_UPDATE_REORDERED =
|
|
9595
|
+
POST_PLAYER_UPDATE_REORDERED = 65,
|
|
9548
9596
|
/**
|
|
9549
9597
|
* Fires from the `POST_RENDER` callback on every frame that a poop exists.
|
|
9550
9598
|
*
|
|
@@ -9556,7 +9604,7 @@ export declare enum ModCallbackCustom {
|
|
|
9556
9604
|
* function postPoopRender(poop: GridEntityPoop): void {}
|
|
9557
9605
|
* ```
|
|
9558
9606
|
*/
|
|
9559
|
-
POST_POOP_RENDER =
|
|
9607
|
+
POST_POOP_RENDER = 66,
|
|
9560
9608
|
/**
|
|
9561
9609
|
* Fires from the `POST_UPDATE` callback on every frame that a poop exists.
|
|
9562
9610
|
*
|
|
@@ -9568,7 +9616,7 @@ export declare enum ModCallbackCustom {
|
|
|
9568
9616
|
* function postPoopUpdate(poop: GridEntityPoop): void {}
|
|
9569
9617
|
* ```
|
|
9570
9618
|
*/
|
|
9571
|
-
POST_POOP_UPDATE =
|
|
9619
|
+
POST_POOP_UPDATE = 67,
|
|
9572
9620
|
/**
|
|
9573
9621
|
* Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
|
|
9574
9622
|
*
|
|
@@ -9580,7 +9628,7 @@ export declare enum ModCallbackCustom {
|
|
|
9580
9628
|
* function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
|
|
9581
9629
|
* ```
|
|
9582
9630
|
*/
|
|
9583
|
-
POST_PRESSURE_PLATE_RENDER =
|
|
9631
|
+
POST_PRESSURE_PLATE_RENDER = 68,
|
|
9584
9632
|
/**
|
|
9585
9633
|
* Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
|
|
9586
9634
|
*
|
|
@@ -9592,7 +9640,7 @@ export declare enum ModCallbackCustom {
|
|
|
9592
9640
|
* function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
|
|
9593
9641
|
* ```
|
|
9594
9642
|
*/
|
|
9595
|
-
POST_PRESSURE_PLATE_UPDATE =
|
|
9643
|
+
POST_PRESSURE_PLATE_UPDATE = 69,
|
|
9596
9644
|
/**
|
|
9597
9645
|
* Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
|
|
9598
9646
|
*
|
|
@@ -9609,7 +9657,7 @@ export declare enum ModCallbackCustom {
|
|
|
9609
9657
|
* function postProjectileInitLate(projectile: EntityProjectile): void {}
|
|
9610
9658
|
* ```
|
|
9611
9659
|
*/
|
|
9612
|
-
POST_PROJECTILE_INIT_LATE =
|
|
9660
|
+
POST_PROJECTILE_INIT_LATE = 70,
|
|
9613
9661
|
/**
|
|
9614
9662
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player first picks up a new item. The
|
|
9615
9663
|
* pickup returned in the callback is assumed to be the first pickup that no longer exists.
|
|
@@ -9624,7 +9672,7 @@ export declare enum ModCallbackCustom {
|
|
|
9624
9672
|
* function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
|
|
9625
9673
|
* ```
|
|
9626
9674
|
*/
|
|
9627
|
-
POST_PURCHASE =
|
|
9675
|
+
POST_PURCHASE = 71,
|
|
9628
9676
|
/**
|
|
9629
9677
|
* Fires from the `POST_RENDER` callback on every frame that a rock exists.
|
|
9630
9678
|
*
|
|
@@ -9638,7 +9686,7 @@ export declare enum ModCallbackCustom {
|
|
|
9638
9686
|
* function postRockRender(rock: GridEntityRock): void {}
|
|
9639
9687
|
* ```
|
|
9640
9688
|
*/
|
|
9641
|
-
POST_ROCK_RENDER =
|
|
9689
|
+
POST_ROCK_RENDER = 72,
|
|
9642
9690
|
/**
|
|
9643
9691
|
* Fires from the `POST_UPDATE` callback on every frame that a rock exists.
|
|
9644
9692
|
*
|
|
@@ -9652,7 +9700,7 @@ export declare enum ModCallbackCustom {
|
|
|
9652
9700
|
* function postRockUpdate(rock: GridEntityRock): void {}
|
|
9653
9701
|
* ```
|
|
9654
9702
|
*/
|
|
9655
|
-
POST_ROCK_UPDATE =
|
|
9703
|
+
POST_ROCK_UPDATE = 73,
|
|
9656
9704
|
/**
|
|
9657
9705
|
* Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
|
|
9658
9706
|
* the `Room.IsClear` method).
|
|
@@ -9669,7 +9717,7 @@ export declare enum ModCallbackCustom {
|
|
|
9669
9717
|
* function postRoomClearChanged(roomClear: boolean): void {}
|
|
9670
9718
|
* ```
|
|
9671
9719
|
*/
|
|
9672
|
-
POST_ROOM_CLEAR_CHANGED =
|
|
9720
|
+
POST_ROOM_CLEAR_CHANGED = 74,
|
|
9673
9721
|
/**
|
|
9674
9722
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
|
|
9675
9723
|
* Room.
|
|
@@ -9684,7 +9732,7 @@ export declare enum ModCallbackCustom {
|
|
|
9684
9732
|
* function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
|
|
9685
9733
|
* ```
|
|
9686
9734
|
*/
|
|
9687
|
-
POST_SACRIFICE =
|
|
9735
|
+
POST_SACRIFICE = 75,
|
|
9688
9736
|
/**
|
|
9689
9737
|
* Fires from the `POST_RENDER` callback when a slot entity's animation changes.
|
|
9690
9738
|
*
|
|
@@ -9698,7 +9746,7 @@ export declare enum ModCallbackCustom {
|
|
|
9698
9746
|
* function postSlotAnimationChanged(slot: Entity): void {}
|
|
9699
9747
|
* ```
|
|
9700
9748
|
*/
|
|
9701
|
-
POST_SLOT_ANIMATION_CHANGED =
|
|
9749
|
+
POST_SLOT_ANIMATION_CHANGED = 76,
|
|
9702
9750
|
/**
|
|
9703
9751
|
* Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
|
|
9704
9752
|
* (It will not fire if any other type of entity collides with the slot entity.)
|
|
@@ -9722,7 +9770,7 @@ export declare enum ModCallbackCustom {
|
|
|
9722
9770
|
* ): void {}
|
|
9723
9771
|
* ```
|
|
9724
9772
|
*/
|
|
9725
|
-
POST_SLOT_COLLISION =
|
|
9773
|
+
POST_SLOT_COLLISION = 77,
|
|
9726
9774
|
/**
|
|
9727
9775
|
* Fires from the `POST_RENDER` callback when a slot plays the animation that indicates that it
|
|
9728
9776
|
* has broken.
|
|
@@ -9737,7 +9785,7 @@ export declare enum ModCallbackCustom {
|
|
|
9737
9785
|
* function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
|
|
9738
9786
|
* ```
|
|
9739
9787
|
*/
|
|
9740
|
-
POST_SLOT_DESTROYED =
|
|
9788
|
+
POST_SLOT_DESTROYED = 78,
|
|
9741
9789
|
/**
|
|
9742
9790
|
* Fires when a new slot entity is initialized. Specifically, this is either:
|
|
9743
9791
|
*
|
|
@@ -9756,7 +9804,7 @@ export declare enum ModCallbackCustom {
|
|
|
9756
9804
|
* function postSlotInit(slot: Entity): void {}
|
|
9757
9805
|
* ```
|
|
9758
9806
|
*/
|
|
9759
|
-
POST_SLOT_INIT =
|
|
9807
|
+
POST_SLOT_INIT = 79,
|
|
9760
9808
|
/**
|
|
9761
9809
|
* Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
|
|
9762
9810
|
*
|
|
@@ -9770,7 +9818,7 @@ export declare enum ModCallbackCustom {
|
|
|
9770
9818
|
* function postSlotRender(slot: Entity): void {}
|
|
9771
9819
|
* ```
|
|
9772
9820
|
*/
|
|
9773
|
-
POST_SLOT_RENDER =
|
|
9821
|
+
POST_SLOT_RENDER = 80,
|
|
9774
9822
|
/**
|
|
9775
9823
|
* Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
|
|
9776
9824
|
*
|
|
@@ -9784,7 +9832,7 @@ export declare enum ModCallbackCustom {
|
|
|
9784
9832
|
* function postSlotUpdate(slot: Entity): void {}
|
|
9785
9833
|
* ```
|
|
9786
9834
|
*/
|
|
9787
|
-
POST_SLOT_UPDATE =
|
|
9835
|
+
POST_SLOT_UPDATE = 81,
|
|
9788
9836
|
/**
|
|
9789
9837
|
* Fires from the `POST_RENDER` callback on every frame that spikes exist.
|
|
9790
9838
|
*
|
|
@@ -9796,7 +9844,7 @@ export declare enum ModCallbackCustom {
|
|
|
9796
9844
|
* function postSpikesRender(spikes: GridEntitySpikes): void {}
|
|
9797
9845
|
* ```
|
|
9798
9846
|
*/
|
|
9799
|
-
POST_SPIKES_RENDER =
|
|
9847
|
+
POST_SPIKES_RENDER = 82,
|
|
9800
9848
|
/**
|
|
9801
9849
|
* Fires from the `POST_UPDATE` callback on every frame that spikes exist.
|
|
9802
9850
|
*
|
|
@@ -9808,7 +9856,7 @@ export declare enum ModCallbackCustom {
|
|
|
9808
9856
|
* function postSpikesUpdate(spikes: GridEntitySpikes): void {}
|
|
9809
9857
|
* ```
|
|
9810
9858
|
*/
|
|
9811
|
-
POST_SPIKES_UPDATE =
|
|
9859
|
+
POST_SPIKES_UPDATE = 83,
|
|
9812
9860
|
/**
|
|
9813
9861
|
* Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
9814
9862
|
* `EntityTear.FrameCount` is equal to 0).
|
|
@@ -9826,7 +9874,7 @@ export declare enum ModCallbackCustom {
|
|
|
9826
9874
|
* function postTearInitLate(tear: EntityTear): void {}
|
|
9827
9875
|
* ```
|
|
9828
9876
|
*/
|
|
9829
|
-
POST_TEAR_INIT_LATE =
|
|
9877
|
+
POST_TEAR_INIT_LATE = 84,
|
|
9830
9878
|
/**
|
|
9831
9879
|
* Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
9832
9880
|
* `EntityTear.FrameCount` is equal to 1).
|
|
@@ -9843,7 +9891,7 @@ export declare enum ModCallbackCustom {
|
|
|
9843
9891
|
* function postTearInitVeryLate(tear: EntityTear): void {}
|
|
9844
9892
|
* ```
|
|
9845
9893
|
*/
|
|
9846
|
-
POST_TEAR_INIT_VERY_LATE =
|
|
9894
|
+
POST_TEAR_INIT_VERY_LATE = 85,
|
|
9847
9895
|
/**
|
|
9848
9896
|
* Fires from the `POST_RENDER` callback on every frame that a TNT exists.
|
|
9849
9897
|
*
|
|
@@ -9855,7 +9903,7 @@ export declare enum ModCallbackCustom {
|
|
|
9855
9903
|
* function postTNTRender(tnt: GridEntityTNT): void {}
|
|
9856
9904
|
* ```
|
|
9857
9905
|
*/
|
|
9858
|
-
POST_TNT_RENDER =
|
|
9906
|
+
POST_TNT_RENDER = 86,
|
|
9859
9907
|
/**
|
|
9860
9908
|
* Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
|
|
9861
9909
|
*
|
|
@@ -9867,7 +9915,7 @@ export declare enum ModCallbackCustom {
|
|
|
9867
9915
|
* function postTNTUpdate(tnt: GridEntityTNT): void {}
|
|
9868
9916
|
* ```
|
|
9869
9917
|
*/
|
|
9870
|
-
POST_TNT_UPDATE =
|
|
9918
|
+
POST_TNT_UPDATE = 87,
|
|
9871
9919
|
/**
|
|
9872
9920
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player gains or loses a new
|
|
9873
9921
|
* transformation.
|
|
@@ -9886,7 +9934,7 @@ export declare enum ModCallbackCustom {
|
|
|
9886
9934
|
* ): void {}
|
|
9887
9935
|
* ```
|
|
9888
9936
|
*/
|
|
9889
|
-
POST_TRANSFORMATION =
|
|
9937
|
+
POST_TRANSFORMATION = 88,
|
|
9890
9938
|
/**
|
|
9891
9939
|
* Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
|
|
9892
9940
|
*
|
|
@@ -9901,7 +9949,7 @@ export declare enum ModCallbackCustom {
|
|
|
9901
9949
|
* ): void {}
|
|
9902
9950
|
* ```
|
|
9903
9951
|
*/
|
|
9904
|
-
POST_TRINKET_BREAK =
|
|
9952
|
+
POST_TRINKET_BREAK = 89,
|
|
9905
9953
|
/**
|
|
9906
9954
|
* Fires from the `POST_PEFFECT_UPDATE` callback on the frame before a Berserk effect ends when
|
|
9907
9955
|
* the player is predicted to die (e.g. they currently have no health left or they took damage in
|
|
@@ -9917,7 +9965,7 @@ export declare enum ModCallbackCustom {
|
|
|
9917
9965
|
* function preBerserkDeath(player: EntityPlayer): void {}
|
|
9918
9966
|
* ```
|
|
9919
9967
|
*/
|
|
9920
|
-
PRE_BERSERK_DEATH =
|
|
9968
|
+
PRE_BERSERK_DEATH = 90,
|
|
9921
9969
|
/**
|
|
9922
9970
|
* Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
|
|
9923
9971
|
* to initiate a custom revival, return an integer that corresponds to the item or type of revival
|
|
@@ -9936,7 +9984,7 @@ export declare enum ModCallbackCustom {
|
|
|
9936
9984
|
* function preCustomRevive(player: EntityPlayer): int | undefined {}
|
|
9937
9985
|
* ```
|
|
9938
9986
|
*/
|
|
9939
|
-
PRE_CUSTOM_REVIVE =
|
|
9987
|
+
PRE_CUSTOM_REVIVE = 91,
|
|
9940
9988
|
/**
|
|
9941
9989
|
* Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
|
|
9942
9990
|
* meets all of the conditions to pick it up.
|
|
@@ -9956,7 +10004,7 @@ export declare enum ModCallbackCustom {
|
|
|
9956
10004
|
* function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
|
|
9957
10005
|
* ```
|
|
9958
10006
|
*/
|
|
9959
|
-
PRE_GET_PEDESTAL =
|
|
10007
|
+
PRE_GET_PEDESTAL = 92,
|
|
9960
10008
|
/**
|
|
9961
10009
|
* Fires from the `POST_PEFFECT_UPDATE` callback when an item becomes queued (i.e. when the player
|
|
9962
10010
|
* begins to hold the item above their head).
|
|
@@ -9976,7 +10024,7 @@ export declare enum ModCallbackCustom {
|
|
|
9976
10024
|
* ): void {}
|
|
9977
10025
|
* ```
|
|
9978
10026
|
*/
|
|
9979
|
-
PRE_ITEM_PICKUP =
|
|
10027
|
+
PRE_ITEM_PICKUP = 93,
|
|
9980
10028
|
/**
|
|
9981
10029
|
* Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
|
|
9982
10030
|
* player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
|
|
@@ -9990,7 +10038,7 @@ export declare enum ModCallbackCustom {
|
|
|
9990
10038
|
* function preNewLevel(player: EntityPlayer): void {}
|
|
9991
10039
|
* ```
|
|
9992
10040
|
*/
|
|
9993
|
-
PRE_NEW_LEVEL =
|
|
10041
|
+
PRE_NEW_LEVEL = 94
|
|
9994
10042
|
}
|
|
9995
10043
|
|
|
9996
10044
|
/**
|
|
@@ -10609,10 +10657,20 @@ declare class ModdedElementSets extends Feature {
|
|
|
10609
10657
|
* mod features from this class in order to enable the `@Callback` and `@CustomCallback` decorators
|
|
10610
10658
|
* that automatically subscribe to callbacks.
|
|
10611
10659
|
*
|
|
10660
|
+
* If your feature has variables that are managed by the save data manager, put them as a `v` class
|
|
10661
|
+
* member and they will automatically be registered with the save data manager when the class is
|
|
10662
|
+
* instantiated.
|
|
10663
|
+
*
|
|
10612
10664
|
* For example:
|
|
10613
10665
|
*
|
|
10614
10666
|
* ```ts
|
|
10615
10667
|
* export class MyFeature extends ModFeature {
|
|
10668
|
+
* v = {
|
|
10669
|
+
* run: {
|
|
10670
|
+
* foo: 123,
|
|
10671
|
+
* }
|
|
10672
|
+
* }
|
|
10673
|
+
*
|
|
10616
10674
|
* @Callback(ModCallback.POST_GAME_STARTED)
|
|
10617
10675
|
* postGameStarted(isContinued: boolean): void {
|
|
10618
10676
|
* Isaac.DebugString(`Callback fired: POST_GAME_STARTED`);
|