isaacscript-common 13.3.4 → 14.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.
- package/dist/index.d.ts +576 -401
- package/dist/isaacscript-common.lua +14654 -13908
- package/dist/src/callbacks/postAmbush.d.ts.map +1 -1
- package/dist/src/callbacks/postAmbush.lua +7 -12
- package/dist/src/callbacks/postBombExploded.lua +3 -3
- package/dist/src/callbacks/postRoomClearChanged.d.ts.map +1 -1
- package/dist/src/callbacks/postRoomClearChanged.lua +3 -5
- package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts → postBombExploded.d.ts} +1 -1
- package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts.map → postBombExploded.d.ts.map} +1 -1
- package/dist/src/callbacks/subscriptions/{postBoneExploded.lua → postBombExploded.lua} +0 -0
- package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts +4 -2
- package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCursedTeleport.lua +13 -1
- package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.lua +2 -2
- package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -2
- package/dist/src/classes/ModUpgraded.d.ts +9 -5
- package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
- package/dist/src/classes/ModUpgraded.lua +101 -14
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +12 -0
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostAmbushFinished.lua +37 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +12 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.lua +37 -0
- package/dist/src/classes/callbacks/PostBombExploded.d.ts +7 -0
- package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBombExploded.lua +24 -0
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts +12 -0
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBombInitLate.lua +27 -0
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts +15 -0
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBoneSwing.lua +43 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +17 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +47 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +13 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +32 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +21 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.lua +113 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts +12 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.lua +27 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts +14 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.lua +65 -0
- package/dist/src/classes/callbacks/PostPitRender.d.ts +7 -0
- package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPitRender.lua +24 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +13 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.lua +33 -0
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts +7 -0
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostSpikesRender.lua +24 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.lua +20 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.lua +23 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +20 -0
- package/dist/src/classes/private/CustomCallback.d.ts +32 -0
- package/dist/src/classes/private/CustomCallback.d.ts.map +1 -0
- package/dist/src/classes/private/CustomCallback.lua +53 -0
- package/dist/src/core/upgradeMod.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.lua +16 -0
- package/dist/src/enums/IsaacScriptCommonFeature.d.ts +35 -0
- package/dist/src/enums/IsaacScriptCommonFeature.d.ts.map +1 -0
- package/dist/src/enums/IsaacScriptCommonFeature.lua +35 -0
- package/dist/src/enums/LadderSubTypeCustom.d.ts +17 -0
- package/dist/src/enums/LadderSubTypeCustom.d.ts.map +1 -0
- package/dist/src/enums/LadderSubTypeCustom.lua +19 -0
- package/dist/src/enums/ModCallbackCustom.d.ts +399 -327
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +85 -87
- package/dist/src/enums/ModCallbackCustom2.d.ts +17 -0
- package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -0
- package/dist/src/enums/ModCallbackCustom2.lua +30 -0
- package/dist/src/features/{setHotkey.d.ts → customHotkeys.d.ts} +1 -1
- package/dist/src/features/customHotkeys.d.ts.map +1 -0
- package/dist/src/features/{setHotkey.lua → customHotkeys.lua} +2 -2
- package/dist/src/features/customPickup.d.ts.map +1 -1
- package/dist/src/features/customPickup.lua +6 -2
- package/dist/src/features/customStage/backdrop.d.ts.map +1 -1
- package/dist/src/features/customStage/backdrop.lua +3 -1
- package/dist/src/features/customStage/shadows.d.ts.map +1 -1
- package/dist/src/features/customStage/shadows.lua +3 -1
- package/dist/src/features/customTrapdoor/init.lua +1 -7
- package/dist/src/features/firstLast.d.ts.map +1 -1
- package/dist/src/features/firstLast.lua +3 -3
- package/dist/src/features/saveDataManager/main.d.ts +5 -2
- package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/main.lua +3 -5
- package/dist/src/functions/ambush.d.ts +6 -0
- package/dist/src/functions/ambush.d.ts.map +1 -1
- package/dist/src/functions/ambush.lua +31 -0
- package/dist/src/functions/minimap.d.ts +4 -0
- package/dist/src/functions/minimap.d.ts.map +1 -1
- package/dist/src/functions/minimap.lua +4 -0
- package/dist/src/functions/roomTransition.d.ts +3 -4
- package/dist/src/functions/roomTransition.d.ts.map +1 -1
- package/dist/src/functions/roomTransition.lua +4 -32
- package/dist/src/functions/spawnCollectible.d.ts +24 -5
- package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/src/functions/spawnCollectible.lua +44 -4
- package/dist/src/functions/utils.d.ts +7 -2
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +7 -2
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +26 -10
- package/dist/src/initCustomCallbacks.d.ts.map +1 -1
- package/dist/src/initCustomCallbacks.lua +0 -3
- package/dist/src/initFeatures.lua +3 -3
- package/dist/src/interfaces/private/{AddCallbackParameterCustom.d.ts → AddCallbackParametersCustom.d.ts} +3 -5
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -0
- package/dist/src/interfaces/private/{AddCallbackParameterCustom.lua → AddCallbackParametersCustom.lua} +0 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +55 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +4 -0
- package/dist/src/objects/callbackRegisterFunctions.d.ts +1 -1
- package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/src/objects/callbackRegisterFunctions.lua +2 -5
- package/dist/src/types/private/AllButFirst.d.ts +5 -0
- package/dist/src/types/private/AllButFirst.d.ts.map +1 -0
- package/dist/src/types/private/AllButFirst.lua +2 -0
- package/dist/src/types/private/CallbackTuple.d.ts +20 -0
- package/dist/src/types/private/CallbackTuple.d.ts.map +1 -0
- package/dist/src/types/private/CallbackTuple.lua +2 -0
- package/dist/src/types/private/MatchingCallbackCustom.d.ts +14 -0
- package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -0
- package/dist/src/types/private/MatchingCallbackCustom.lua +2 -0
- package/package.json +2 -2
- package/src/callbacks/postAmbush.ts +7 -14
- package/src/callbacks/postBombExploded.ts +1 -1
- package/src/callbacks/postBoneSwing.ts +2 -1
- package/src/callbacks/postCollectibleEmpty.ts +2 -0
- package/src/callbacks/postCollectibleInitFirst.ts +2 -0
- package/src/callbacks/postNewRoomEarly.ts +1 -1
- package/src/callbacks/postRoomClearChanged.ts +3 -7
- package/src/callbacks/subscriptions/{postBoneExploded.ts → postBombExploded.ts} +0 -0
- package/src/callbacks/subscriptions/postCollectibleEmpty.ts +1 -1
- package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +1 -1
- package/src/callbacks/subscriptions/postCursedTeleport.ts +24 -1
- package/src/callbacks/subscriptions/postHolyMantleRemoved.ts +9 -2
- package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +9 -2
- package/src/classes/ModUpgraded.ts +118 -27
- package/src/classes/callbacks/PostAmbushFinished.ts +39 -0
- package/src/classes/callbacks/PostAmbushStarted.ts +39 -0
- package/src/classes/callbacks/PostBombExploded.ts +21 -0
- package/src/classes/callbacks/PostBombInitLate.ts +28 -0
- package/src/classes/callbacks/PostBoneSwing.ts +58 -0
- package/src/classes/callbacks/PostCollectibleEmpty.ts +72 -0
- package/src/classes/callbacks/PostCollectibleInitFirst.ts +37 -0
- package/src/classes/callbacks/PostCursedTeleport.ts +183 -0
- package/src/classes/callbacks/PostKnifeInitLate.ts +28 -0
- package/src/classes/callbacks/PostNewRoomEarly.ts +93 -0
- package/src/classes/callbacks/PostPitRender.ts +21 -0
- package/src/classes/callbacks/PostRoomClearChanged.ts +40 -0
- package/src/classes/callbacks/PostSpikesRender.ts +21 -0
- package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +28 -0
- package/src/classes/callbacks/validation/CustomCallbackBomb.ts +27 -0
- package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +30 -0
- package/src/classes/callbacks/validation/CustomCallbackKnife.ts +27 -0
- package/src/classes/callbacks/validation/CustomCallbackPit.ts +28 -0
- package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +37 -0
- package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +28 -0
- package/src/classes/private/CustomCallback.ts +79 -0
- package/src/core/upgradeMod.ts +16 -2
- package/src/enums/IsaacScriptCommonFeature.ts +34 -0
- package/src/enums/LadderSubTypeCustom.ts +17 -0
- package/src/enums/ModCallbackCustom.ts +314 -243
- package/src/enums/ModCallbackCustom2.ts +17 -0
- package/src/features/{setHotkey.ts → customHotkeys.ts} +2 -2
- package/src/features/customPickup.ts +4 -2
- package/src/features/customStage/backdrop.ts +2 -1
- package/src/features/customStage/shadows.ts +2 -1
- package/src/features/customTrapdoor/init.ts +0 -1
- package/src/features/firstLast.ts +3 -7
- package/src/features/saveDataManager/main.ts +32 -21
- package/src/functions/ambush.ts +26 -1
- package/src/functions/minimap.ts +4 -0
- package/src/functions/roomTransition.ts +3 -27
- package/src/functions/spawnCollectible.ts +44 -4
- package/src/functions/utils.ts +7 -2
- package/src/index.ts +4 -2
- package/src/initCustomCallbacks.ts +1 -2
- package/src/initFeatures.ts +2 -2
- package/src/interfaces/private/{AddCallbackParameterCustom.ts → AddCallbackParametersCustom.ts} +2 -24
- package/src/interfaces/private/AddCallbackParametersCustom2.ts +79 -0
- package/src/objects/callbackRegisterFunctions.ts +2 -4
- package/src/types/private/AllButFirst.ts +6 -0
- package/src/types/private/CallbackTuple.ts +21 -0
- package/src/types/private/MatchingCallbackCustom.ts +26 -0
- package/dist/src/callbacks/postCustomDoorEnter.d.ts +0 -6
- package/dist/src/callbacks/postCustomDoorEnter.d.ts.map +0 -1
- package/dist/src/callbacks/postCustomDoorEnter.lua +0 -199
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts +0 -9
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +0 -1
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.lua +0 -29
- package/dist/src/classes/CustomCallback.d.ts +0 -8
- package/dist/src/classes/CustomCallback.d.ts.map +0 -1
- package/dist/src/classes/CustomCallback.lua +0 -28
- package/dist/src/features/customDoor.d.ts +0 -51
- package/dist/src/features/customDoor.d.ts.map +0 -1
- package/dist/src/features/customDoor.lua +0 -53
- package/dist/src/features/setHotkey.d.ts.map +0 -1
- package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +0 -1
- package/src/callbacks/postCustomDoorEnter.ts +0 -250
- package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -42
- package/src/classes/CustomCallback.ts +0 -23
- package/src/features/customDoor.ts +0 -66
|
@@ -11,8 +11,9 @@ export declare enum ModCallbackCustom {
|
|
|
11
11
|
* Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is started.
|
|
12
12
|
* Specifically, this happens on the first frame that `Room.IsAmbushDone` is true.
|
|
13
13
|
*
|
|
14
|
-
* When registering the callback
|
|
15
|
-
* only fire if
|
|
14
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
15
|
+
* an optional third argument that will make the callback only fire if it matches the `AmbushType`
|
|
16
|
+
* provided.
|
|
16
17
|
*
|
|
17
18
|
* ```ts
|
|
18
19
|
* function postAmbushFinished(ambushType: AmbushType): void {}
|
|
@@ -23,8 +24,9 @@ export declare enum ModCallbackCustom {
|
|
|
23
24
|
* Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is completed.
|
|
24
25
|
* Specifically, this happens on the first frame that `Room.IsAmbushActive` is true.
|
|
25
26
|
*
|
|
26
|
-
* When registering the callback
|
|
27
|
-
* only fire if
|
|
27
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
28
|
+
* an optional third argument that will make the callback only fire if it matches the `AmbushType`
|
|
29
|
+
* provided.
|
|
28
30
|
*
|
|
29
31
|
* ```ts
|
|
30
32
|
* function postAmbushStarted(ambushType: AmbushType): void {}
|
|
@@ -34,8 +36,9 @@ export declare enum ModCallbackCustom {
|
|
|
34
36
|
/**
|
|
35
37
|
* Fires on the `POST_BOMB_UPDATE` callback that it explodes.
|
|
36
38
|
*
|
|
37
|
-
* When registering the callback
|
|
38
|
-
* only fire if
|
|
39
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
40
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
41
|
+
* `BombVariant` provided.
|
|
39
42
|
*
|
|
40
43
|
* ```ts
|
|
41
44
|
* function postBombDetonated(bomb: EntityBomb): void {}
|
|
@@ -48,8 +51,9 @@ export declare enum ModCallbackCustom {
|
|
|
48
51
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
49
52
|
* normal `POST_BOMB_INIT` callback.
|
|
50
53
|
*
|
|
51
|
-
* When registering the callback
|
|
52
|
-
* only fire if
|
|
54
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
55
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
56
|
+
* `BombVariant` provided.
|
|
53
57
|
*
|
|
54
58
|
* ```ts
|
|
55
59
|
* function postBombInitLate(bomb: EntityBomb): void {}
|
|
@@ -68,8 +72,9 @@ export declare enum ModCallbackCustom {
|
|
|
68
72
|
* Fires from the `POST_PICKUP_UPDATE` callback when a collectible goes from a non-zero sub-type
|
|
69
73
|
* to `CollectibleType.NULL` (i.e. an "empty" pedestal).
|
|
70
74
|
*
|
|
71
|
-
* When registering the callback
|
|
72
|
-
* only fire if the
|
|
75
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
76
|
+
* an optional third argument that will make the callback only fire if the pedestal changed from
|
|
77
|
+
* the `CollectibleType` provided.
|
|
73
78
|
*
|
|
74
79
|
* ```ts
|
|
75
80
|
* function postCollectibleEmpty(
|
|
@@ -88,11 +93,12 @@ export declare enum ModCallbackCustom {
|
|
|
88
93
|
* upon re-entering the room. Additionally, when playing as Tainted Isaac, the `POST_PICKUP_INIT`
|
|
89
94
|
* callback will fire every time the item shifts.
|
|
90
95
|
*
|
|
91
|
-
* When registering the callback
|
|
92
|
-
* only fire if
|
|
96
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
97
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
98
|
+
* `CollectibleType` provided.
|
|
93
99
|
*
|
|
94
100
|
* ```ts
|
|
95
|
-
* function postCollectibleInitLate(collectible:
|
|
101
|
+
* function postCollectibleInitLate(collectible: EntityPickupCollectible): void {}
|
|
96
102
|
* ```
|
|
97
103
|
*/
|
|
98
104
|
POST_COLLECTIBLE_INIT_FIRST = 6,
|
|
@@ -101,28 +107,17 @@ export declare enum ModCallbackCustom {
|
|
|
101
107
|
* begins playing after a player triggers a Cursed Eye teleport or a Cursed Skull teleport. (Both
|
|
102
108
|
* of these have the same effect in causing Isaac to be teleported to a random room.)
|
|
103
109
|
*
|
|
110
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
111
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
112
|
+
* matches the `PlayerVariant` provided.
|
|
113
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
114
|
+
* matches the `PlayerType` provided.
|
|
115
|
+
*
|
|
104
116
|
* ```ts
|
|
105
117
|
* function postCursedTeleport(player: EntityPlayer): void {}
|
|
106
118
|
* ```
|
|
107
119
|
*/
|
|
108
120
|
POST_CURSED_TELEPORT = 7,
|
|
109
|
-
/**
|
|
110
|
-
* Fires from the `POST_PEFFECT_UPDATE` callback when a player enters the loading zone of a custom
|
|
111
|
-
* door created with the `spawnCustomDoor` helper function.
|
|
112
|
-
*
|
|
113
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
114
|
-
* only fire if it matches the `DoorVariant` provided.
|
|
115
|
-
*
|
|
116
|
-
* ```ts
|
|
117
|
-
* function postCustomDoorEnter(
|
|
118
|
-
* player: EntityPlayer,
|
|
119
|
-
* effectVariant: int,
|
|
120
|
-
* doorSlot: DoorSlot,
|
|
121
|
-
* direction: Direction,
|
|
122
|
-
* ): void {}
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
POST_CUSTOM_DOOR_ENTER = 8,
|
|
126
121
|
/**
|
|
127
122
|
* Fires from the `POST_PLAYER_UPDATE` callback after the player has finished the death animation,
|
|
128
123
|
* has teleported to the previous room, and is ready to play the animation for the modded revival
|
|
@@ -132,20 +127,22 @@ export declare enum ModCallbackCustom {
|
|
|
132
127
|
* `player.AnimateCollectible(CollectibleTypeCustom.COLLECTIBLE_MY_REVIVAL_ITEM);`, otherwise the
|
|
133
128
|
* animation for a 1-Up will play.
|
|
134
129
|
*
|
|
135
|
-
* When registering the callback
|
|
136
|
-
* only fire if the revival type matches
|
|
130
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
131
|
+
* an optional third argument that will make the callback only fire if the revival type matches
|
|
132
|
+
* the one provided.
|
|
137
133
|
*
|
|
138
134
|
* ```ts
|
|
139
135
|
* function postCustomRevive(player: EntityPlayer, revivalType: int): void {}
|
|
140
136
|
* ```
|
|
141
137
|
*/
|
|
142
|
-
POST_CUSTOM_REVIVE =
|
|
138
|
+
POST_CUSTOM_REVIVE = 8,
|
|
143
139
|
/**
|
|
144
140
|
* Fires from the `EFFECT_POST_UPDATE` callback after a player has entered the range of a Dice
|
|
145
141
|
* Room floor.
|
|
146
142
|
*
|
|
147
|
-
* When registering the callback
|
|
148
|
-
* only fire if
|
|
143
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
144
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
145
|
+
* `DiceFloorSubType` provided.
|
|
149
146
|
*
|
|
150
147
|
* ```ts
|
|
151
148
|
* function postDiceRoomActivated(
|
|
@@ -154,49 +151,53 @@ export declare enum ModCallbackCustom {
|
|
|
154
151
|
* ): void {}
|
|
155
152
|
* ```
|
|
156
153
|
*/
|
|
157
|
-
POST_DICE_ROOM_ACTIVATED =
|
|
154
|
+
POST_DICE_ROOM_ACTIVATED = 9,
|
|
158
155
|
/**
|
|
159
156
|
* Fires from the `POST_RENDER` callback on every frame that a door exists.
|
|
160
157
|
*
|
|
161
|
-
* When registering the callback
|
|
162
|
-
* only fire if it matches the variant
|
|
158
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
159
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
160
|
+
* provided.
|
|
163
161
|
*
|
|
164
162
|
* ```ts
|
|
165
163
|
* function postDoorRender(door: GridEntityDoor): void {}
|
|
166
164
|
* ```
|
|
167
165
|
*/
|
|
168
|
-
POST_DOOR_RENDER =
|
|
166
|
+
POST_DOOR_RENDER = 10,
|
|
169
167
|
/**
|
|
170
168
|
* Fires from the `POST_UPDATE` callback on every frame that a door exists.
|
|
171
169
|
*
|
|
172
|
-
* When registering the callback
|
|
173
|
-
* only fire if it matches the variant
|
|
170
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
171
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
172
|
+
* provided.
|
|
174
173
|
*
|
|
175
174
|
* ```ts
|
|
176
175
|
* function postDoorUpdate(door: GridEntityDoor): void {}
|
|
177
176
|
* ```
|
|
178
177
|
*/
|
|
179
|
-
POST_DOOR_UPDATE =
|
|
178
|
+
POST_DOOR_UPDATE = 11,
|
|
180
179
|
/**
|
|
181
180
|
* Fires on the first `POST_EFFECT_UPDATE` frame for each effect.
|
|
182
181
|
*
|
|
183
182
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
184
183
|
* normal `POST_EFFECT_INIT` callback.
|
|
185
184
|
*
|
|
186
|
-
* When registering the callback
|
|
187
|
-
* only fire if
|
|
185
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
186
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
187
|
+
* `EffectVariant` provided.
|
|
188
188
|
*
|
|
189
189
|
* ```ts
|
|
190
190
|
* function postEffectInitLate(effect: EntityEffect): void {}
|
|
191
191
|
* ```
|
|
192
192
|
*/
|
|
193
|
-
POST_EFFECT_INIT_LATE =
|
|
193
|
+
POST_EFFECT_INIT_LATE = 12,
|
|
194
194
|
/**
|
|
195
195
|
* Fires from the `POST_EFFECT_UPDATE` callback when an effect's state has changed from what it
|
|
196
196
|
* was on the previous frame. (In this context, "state" refers to the `EntityEffect.State` field.)
|
|
197
197
|
*
|
|
198
|
-
* When registering the callback
|
|
199
|
-
* only fire if it matches the
|
|
198
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
199
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
200
|
+
* `EffectVariant` provided.
|
|
200
201
|
*
|
|
201
202
|
* ```ts
|
|
202
203
|
* function postEffectStateChanged(
|
|
@@ -206,7 +207,7 @@ export declare enum ModCallbackCustom {
|
|
|
206
207
|
* ): void {}
|
|
207
208
|
* ```
|
|
208
209
|
*/
|
|
209
|
-
POST_EFFECT_STATE_CHANGED =
|
|
210
|
+
POST_EFFECT_STATE_CHANGED = 13,
|
|
210
211
|
/**
|
|
211
212
|
* Fires one `POST_UPDATE` frame after the player has used the Esau Jr. item. (The player is not
|
|
212
213
|
* updated to the new character until a game frame has passed.)
|
|
@@ -215,28 +216,30 @@ export declare enum ModCallbackCustom {
|
|
|
215
216
|
* function postEsauJr(player: EntityPlayer): void {}
|
|
216
217
|
* ```
|
|
217
218
|
*/
|
|
218
|
-
POST_ESAU_JR =
|
|
219
|
+
POST_ESAU_JR = 14,
|
|
219
220
|
/**
|
|
220
221
|
* Fires on the first `FAMILIAR_UPDATE` frame for each familiar.
|
|
221
222
|
*
|
|
222
223
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
223
224
|
* normal `POST_TEAR_INIT` callback.
|
|
224
225
|
*
|
|
225
|
-
* When registering the callback
|
|
226
|
-
* only fire if
|
|
226
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
227
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
228
|
+
* `FamiliarVariant` provided.
|
|
227
229
|
*
|
|
228
230
|
* ```ts
|
|
229
231
|
* function postFamiliarInitLate(familiar: EntityFamiliar): void {}
|
|
230
232
|
* ```
|
|
231
233
|
*/
|
|
232
|
-
POST_FAMILIAR_INIT_LATE =
|
|
234
|
+
POST_FAMILIAR_INIT_LATE = 15,
|
|
233
235
|
/**
|
|
234
236
|
* Fires from the `POST_FAMILIAR_UPDATE` callback when a familiar's state has changed from what it
|
|
235
237
|
* was on the previous frame. (In this context, "state" refers to the `EntityFamiliar.State`
|
|
236
238
|
* field.)
|
|
237
239
|
*
|
|
238
|
-
* When registering the callback
|
|
239
|
-
* only fire if it matches the
|
|
240
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
241
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
242
|
+
* `FamiliarVariant` provided.
|
|
240
243
|
*
|
|
241
244
|
* ```ts
|
|
242
245
|
* function postFamiliarStateChanged(
|
|
@@ -246,7 +249,7 @@ export declare enum ModCallbackCustom {
|
|
|
246
249
|
* ): void {}
|
|
247
250
|
* ```
|
|
248
251
|
*/
|
|
249
|
-
POST_FAMILIAR_STATE_CHANGED =
|
|
252
|
+
POST_FAMILIAR_STATE_CHANGED = 16,
|
|
250
253
|
/**
|
|
251
254
|
* Fires one `POST_UPDATE` frame after the player has first used the Esau Jr. item. (The player is
|
|
252
255
|
* not updated to the new character until a game frame has passed.)
|
|
@@ -258,7 +261,7 @@ export declare enum ModCallbackCustom {
|
|
|
258
261
|
* function postFirstEsauJr(player: EntityPlayer): void {}
|
|
259
262
|
* ```
|
|
260
263
|
*/
|
|
261
|
-
POST_FIRST_ESAU_JR =
|
|
264
|
+
POST_FIRST_ESAU_JR = 17,
|
|
262
265
|
/**
|
|
263
266
|
* Fires after the player has used the Flip item for the first time. Unlike the vanilla `USE_ITEM`
|
|
264
267
|
* callback, this callback will return the player object for the new Lazarus (not the one who used
|
|
@@ -271,7 +274,7 @@ export declare enum ModCallbackCustom {
|
|
|
271
274
|
* function postFirstFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
|
|
272
275
|
* ```
|
|
273
276
|
*/
|
|
274
|
-
POST_FIRST_FLIP =
|
|
277
|
+
POST_FIRST_FLIP = 18,
|
|
275
278
|
/**
|
|
276
279
|
* Fires after the player has used the Flip item. Unlike the vanilla `USE_ITEM` callback, this
|
|
277
280
|
* callback will return the player object for the new Lazarus (not the one who used the Flip
|
|
@@ -284,7 +287,7 @@ export declare enum ModCallbackCustom {
|
|
|
284
287
|
* function postFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
|
|
285
288
|
* ```
|
|
286
289
|
*/
|
|
287
|
-
POST_FLIP =
|
|
290
|
+
POST_FLIP = 19,
|
|
288
291
|
/**
|
|
289
292
|
* Similar to the vanilla callback of the same name, but fires in the correct order with respect
|
|
290
293
|
* to the `POST_NEW_LEVEL` and the `POST_NEW_ROOM` callbacks:
|
|
@@ -295,7 +298,7 @@ export declare enum ModCallbackCustom {
|
|
|
295
298
|
* function postGameStartedReordered(isContinued: boolean): void {}
|
|
296
299
|
* ```
|
|
297
300
|
*/
|
|
298
|
-
POST_GAME_STARTED_REORDERED =
|
|
301
|
+
POST_GAME_STARTED_REORDERED = 20,
|
|
299
302
|
/**
|
|
300
303
|
* Similar to the `POST_GAME_STARTED_REORDERED` callback, but fires after all of the subscribed
|
|
301
304
|
* callbacks have finished firing. Thus, you can use this callback to do perform things after a
|
|
@@ -306,7 +309,7 @@ export declare enum ModCallbackCustom {
|
|
|
306
309
|
* function postGameStartedReorderedLast(isContinued: boolean): void {}
|
|
307
310
|
* ```
|
|
308
311
|
*/
|
|
309
|
-
POST_GAME_STARTED_REORDERED_LAST =
|
|
312
|
+
POST_GAME_STARTED_REORDERED_LAST = 21,
|
|
310
313
|
/**
|
|
311
314
|
* Fires from the `POST_UPDATE` callback when the Greed Mode wave increases.
|
|
312
315
|
*
|
|
@@ -314,7 +317,7 @@ export declare enum ModCallbackCustom {
|
|
|
314
317
|
* function postGreedModeWave(oldWave: int, newWave: int): void {}
|
|
315
318
|
* ```
|
|
316
319
|
*/
|
|
317
|
-
POST_GREED_MODE_WAVE =
|
|
320
|
+
POST_GREED_MODE_WAVE = 22,
|
|
318
321
|
/**
|
|
319
322
|
* Fires from the `POST_UPDATE` callback when a grid entity changes to a state that corresponds to
|
|
320
323
|
* the broken state for the respective grid entity type. (For example, this will fire for a
|
|
@@ -323,16 +326,17 @@ export declare enum ModCallbackCustom {
|
|
|
323
326
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
324
327
|
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
325
328
|
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
329
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
330
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
331
|
+
* matches the `GridEntityType` provided.
|
|
332
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
333
|
+
* matches the variant provided.
|
|
330
334
|
*
|
|
331
335
|
* ```ts
|
|
332
336
|
* function postGridEntityBroken(gridEntity: GridEntity): void {}
|
|
333
337
|
* ```
|
|
334
338
|
*/
|
|
335
|
-
POST_GRID_ENTITY_BROKEN =
|
|
339
|
+
POST_GRID_ENTITY_BROKEN = 23,
|
|
336
340
|
/**
|
|
337
341
|
* Fires from the `POST_UPDATE` callback when a new entity collides with a grid entity. (After
|
|
338
342
|
* this, the callback will not continue to fire. It will only fire again once the entity moves out
|
|
@@ -341,14 +345,15 @@ export declare enum ModCallbackCustom {
|
|
|
341
345
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
342
346
|
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
343
347
|
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
348
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
349
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
350
|
+
* matches the `GridEntityType` provided.
|
|
351
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
352
|
+
* matches the variant provided (for the grid entity).
|
|
353
|
+
* - You can provide an optional fifth argument that will make the callback only fire if the
|
|
354
|
+
* colliding entity matches the `EntityType` provided.
|
|
355
|
+
* - You can provide an optional sixth argument that will make the callback only fire if the
|
|
356
|
+
* colliding entity matches the variant provided.
|
|
352
357
|
*
|
|
353
358
|
* ```ts
|
|
354
359
|
* function postGridEntityCollision(
|
|
@@ -357,14 +362,15 @@ export declare enum ModCallbackCustom {
|
|
|
357
362
|
* ): void {}
|
|
358
363
|
* ```
|
|
359
364
|
*/
|
|
360
|
-
POST_GRID_ENTITY_COLLISION =
|
|
365
|
+
POST_GRID_ENTITY_COLLISION = 24,
|
|
361
366
|
/**
|
|
362
367
|
* The same as the `POST_GRID_ENTITY_BROKEN` callback, but only fires for grid entities created
|
|
363
368
|
* with the `spawnCustomGridEntity` helper function.
|
|
364
369
|
*
|
|
365
|
-
* When registering the callback
|
|
366
|
-
*
|
|
367
|
-
* variants, so there is no need for
|
|
370
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
371
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
372
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
373
|
+
* an optional argument to filter by variant.)
|
|
368
374
|
*
|
|
369
375
|
* ```ts
|
|
370
376
|
* function postGridEntityCustomBroken(
|
|
@@ -373,18 +379,19 @@ export declare enum ModCallbackCustom {
|
|
|
373
379
|
* ): void {}
|
|
374
380
|
* ```
|
|
375
381
|
*/
|
|
376
|
-
POST_GRID_ENTITY_CUSTOM_BROKEN =
|
|
382
|
+
POST_GRID_ENTITY_CUSTOM_BROKEN = 25,
|
|
377
383
|
/**
|
|
378
384
|
* The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
|
|
379
385
|
* with the `spawnCustomGridEntity` helper function.
|
|
380
386
|
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
387
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
388
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
389
|
+
* matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
|
|
390
|
+
* there is no need for an optional argument to filter by variant.)
|
|
391
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
392
|
+
* colliding entity matches the `EntityType` provided.
|
|
393
|
+
* - You can provide an optional fifth argument that will make the callback only fire if the
|
|
394
|
+
* colliding entity matches the variant provided.
|
|
388
395
|
*
|
|
389
396
|
* ```ts
|
|
390
397
|
* function postGridEntityCustomCollision(
|
|
@@ -394,14 +401,15 @@ export declare enum ModCallbackCustom {
|
|
|
394
401
|
* ): void {}
|
|
395
402
|
* ```
|
|
396
403
|
*/
|
|
397
|
-
POST_GRID_ENTITY_CUSTOM_COLLISION =
|
|
404
|
+
POST_GRID_ENTITY_CUSTOM_COLLISION = 26,
|
|
398
405
|
/**
|
|
399
406
|
* The same as the `POST_GRID_ENTITY_INIT` callback, but only fires for grid entities created with
|
|
400
407
|
* the `spawnCustomGridEntity` helper function.
|
|
401
408
|
*
|
|
402
|
-
* When registering the callback
|
|
403
|
-
*
|
|
404
|
-
* variants, so there is no need for
|
|
409
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
410
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
411
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
412
|
+
* an optional argument to filter by variant.)
|
|
405
413
|
*
|
|
406
414
|
* ```ts
|
|
407
415
|
* function postGridEntityCustomInit(
|
|
@@ -410,14 +418,15 @@ export declare enum ModCallbackCustom {
|
|
|
410
418
|
* ): void {}
|
|
411
419
|
* ```
|
|
412
420
|
*/
|
|
413
|
-
POST_GRID_ENTITY_CUSTOM_INIT =
|
|
421
|
+
POST_GRID_ENTITY_CUSTOM_INIT = 27,
|
|
414
422
|
/**
|
|
415
423
|
* The same as the `POST_GRID_ENTITY_REMOVE` callback, but only fires for grid entities created
|
|
416
424
|
* with the `spawnCustomGridEntity` helper function.
|
|
417
425
|
*
|
|
418
|
-
* When registering the callback
|
|
419
|
-
*
|
|
420
|
-
* variants, so there is no need for
|
|
426
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
427
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
428
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
429
|
+
* an optional argument to filter by variant.)
|
|
421
430
|
*
|
|
422
431
|
* ```ts
|
|
423
432
|
* function postGridEntityCustomRemove(
|
|
@@ -426,14 +435,15 @@ export declare enum ModCallbackCustom {
|
|
|
426
435
|
* ): void {}
|
|
427
436
|
* ```
|
|
428
437
|
*/
|
|
429
|
-
POST_GRID_ENTITY_CUSTOM_REMOVE =
|
|
438
|
+
POST_GRID_ENTITY_CUSTOM_REMOVE = 28,
|
|
430
439
|
/**
|
|
431
440
|
* The same as the `POST_GRID_ENTITY_RENDER` callback, but only fires for grid entities created
|
|
432
441
|
* with the `spawnCustomGridEntity` helper function.
|
|
433
442
|
*
|
|
434
|
-
* When registering the callback
|
|
435
|
-
*
|
|
436
|
-
* variants, so there is no need for
|
|
443
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
444
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
445
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
446
|
+
* an optional argument to filter by variant.)
|
|
437
447
|
*
|
|
438
448
|
* ```ts
|
|
439
449
|
* function postGridEntityCustomRender(
|
|
@@ -442,14 +452,15 @@ export declare enum ModCallbackCustom {
|
|
|
442
452
|
* ): void {}
|
|
443
453
|
* ```
|
|
444
454
|
*/
|
|
445
|
-
POST_GRID_ENTITY_CUSTOM_RENDER =
|
|
455
|
+
POST_GRID_ENTITY_CUSTOM_RENDER = 29,
|
|
446
456
|
/**
|
|
447
457
|
* The same as the `POST_GRID_ENTITY_STATE_CHANGED` callback, but only fires for grid entities
|
|
448
458
|
* created with the `spawnCustomGridEntity` helper function.
|
|
449
459
|
*
|
|
450
|
-
* When registering the callback
|
|
451
|
-
*
|
|
452
|
-
* variants, so there is no need for
|
|
460
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
461
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
462
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
463
|
+
* an optional argument to filter by variant.)
|
|
453
464
|
*
|
|
454
465
|
* ```ts
|
|
455
466
|
* function postGridEntityCustomStateChanged(
|
|
@@ -460,14 +471,15 @@ export declare enum ModCallbackCustom {
|
|
|
460
471
|
* ): void {}
|
|
461
472
|
* ```
|
|
462
473
|
*/
|
|
463
|
-
POST_GRID_ENTITY_CUSTOM_STATE_CHANGED =
|
|
474
|
+
POST_GRID_ENTITY_CUSTOM_STATE_CHANGED = 30,
|
|
464
475
|
/**
|
|
465
476
|
* The same as the `POST_GRID_ENTITY_UPDATE` callback, but only fires for grid entities created
|
|
466
477
|
* with the `spawnCustomGridEntity` helper function.
|
|
467
478
|
*
|
|
468
|
-
* When registering the callback
|
|
469
|
-
*
|
|
470
|
-
* variants, so there is no need for
|
|
479
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
480
|
+
* an optional third argument that will make the callback only fire if it matches the custom
|
|
481
|
+
* `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
|
|
482
|
+
* an optional argument to filter by variant.)
|
|
471
483
|
*
|
|
472
484
|
* ```ts
|
|
473
485
|
* function postGridEntityCustomUpdate(
|
|
@@ -476,7 +488,7 @@ export declare enum ModCallbackCustom {
|
|
|
476
488
|
* ): void {}
|
|
477
489
|
* ```
|
|
478
490
|
*/
|
|
479
|
-
POST_GRID_ENTITY_CUSTOM_UPDATE =
|
|
491
|
+
POST_GRID_ENTITY_CUSTOM_UPDATE = 31,
|
|
480
492
|
/**
|
|
481
493
|
* Fires when a new grid entity is initialized. Specifically, this is either:
|
|
482
494
|
*
|
|
@@ -488,16 +500,17 @@ export declare enum ModCallbackCustom {
|
|
|
488
500
|
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
489
501
|
* callback instead.
|
|
490
502
|
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
503
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
504
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
505
|
+
* matches the `GridEntityType` provided.
|
|
506
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
507
|
+
* matches the variant provided.
|
|
495
508
|
*
|
|
496
509
|
* ```ts
|
|
497
510
|
* function postGridEntityInit(gridEntity: GridEntity): void {}
|
|
498
511
|
* ```
|
|
499
512
|
*/
|
|
500
|
-
POST_GRID_ENTITY_INIT =
|
|
513
|
+
POST_GRID_ENTITY_INIT = 32,
|
|
501
514
|
/**
|
|
502
515
|
* Fires from the `POST_UPDATE` callback when a new grid entity is removed. Specifically, this on
|
|
503
516
|
* the frame after it no longer exists (where it did exist a frame ago).
|
|
@@ -509,10 +522,11 @@ export declare enum ModCallbackCustom {
|
|
|
509
522
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
510
523
|
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
511
524
|
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
*
|
|
525
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
526
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
527
|
+
* matches the `GridEntityType` provided.
|
|
528
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
529
|
+
* matches the variant provided.
|
|
516
530
|
*
|
|
517
531
|
* ```ts
|
|
518
532
|
* function postGridEntityRemove(
|
|
@@ -521,23 +535,24 @@ export declare enum ModCallbackCustom {
|
|
|
521
535
|
* ): void {}
|
|
522
536
|
* ```
|
|
523
537
|
*/
|
|
524
|
-
POST_GRID_ENTITY_REMOVE =
|
|
538
|
+
POST_GRID_ENTITY_REMOVE = 33,
|
|
525
539
|
/**
|
|
526
540
|
* Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
|
|
527
541
|
*
|
|
528
542
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
529
543
|
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
530
544
|
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
545
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
546
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
547
|
+
* matches the `GridEntityType` provided.
|
|
548
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
549
|
+
* matches the variant provided.
|
|
535
550
|
*
|
|
536
551
|
* ```ts
|
|
537
552
|
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
538
553
|
* ```
|
|
539
554
|
*/
|
|
540
|
-
POST_GRID_ENTITY_RENDER =
|
|
555
|
+
POST_GRID_ENTITY_RENDER = 34,
|
|
541
556
|
/**
|
|
542
557
|
* Fires from the `POST_UPDATE` callback when a grid entity changes its state. (In this context,
|
|
543
558
|
* "state" refers to the `GridEntity.State` field.)
|
|
@@ -545,10 +560,11 @@ export declare enum ModCallbackCustom {
|
|
|
545
560
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
546
561
|
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
547
562
|
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
563
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
564
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
565
|
+
* matches the `GridEntityType` provided.
|
|
566
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
567
|
+
* matches the variant provided.
|
|
552
568
|
*
|
|
553
569
|
* ```ts
|
|
554
570
|
* function postGridEntityStateChanged(
|
|
@@ -558,23 +574,24 @@ export declare enum ModCallbackCustom {
|
|
|
558
574
|
* ): void {}
|
|
559
575
|
* ```
|
|
560
576
|
*/
|
|
561
|
-
POST_GRID_ENTITY_STATE_CHANGED =
|
|
577
|
+
POST_GRID_ENTITY_STATE_CHANGED = 35,
|
|
562
578
|
/**
|
|
563
579
|
* Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
|
|
564
580
|
*
|
|
565
581
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
566
582
|
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
567
583
|
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
584
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
585
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
586
|
+
* matches the `GridEntityType` provided.
|
|
587
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
588
|
+
* matches the variant provided.
|
|
572
589
|
*
|
|
573
590
|
* ```ts
|
|
574
591
|
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
575
592
|
* ```
|
|
576
593
|
*/
|
|
577
|
-
POST_GRID_ENTITY_UPDATE =
|
|
594
|
+
POST_GRID_ENTITY_UPDATE = 36,
|
|
578
595
|
/**
|
|
579
596
|
* Fires from the `POST_PEFFECT_UPDATE` callback when the player loses a Holy Mantle temporary
|
|
580
597
|
* collectible effect.
|
|
@@ -583,10 +600,11 @@ export declare enum ModCallbackCustom {
|
|
|
583
600
|
* from an enemy. Normally, you would accomplish this via the `ENTITY_TAKE_DMG` callback, but that
|
|
584
601
|
* callback never fires if the player has a Holy Mantle shield.
|
|
585
602
|
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
603
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
604
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
605
|
+
* matches the `PlayerVariant` provided.
|
|
606
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
607
|
+
* matches the `PlayerType` provided.
|
|
590
608
|
*
|
|
591
609
|
* ```ts
|
|
592
610
|
* function postPlayerInitReordered(
|
|
@@ -596,7 +614,7 @@ export declare enum ModCallbackCustom {
|
|
|
596
614
|
* ): void {}
|
|
597
615
|
* ```
|
|
598
616
|
*/
|
|
599
|
-
POST_HOLY_MANTLE_REMOVED =
|
|
617
|
+
POST_HOLY_MANTLE_REMOVED = 37,
|
|
600
618
|
/**
|
|
601
619
|
* Fires from `POST_PEFFECT_UPDATE` callback when the player loses charge on their active
|
|
602
620
|
* collectible item, implying that the item was just used.
|
|
@@ -607,8 +625,9 @@ export declare enum ModCallbackCustom {
|
|
|
607
625
|
* Note that this callback will not fire if the active item is both discharged and swapped for
|
|
608
626
|
* another item / discharged on the same frame, like in the case of Alabaster Box.
|
|
609
627
|
*
|
|
610
|
-
* When registering the callback
|
|
611
|
-
* only fire if it matches the
|
|
628
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
629
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
630
|
+
* `CollectibleType` provided.
|
|
612
631
|
*
|
|
613
632
|
* ```ts
|
|
614
633
|
* function postItemDischarge(
|
|
@@ -618,7 +637,7 @@ export declare enum ModCallbackCustom {
|
|
|
618
637
|
* ): void {}
|
|
619
638
|
* ```
|
|
620
639
|
*/
|
|
621
|
-
POST_ITEM_DISCHARGE =
|
|
640
|
+
POST_ITEM_DISCHARGE = 38,
|
|
622
641
|
/**
|
|
623
642
|
* Fires from the `POST_PEFFECT_UPDATE` callback when an item is no longer queued (i.e. when the
|
|
624
643
|
* animation of the player holding the item above their head is finished and the item is actually
|
|
@@ -626,10 +645,11 @@ export declare enum ModCallbackCustom {
|
|
|
626
645
|
*
|
|
627
646
|
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
628
647
|
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
648
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
649
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
650
|
+
* matches the `ItemType` provided.
|
|
651
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
652
|
+
* sub-type matches the `CollectibleType` or the `TrinketType` provided.
|
|
633
653
|
*
|
|
634
654
|
* ```ts
|
|
635
655
|
* function postItemPickup(
|
|
@@ -638,35 +658,37 @@ export declare enum ModCallbackCustom {
|
|
|
638
658
|
* ): void {}
|
|
639
659
|
* ```
|
|
640
660
|
*/
|
|
641
|
-
POST_ITEM_PICKUP =
|
|
661
|
+
POST_ITEM_PICKUP = 39,
|
|
642
662
|
/**
|
|
643
663
|
* Fires on the first `POST_KNIFE_UPDATE` frame for each knife.
|
|
644
664
|
*
|
|
645
665
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
646
666
|
* normal `POST_KNIFE_INIT` callback.
|
|
647
667
|
*
|
|
648
|
-
* When registering the callback
|
|
649
|
-
* only fire if
|
|
668
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
669
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
670
|
+
* `KnifeVariant` provided.
|
|
650
671
|
*
|
|
651
672
|
* ```ts
|
|
652
673
|
* function postKnifeInitLate(knife: EntityKnife): void {}
|
|
653
674
|
* ```
|
|
654
675
|
*/
|
|
655
|
-
POST_KNIFE_INIT_LATE =
|
|
676
|
+
POST_KNIFE_INIT_LATE = 40,
|
|
656
677
|
/**
|
|
657
678
|
* Fires on the first `POST_LASER_UPDATE` frame for each laser.
|
|
658
679
|
*
|
|
659
680
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
660
681
|
* normal `POST_LASER_INIT` callback.
|
|
661
682
|
*
|
|
662
|
-
* When registering the callback
|
|
663
|
-
* only fire if
|
|
683
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
684
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
685
|
+
* `LaserVariant` provided.
|
|
664
686
|
*
|
|
665
687
|
* ```ts
|
|
666
688
|
* function postLaserInitLate(laser: EntityLaser): void {}
|
|
667
689
|
* ```
|
|
668
690
|
*/
|
|
669
|
-
POST_LASER_INIT_LATE =
|
|
691
|
+
POST_LASER_INIT_LATE = 41,
|
|
670
692
|
/**
|
|
671
693
|
* The same as the vanilla callback of the same name, but fires in the correct order with respect
|
|
672
694
|
* to the `POST_GAME_STARTED` and the `POST_NEW_ROOM` callbacks:
|
|
@@ -683,7 +705,7 @@ export declare enum ModCallbackCustom {
|
|
|
683
705
|
* function postNewLevelReordered(): void {}
|
|
684
706
|
* ```
|
|
685
707
|
*/
|
|
686
|
-
POST_NEW_LEVEL_REORDERED =
|
|
708
|
+
POST_NEW_LEVEL_REORDERED = 42,
|
|
687
709
|
/**
|
|
688
710
|
* Fires on the first `POST_NEW_ROOM` or `PRE_ENTITY_SPAWN` callback where being in a new room is
|
|
689
711
|
* detected. This is useful because the vanilla `POST_NEW_ROOM` callback fires only after entities
|
|
@@ -694,7 +716,7 @@ export declare enum ModCallbackCustom {
|
|
|
694
716
|
* function postNewRoomEarly(): void {}
|
|
695
717
|
* ```
|
|
696
718
|
*/
|
|
697
|
-
POST_NEW_ROOM_EARLY =
|
|
719
|
+
POST_NEW_ROOM_EARLY = 43,
|
|
698
720
|
/**
|
|
699
721
|
* The same as the vanilla callback of the same name, but fires in the correct order with respect
|
|
700
722
|
* to the `POST_GAME_STARTED` and the `POST_NEW_LEVEL` callbacks:
|
|
@@ -711,29 +733,31 @@ export declare enum ModCallbackCustom {
|
|
|
711
733
|
* function postNewRoomReordered(): void {}
|
|
712
734
|
* ```
|
|
713
735
|
*/
|
|
714
|
-
POST_NEW_ROOM_REORDERED =
|
|
736
|
+
POST_NEW_ROOM_REORDERED = 44,
|
|
715
737
|
/**
|
|
716
738
|
* Fires on the first `NPC_UPDATE` frame for each NPC.
|
|
717
739
|
*
|
|
718
740
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
719
741
|
* normal `POST_NPC_INIT` callback.
|
|
720
742
|
*
|
|
721
|
-
* When registering the callback
|
|
722
|
-
*
|
|
743
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
744
|
+
* an optional third argument that will make the callback only fire if it matches the `EntityType`
|
|
745
|
+
* provided.
|
|
723
746
|
*
|
|
724
747
|
* ```ts
|
|
725
748
|
* function postNPCInitLate(npc: EntityNPC): void {}
|
|
726
749
|
* ```
|
|
727
750
|
*/
|
|
728
|
-
POST_NPC_INIT_LATE =
|
|
751
|
+
POST_NPC_INIT_LATE = 45,
|
|
729
752
|
/**
|
|
730
753
|
* Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
|
|
731
754
|
* the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
|
|
732
755
|
*
|
|
733
|
-
*
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
*
|
|
756
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
757
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
758
|
+
* matches the `EntityType` provided.
|
|
759
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
760
|
+
* matches the variant provided.
|
|
737
761
|
*
|
|
738
762
|
* ```ts
|
|
739
763
|
* function postNPCStateChanged(
|
|
@@ -743,7 +767,7 @@ export declare enum ModCallbackCustom {
|
|
|
743
767
|
* ): void {}
|
|
744
768
|
* ```
|
|
745
769
|
*/
|
|
746
|
-
POST_NPC_STATE_CHANGED =
|
|
770
|
+
POST_NPC_STATE_CHANGED = 46,
|
|
747
771
|
/**
|
|
748
772
|
* Similar to the vanilla callback of the same name, but fires after the
|
|
749
773
|
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
@@ -758,29 +782,31 @@ export declare enum ModCallbackCustom {
|
|
|
758
782
|
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
759
783
|
* any rooms.
|
|
760
784
|
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*
|
|
785
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
786
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
787
|
+
* matches the `PlayerVariant` provided.
|
|
788
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
789
|
+
* matches the `PlayerType` provided.
|
|
765
790
|
*
|
|
766
791
|
* ```ts
|
|
767
792
|
* function postPEffectUpdateReordered(player: EntityPlayer): void {}
|
|
768
793
|
* ```
|
|
769
794
|
*/
|
|
770
|
-
POST_PEFFECT_UPDATE_REORDERED =
|
|
795
|
+
POST_PEFFECT_UPDATE_REORDERED = 47,
|
|
771
796
|
/**
|
|
772
797
|
* Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
|
|
773
798
|
*
|
|
774
799
|
* Use this callback to know when a pickup is added to the player's inventory or health.
|
|
775
800
|
*
|
|
776
|
-
* When registering the callback
|
|
777
|
-
* only fire if
|
|
801
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
802
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
803
|
+
* `PickupVariant` provided.
|
|
778
804
|
*
|
|
779
805
|
* ```ts
|
|
780
806
|
* function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
|
|
781
807
|
* ```
|
|
782
808
|
*/
|
|
783
|
-
POST_PICKUP_COLLECT =
|
|
809
|
+
POST_PICKUP_COLLECT = 48,
|
|
784
810
|
/**
|
|
785
811
|
* Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
|
|
786
812
|
* respective pickup on the run.
|
|
@@ -788,34 +814,37 @@ export declare enum ModCallbackCustom {
|
|
|
788
814
|
* This callback is useful because pickups will despawn upon leaving the room and respawn upon
|
|
789
815
|
* re-entering the room.
|
|
790
816
|
*
|
|
791
|
-
* When registering the callback
|
|
792
|
-
* only fire if
|
|
817
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
818
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
819
|
+
* `PickupVariant` provided.
|
|
793
820
|
*
|
|
794
821
|
* ```ts
|
|
795
822
|
* function postPickupInitFirst(pickup: EntityPickup): void {}
|
|
796
823
|
* ```
|
|
797
824
|
*/
|
|
798
|
-
POST_PICKUP_INIT_FIRST =
|
|
825
|
+
POST_PICKUP_INIT_FIRST = 49,
|
|
799
826
|
/**
|
|
800
827
|
* Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
|
|
801
828
|
*
|
|
802
829
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
803
830
|
* normal `POST_PICKUP_INIT` callback.
|
|
804
831
|
*
|
|
805
|
-
* When registering the callback
|
|
806
|
-
* only fire if
|
|
832
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
833
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
834
|
+
* `PickupVariant` provided.
|
|
807
835
|
*
|
|
808
836
|
* ```ts
|
|
809
837
|
* function postPickupInitLate(pickup: EntityPickup): void {}
|
|
810
838
|
* ```
|
|
811
839
|
*/
|
|
812
|
-
POST_PICKUP_INIT_LATE =
|
|
840
|
+
POST_PICKUP_INIT_LATE = 50,
|
|
813
841
|
/**
|
|
814
842
|
* Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
|
|
815
843
|
* on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
|
|
816
844
|
*
|
|
817
|
-
* When registering the callback
|
|
818
|
-
* only fire if it matches the
|
|
845
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
846
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
847
|
+
* `PickupVariant` provided.
|
|
819
848
|
*
|
|
820
849
|
* ```ts
|
|
821
850
|
* function postPickupStateChanged(
|
|
@@ -825,37 +854,40 @@ export declare enum ModCallbackCustom {
|
|
|
825
854
|
* ): void {}
|
|
826
855
|
* ```
|
|
827
856
|
*/
|
|
828
|
-
POST_PICKUP_STATE_CHANGED =
|
|
857
|
+
POST_PICKUP_STATE_CHANGED = 51,
|
|
829
858
|
/**
|
|
830
859
|
* Fires from the `POST_RENDER` callback on every frame that a pit exists.
|
|
831
860
|
*
|
|
832
|
-
* When registering the callback
|
|
833
|
-
* only fire if it matches the variant
|
|
861
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
862
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
863
|
+
* provided.
|
|
834
864
|
*
|
|
835
865
|
* ```ts
|
|
836
866
|
* function postPitRender(pit: GridEntityPit): void {}
|
|
837
867
|
* ```
|
|
838
868
|
*/
|
|
839
|
-
POST_PIT_RENDER =
|
|
869
|
+
POST_PIT_RENDER = 52,
|
|
840
870
|
/**
|
|
841
871
|
* Fires from the `POST_UPDATE` callback on every frame that a pit exists.
|
|
842
872
|
*
|
|
843
|
-
* When registering the callback
|
|
844
|
-
* only fire if it matches the variant
|
|
873
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
874
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
875
|
+
* provided.
|
|
845
876
|
*
|
|
846
877
|
* ```ts
|
|
847
878
|
* function postPitUpdate(pit: GridEntityPit): void {}
|
|
848
879
|
* ```
|
|
849
880
|
*/
|
|
850
|
-
POST_PIT_UPDATE =
|
|
881
|
+
POST_PIT_UPDATE = 53,
|
|
851
882
|
/**
|
|
852
883
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's health (i.e. hearts) is different
|
|
853
884
|
* than what it was on the previous frame. For more information, see the `PlayerHealth` enum.
|
|
854
885
|
*
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
*
|
|
886
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
887
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
888
|
+
* matches the `PlayerVariant` provided.
|
|
889
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
890
|
+
* matches the `PlayerType` provided.
|
|
859
891
|
*
|
|
860
892
|
* ```ts
|
|
861
893
|
* function postPlayerChangeHealth(
|
|
@@ -867,7 +899,7 @@ export declare enum ModCallbackCustom {
|
|
|
867
899
|
* ): void {}
|
|
868
900
|
* ```
|
|
869
901
|
*/
|
|
870
|
-
POST_PLAYER_CHANGE_HEALTH =
|
|
902
|
+
POST_PLAYER_CHANGE_HEALTH = 54,
|
|
871
903
|
/**
|
|
872
904
|
* Fires from the `POST_PEFFECT_UPDATE` callback when one of the player's stats change from what
|
|
873
905
|
* they were on the previous frame.
|
|
@@ -881,10 +913,11 @@ export declare enum ModCallbackCustom {
|
|
|
881
913
|
* numbers. (For these cases, you should examine the `oldValue` and `newValue` arguments
|
|
882
914
|
* accordingly.)
|
|
883
915
|
*
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
*
|
|
916
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
917
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
918
|
+
* matches the `PlayerVariant` provided.
|
|
919
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
920
|
+
* matches the `PlayerType` provided.
|
|
888
921
|
*
|
|
889
922
|
* ```ts
|
|
890
923
|
* function postPlayerChangeStat(
|
|
@@ -896,7 +929,7 @@ export declare enum ModCallbackCustom {
|
|
|
896
929
|
* ): void {}
|
|
897
930
|
* ```
|
|
898
931
|
*/
|
|
899
|
-
POST_PLAYER_CHANGE_STAT =
|
|
932
|
+
POST_PLAYER_CHANGE_STAT = 55,
|
|
900
933
|
/**
|
|
901
934
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player entity changes its player type
|
|
902
935
|
* (i.e. character) from what it was on the previous frame. For example, it will fire after using
|
|
@@ -906,6 +939,10 @@ export declare enum ModCallbackCustom {
|
|
|
906
939
|
* those items cause separate player entities to be created. Use the `POST_FLIP` and
|
|
907
940
|
* `POST_ESAU_JR` callbacks to handle those situations.
|
|
908
941
|
*
|
|
942
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
943
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
944
|
+
* `PlayerVariant` provided.
|
|
945
|
+
*
|
|
909
946
|
* ```ts
|
|
910
947
|
* function postPlayerChangeType(
|
|
911
948
|
* player: EntityPlayer,
|
|
@@ -914,14 +951,15 @@ export declare enum ModCallbackCustom {
|
|
|
914
951
|
* ): void {}
|
|
915
952
|
* ```
|
|
916
953
|
*/
|
|
917
|
-
POST_PLAYER_CHANGE_TYPE =
|
|
954
|
+
POST_PLAYER_CHANGE_TYPE = 56,
|
|
918
955
|
/**
|
|
919
956
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is higher than
|
|
920
957
|
* what it was on the previous frame, or when the active items change, or when the build is
|
|
921
958
|
* rerolled.
|
|
922
959
|
*
|
|
923
|
-
* When registering the callback
|
|
924
|
-
* only fire if the collectible matches the
|
|
960
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
961
|
+
* an optional third argument that will make the callback only fire if the collectible matches the
|
|
962
|
+
* `CollectibleType` provided.
|
|
925
963
|
*
|
|
926
964
|
* ```ts
|
|
927
965
|
* function postPlayerCollectibleAdded(
|
|
@@ -930,14 +968,15 @@ export declare enum ModCallbackCustom {
|
|
|
930
968
|
* ): void {}
|
|
931
969
|
* ```
|
|
932
970
|
*/
|
|
933
|
-
POST_PLAYER_COLLECTIBLE_ADDED =
|
|
971
|
+
POST_PLAYER_COLLECTIBLE_ADDED = 57,
|
|
934
972
|
/**
|
|
935
973
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is lower than
|
|
936
974
|
* what it was on the previous frame, or when the active items change, or when the build is
|
|
937
975
|
* rerolled.
|
|
938
976
|
*
|
|
939
|
-
* When registering the callback
|
|
940
|
-
* only fire if the collectible matches the
|
|
977
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
978
|
+
* an optional third argument that will make the callback only fire if the collectible matches the
|
|
979
|
+
* `CollectibleType` provided.
|
|
941
980
|
*
|
|
942
981
|
* ```ts
|
|
943
982
|
* function postPlayerCollectibleRemoved(
|
|
@@ -946,7 +985,7 @@ export declare enum ModCallbackCustom {
|
|
|
946
985
|
* ): void {}
|
|
947
986
|
* ```
|
|
948
987
|
*/
|
|
949
|
-
POST_PLAYER_COLLECTIBLE_REMOVED =
|
|
988
|
+
POST_PLAYER_COLLECTIBLE_REMOVED = 58,
|
|
950
989
|
/**
|
|
951
990
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
|
|
952
991
|
* prevent the fatal damage.
|
|
@@ -954,16 +993,17 @@ export declare enum ModCallbackCustom {
|
|
|
954
993
|
* Note that this function does properly take into account Guppy's Collar, Broken Ankh, Spirit
|
|
955
994
|
* Shackles, and Mysterious Paper. It also takes into account using The Bible on Satan.
|
|
956
995
|
*
|
|
957
|
-
*
|
|
958
|
-
*
|
|
959
|
-
*
|
|
960
|
-
*
|
|
996
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
997
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
998
|
+
* matches the `PlayerVariant` provided.
|
|
999
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1000
|
+
* matches the `PlayerType` provided.
|
|
961
1001
|
*
|
|
962
1002
|
* ```ts
|
|
963
1003
|
* function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
|
|
964
1004
|
* ```
|
|
965
1005
|
*/
|
|
966
|
-
POST_PLAYER_FATAL_DAMAGE =
|
|
1006
|
+
POST_PLAYER_FATAL_DAMAGE = 59,
|
|
967
1007
|
/**
|
|
968
1008
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
|
|
969
1009
|
* `POST_PLAYER_INIT_LATE` callback, with two changes:
|
|
@@ -975,16 +1015,17 @@ export declare enum ModCallbackCustom {
|
|
|
975
1015
|
* character their starting items for the run. (You do not want to use the vanilla
|
|
976
1016
|
* `POST_PLAYER_INIT` callback for this because it fires when a run is continued.)
|
|
977
1017
|
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
1018
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1019
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1020
|
+
* matches the `PlayerVariant` provided.
|
|
1021
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1022
|
+
* matches the `PlayerType` provided.
|
|
982
1023
|
*
|
|
983
1024
|
* ```ts
|
|
984
1025
|
* function postPlayerInitFirst(player: EntityPlayer): void {}
|
|
985
1026
|
* ```
|
|
986
1027
|
*/
|
|
987
|
-
POST_PLAYER_INIT_FIRST =
|
|
1028
|
+
POST_PLAYER_INIT_FIRST = 60,
|
|
988
1029
|
/**
|
|
989
1030
|
* Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
|
|
990
1031
|
*
|
|
@@ -994,16 +1035,17 @@ export declare enum ModCallbackCustom {
|
|
|
994
1035
|
* For initializing a player with custom items and so forth, use the `POST_PLAYER_INIT_FIRST`
|
|
995
1036
|
* callback instead to handle the case of a Genesis room.
|
|
996
1037
|
*
|
|
997
|
-
*
|
|
998
|
-
*
|
|
999
|
-
*
|
|
1000
|
-
*
|
|
1038
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1039
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1040
|
+
* matches the `PlayerVariant` provided.
|
|
1041
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1042
|
+
* matches the `PlayerType` provided.
|
|
1001
1043
|
*
|
|
1002
1044
|
* ```ts
|
|
1003
1045
|
* function postPlayerInitLate(pickup: EntityPickup): void {}
|
|
1004
1046
|
* ```
|
|
1005
1047
|
*/
|
|
1006
|
-
POST_PLAYER_INIT_LATE =
|
|
1048
|
+
POST_PLAYER_INIT_LATE = 61,
|
|
1007
1049
|
/**
|
|
1008
1050
|
* Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
|
|
1009
1051
|
* callback fires (if the player is spawning on the 0th game frame of the run).
|
|
@@ -1017,16 +1059,17 @@ export declare enum ModCallbackCustom {
|
|
|
1017
1059
|
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
1018
1060
|
* any rooms.
|
|
1019
1061
|
*
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1062
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1063
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1064
|
+
* matches the `PlayerVariant` provided.
|
|
1065
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1066
|
+
* matches the `PlayerType` provided.
|
|
1024
1067
|
*
|
|
1025
1068
|
* ```ts
|
|
1026
1069
|
* function postPlayerRenderReordered(player: EntityPlayer): void {}
|
|
1027
1070
|
* ```
|
|
1028
1071
|
*/
|
|
1029
|
-
POST_PLAYER_RENDER_REORDERED =
|
|
1072
|
+
POST_PLAYER_RENDER_REORDERED = 62,
|
|
1030
1073
|
/**
|
|
1031
1074
|
* Similar to the vanilla callback of the same name, but fires after the
|
|
1032
1075
|
* `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
|
|
@@ -1041,147 +1084,159 @@ export declare enum ModCallbackCustom {
|
|
|
1041
1084
|
* callback. For example, since the level is not generated yet, you will not be able to access
|
|
1042
1085
|
* any rooms.
|
|
1043
1086
|
*
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
*
|
|
1087
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1088
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1089
|
+
* matches the `PlayerVariant` provided.
|
|
1090
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1091
|
+
* matches the `PlayerType` provided.
|
|
1048
1092
|
*
|
|
1049
1093
|
* ```ts
|
|
1050
1094
|
* function postPlayerUpdateReordered(player: EntityPlayer): void {}
|
|
1051
1095
|
* ```
|
|
1052
1096
|
*/
|
|
1053
|
-
POST_PLAYER_UPDATE_REORDERED =
|
|
1097
|
+
POST_PLAYER_UPDATE_REORDERED = 63,
|
|
1054
1098
|
/**
|
|
1055
1099
|
* Fires from the `POST_RENDER` callback on every frame that a poop exists.
|
|
1056
1100
|
*
|
|
1057
|
-
* When registering the callback
|
|
1058
|
-
* only fire if it matches the variant
|
|
1101
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1102
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1103
|
+
* provided.
|
|
1059
1104
|
*
|
|
1060
1105
|
* ```ts
|
|
1061
1106
|
* function postPoopRender(poop: GridEntityPoop): void {}
|
|
1062
1107
|
* ```
|
|
1063
1108
|
*/
|
|
1064
|
-
POST_POOP_RENDER =
|
|
1109
|
+
POST_POOP_RENDER = 64,
|
|
1065
1110
|
/**
|
|
1066
1111
|
* Fires from the `POST_UPDATE` callback on every frame that a poop exists.
|
|
1067
1112
|
*
|
|
1068
|
-
* When registering the callback
|
|
1069
|
-
* only fire if it matches the variant
|
|
1113
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1114
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1115
|
+
* provided.
|
|
1070
1116
|
*
|
|
1071
1117
|
* ```ts
|
|
1072
1118
|
* function postPoopUpdate(poop: GridEntityPoop): void {}
|
|
1073
1119
|
* ```
|
|
1074
1120
|
*/
|
|
1075
|
-
POST_POOP_UPDATE =
|
|
1121
|
+
POST_POOP_UPDATE = 65,
|
|
1076
1122
|
/**
|
|
1077
1123
|
* Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
|
|
1078
1124
|
*
|
|
1079
|
-
* When registering the callback
|
|
1080
|
-
* only fire if it matches the variant
|
|
1125
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1126
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1127
|
+
* provided.
|
|
1081
1128
|
*
|
|
1082
1129
|
* ```ts
|
|
1083
1130
|
* function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
|
|
1084
1131
|
* ```
|
|
1085
1132
|
*/
|
|
1086
|
-
POST_PRESSURE_PLATE_RENDER =
|
|
1133
|
+
POST_PRESSURE_PLATE_RENDER = 66,
|
|
1087
1134
|
/**
|
|
1088
1135
|
* Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
|
|
1089
1136
|
*
|
|
1090
|
-
* When registering the callback
|
|
1091
|
-
* only fire if it matches the variant
|
|
1137
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1138
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1139
|
+
* provided.
|
|
1092
1140
|
*
|
|
1093
1141
|
* ```ts
|
|
1094
1142
|
* function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
|
|
1095
1143
|
* ```
|
|
1096
1144
|
*/
|
|
1097
|
-
POST_PRESSURE_PLATE_UPDATE =
|
|
1145
|
+
POST_PRESSURE_PLATE_UPDATE = 67,
|
|
1098
1146
|
/**
|
|
1099
1147
|
* Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
|
|
1100
1148
|
*
|
|
1101
1149
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
1102
1150
|
* normal `POST_PROJECTILE_INIT` callback.
|
|
1103
1151
|
*
|
|
1104
|
-
* When registering the callback
|
|
1105
|
-
*
|
|
1152
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1153
|
+
* an optional third argument that will make the callback only fire if matches the
|
|
1154
|
+
* `ProjectileVariant` provided.
|
|
1106
1155
|
*
|
|
1107
1156
|
* ```ts
|
|
1108
1157
|
* function postProjectileInitLate(projectile: EntityProjectile): void {}
|
|
1109
1158
|
* ```
|
|
1110
1159
|
*/
|
|
1111
|
-
POST_PROJECTILE_INIT_LATE =
|
|
1160
|
+
POST_PROJECTILE_INIT_LATE = 68,
|
|
1112
1161
|
/**
|
|
1113
1162
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player first picks up a new item. The
|
|
1114
1163
|
* pickup returned in the callback is assumed to be the first pickup that no longer exists.
|
|
1115
1164
|
*
|
|
1116
|
-
*
|
|
1117
|
-
*
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1165
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1166
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1167
|
+
* matches the `PickupVariant` provided.
|
|
1168
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1169
|
+
* matches the sub-type provided.
|
|
1120
1170
|
*
|
|
1121
1171
|
* ```ts
|
|
1122
1172
|
* function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
|
|
1123
1173
|
* ```
|
|
1124
1174
|
*/
|
|
1125
|
-
POST_PURCHASE =
|
|
1175
|
+
POST_PURCHASE = 69,
|
|
1126
1176
|
/**
|
|
1127
1177
|
* Fires from the `POST_RENDER` callback on every frame that a rock exists.
|
|
1128
1178
|
*
|
|
1129
|
-
* When registering the callback
|
|
1130
|
-
* only fire if it matches the variant
|
|
1179
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1180
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1181
|
+
* provided.
|
|
1131
1182
|
*
|
|
1132
1183
|
* ```ts
|
|
1133
1184
|
* function postRockRender(rock: GridEntityRock): void {}
|
|
1134
1185
|
* ```
|
|
1135
1186
|
*/
|
|
1136
|
-
POST_ROCK_RENDER =
|
|
1187
|
+
POST_ROCK_RENDER = 70,
|
|
1137
1188
|
/**
|
|
1138
1189
|
* Fires from the `POST_UPDATE` callback on every frame that a rock exists.
|
|
1139
1190
|
*
|
|
1140
|
-
* When registering the callback
|
|
1141
|
-
* only fire if it matches the variant
|
|
1191
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1192
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1193
|
+
* provided.
|
|
1142
1194
|
*
|
|
1143
1195
|
* ```ts
|
|
1144
1196
|
* function postRockUpdate(rock: GridEntityRock): void {}
|
|
1145
1197
|
* ```
|
|
1146
1198
|
*/
|
|
1147
|
-
POST_ROCK_UPDATE =
|
|
1199
|
+
POST_ROCK_UPDATE = 71,
|
|
1148
1200
|
/**
|
|
1149
1201
|
* Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
|
|
1150
1202
|
* the `Room.IsClear` method).
|
|
1151
1203
|
*
|
|
1152
|
-
* When registering the callback
|
|
1153
|
-
* only fire if the room clear state
|
|
1204
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1205
|
+
* an optional third argument that will make the callback only fire if the room clear state
|
|
1206
|
+
* matches the boolean provided.
|
|
1154
1207
|
*
|
|
1155
1208
|
* ```ts
|
|
1156
1209
|
* function postRoomClearChanged(roomClear: boolean): void {}
|
|
1157
1210
|
* ```
|
|
1158
1211
|
*/
|
|
1159
|
-
POST_ROOM_CLEAR_CHANGED =
|
|
1212
|
+
POST_ROOM_CLEAR_CHANGED = 72,
|
|
1160
1213
|
/**
|
|
1161
1214
|
* Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
|
|
1162
1215
|
* Room.
|
|
1163
1216
|
*
|
|
1164
|
-
*
|
|
1165
|
-
*
|
|
1166
|
-
*
|
|
1167
|
-
*
|
|
1217
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1218
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1219
|
+
* matches the `PlayerVariant` provided.
|
|
1220
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1221
|
+
* matches the `PlayerType` provided.
|
|
1168
1222
|
*
|
|
1169
1223
|
* ```ts
|
|
1170
1224
|
* function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
|
|
1171
1225
|
* ```
|
|
1172
1226
|
*/
|
|
1173
|
-
POST_SACRIFICE =
|
|
1227
|
+
POST_SACRIFICE = 73,
|
|
1174
1228
|
/**
|
|
1175
1229
|
* Fires from the `POST_RENDER` callback when a slot entity's animation changes.
|
|
1176
1230
|
*
|
|
1177
|
-
* When registering the callback
|
|
1178
|
-
* only fire if it matches the
|
|
1231
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1232
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1233
|
+
* `SlotVariant` provided.
|
|
1179
1234
|
*
|
|
1180
1235
|
* ```ts
|
|
1181
1236
|
* function postSlotAnimationChanged(slot: Entity): void {}
|
|
1182
1237
|
* ```
|
|
1183
1238
|
*/
|
|
1184
|
-
POST_SLOT_ANIMATION_CHANGED =
|
|
1239
|
+
POST_SLOT_ANIMATION_CHANGED = 74,
|
|
1185
1240
|
/**
|
|
1186
1241
|
* Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
|
|
1187
1242
|
* (It will not fire if any other type of entity collides with the slot entity.)
|
|
@@ -1190,9 +1245,10 @@ export declare enum ModCallbackCustom {
|
|
|
1190
1245
|
* colliding with it on every frame. Thus, you should only perform actions in this callback under
|
|
1191
1246
|
* certain conditions, like if the slot entity is playing the "Idle" animation, and so on.
|
|
1192
1247
|
*
|
|
1193
|
-
* When registering the callback
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1248
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1249
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1250
|
+
* `SlotVariant` provided. (Only players will cause this callback to fire, so there is no need for
|
|
1251
|
+
* an optional argument to filter by `EntityType`.)
|
|
1196
1252
|
*
|
|
1197
1253
|
* ```ts
|
|
1198
1254
|
* function postSlotCollision(
|
|
@@ -1201,21 +1257,22 @@ export declare enum ModCallbackCustom {
|
|
|
1201
1257
|
* ): void {}
|
|
1202
1258
|
* ```
|
|
1203
1259
|
*/
|
|
1204
|
-
POST_SLOT_COLLISION =
|
|
1260
|
+
POST_SLOT_COLLISION = 75,
|
|
1205
1261
|
/**
|
|
1206
1262
|
* Fires from the `POST_RENDER` callback when a slot plays the animation that indicates that it
|
|
1207
1263
|
* has broken.
|
|
1208
1264
|
*
|
|
1209
|
-
*
|
|
1210
|
-
*
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1265
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1266
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1267
|
+
* matches the `SlotVariant` provided.
|
|
1268
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1269
|
+
* matches the `SlotDestructionType` provided.
|
|
1213
1270
|
*
|
|
1214
1271
|
* ```ts
|
|
1215
1272
|
* function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
|
|
1216
1273
|
* ```
|
|
1217
1274
|
*/
|
|
1218
|
-
POST_SLOT_DESTROYED =
|
|
1275
|
+
POST_SLOT_DESTROYED = 76,
|
|
1219
1276
|
/**
|
|
1220
1277
|
* Fires when a new slot entity is initialized. Specifically, this is either:
|
|
1221
1278
|
*
|
|
@@ -1224,58 +1281,63 @@ export declare enum ModCallbackCustom {
|
|
|
1224
1281
|
* - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when a
|
|
1225
1282
|
* Wheel of Fortune card is used)
|
|
1226
1283
|
*
|
|
1227
|
-
* When registering the callback
|
|
1228
|
-
* only fire if it matches the
|
|
1284
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1285
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1286
|
+
* `SlotVariant` provided.
|
|
1229
1287
|
*
|
|
1230
1288
|
* ```ts
|
|
1231
1289
|
* function postSlotInit(slot: Entity): void {}
|
|
1232
1290
|
* ```
|
|
1233
1291
|
*/
|
|
1234
|
-
POST_SLOT_INIT =
|
|
1292
|
+
POST_SLOT_INIT = 77,
|
|
1235
1293
|
/**
|
|
1236
1294
|
* Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
|
|
1237
1295
|
*
|
|
1238
|
-
* When registering the callback
|
|
1239
|
-
* only fire if it matches the
|
|
1296
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1297
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1298
|
+
* `SlotVariant` provided.
|
|
1240
1299
|
*
|
|
1241
1300
|
* ```ts
|
|
1242
1301
|
* function postSlotRender(slot: Entity): void {}
|
|
1243
1302
|
* ```
|
|
1244
1303
|
*/
|
|
1245
|
-
POST_SLOT_RENDER =
|
|
1304
|
+
POST_SLOT_RENDER = 78,
|
|
1246
1305
|
/**
|
|
1247
1306
|
* Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
|
|
1248
1307
|
*
|
|
1249
|
-
* When registering the callback
|
|
1250
|
-
* only fire if it matches the
|
|
1308
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1309
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1310
|
+
* `SlotVariant` provided.
|
|
1251
1311
|
*
|
|
1252
1312
|
* ```ts
|
|
1253
1313
|
* function postSlotUpdate(slot: Entity): void {}
|
|
1254
1314
|
* ```
|
|
1255
1315
|
*/
|
|
1256
|
-
POST_SLOT_UPDATE =
|
|
1316
|
+
POST_SLOT_UPDATE = 79,
|
|
1257
1317
|
/**
|
|
1258
1318
|
* Fires from the `POST_RENDER` callback on every frame that spikes exist.
|
|
1259
1319
|
*
|
|
1260
|
-
* When registering the callback
|
|
1261
|
-
* only fire if it matches the variant
|
|
1320
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1321
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1322
|
+
* provided.
|
|
1262
1323
|
*
|
|
1263
1324
|
* ```ts
|
|
1264
1325
|
* function postSpikesRender(spikes: GridEntitySpikes): void {}
|
|
1265
1326
|
* ```
|
|
1266
1327
|
*/
|
|
1267
|
-
POST_SPIKES_RENDER =
|
|
1328
|
+
POST_SPIKES_RENDER = 80,
|
|
1268
1329
|
/**
|
|
1269
1330
|
* Fires from the `POST_UPDATE` callback on every frame that spikes exist.
|
|
1270
1331
|
*
|
|
1271
|
-
* When registering the callback
|
|
1272
|
-
* only fire if it matches the variant
|
|
1332
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1333
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1334
|
+
* provided.
|
|
1273
1335
|
*
|
|
1274
1336
|
* ```ts
|
|
1275
1337
|
* function postSpikesUpdate(spikes: GridEntitySpikes): void {}
|
|
1276
1338
|
* ```
|
|
1277
1339
|
*/
|
|
1278
|
-
POST_SPIKES_UPDATE =
|
|
1340
|
+
POST_SPIKES_UPDATE = 81,
|
|
1279
1341
|
/**
|
|
1280
1342
|
* Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
1281
1343
|
* `EntityTear.FrameCount` is equal to 0).
|
|
@@ -1283,58 +1345,63 @@ export declare enum ModCallbackCustom {
|
|
|
1283
1345
|
* This callback is useful because many attributes cannot be set or retrieved properly in the
|
|
1284
1346
|
* normal `POST_TEAR_INIT` callback.
|
|
1285
1347
|
*
|
|
1286
|
-
* When registering the callback
|
|
1287
|
-
* only fire if
|
|
1348
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1349
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1350
|
+
* `TearVariant` provided.
|
|
1288
1351
|
*
|
|
1289
1352
|
* ```ts
|
|
1290
1353
|
* function postTearInitLate(tear: EntityTear): void {}
|
|
1291
1354
|
* ```
|
|
1292
1355
|
*/
|
|
1293
|
-
POST_TEAR_INIT_LATE =
|
|
1356
|
+
POST_TEAR_INIT_LATE = 82,
|
|
1294
1357
|
/**
|
|
1295
1358
|
* Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
|
|
1296
1359
|
* `EntityTear.FrameCount` is equal to 1).
|
|
1297
1360
|
*
|
|
1298
1361
|
* This callback is useful because Incubus tears are not distinguishable until the second frame.
|
|
1299
1362
|
*
|
|
1300
|
-
* When registering the callback
|
|
1301
|
-
* only fire if
|
|
1363
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1364
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1365
|
+
* `TearVariant` provided.
|
|
1302
1366
|
*
|
|
1303
1367
|
* ```ts
|
|
1304
1368
|
* function postTearInitVeryLate(tear: EntityTear): void {}
|
|
1305
1369
|
* ```
|
|
1306
1370
|
*/
|
|
1307
|
-
POST_TEAR_INIT_VERY_LATE =
|
|
1371
|
+
POST_TEAR_INIT_VERY_LATE = 83,
|
|
1308
1372
|
/**
|
|
1309
1373
|
* Fires from the `POST_RENDER` callback on every frame that a TNT exists.
|
|
1310
1374
|
*
|
|
1311
|
-
* When registering the callback
|
|
1312
|
-
* only fire if it matches the variant
|
|
1375
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1376
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1377
|
+
* provided.
|
|
1313
1378
|
*
|
|
1314
1379
|
* ```ts
|
|
1315
1380
|
* function postTNTRender(tnt: GridEntityTNT): void {}
|
|
1316
1381
|
* ```
|
|
1317
1382
|
*/
|
|
1318
|
-
POST_TNT_RENDER =
|
|
1383
|
+
POST_TNT_RENDER = 84,
|
|
1319
1384
|
/**
|
|
1320
1385
|
* Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
|
|
1321
1386
|
*
|
|
1322
|
-
* When registering the callback
|
|
1323
|
-
* only fire if it matches the variant
|
|
1387
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1388
|
+
* an optional third argument that will make the callback only fire if it matches the variant
|
|
1389
|
+
* provided.
|
|
1324
1390
|
*
|
|
1325
1391
|
* ```ts
|
|
1326
1392
|
* function postTNTUpdate(tnt: GridEntityTNT): void {}
|
|
1327
1393
|
* ```
|
|
1328
1394
|
*/
|
|
1329
|
-
POST_TNT_UPDATE =
|
|
1395
|
+
POST_TNT_UPDATE = 85,
|
|
1330
1396
|
/**
|
|
1331
1397
|
* Fires from the `POST_PEFFECT_UPDATE` callback when a player gains or loses a new
|
|
1332
1398
|
* transformation.
|
|
1333
1399
|
*
|
|
1334
1400
|
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
1335
1401
|
*
|
|
1336
|
-
* When registering the callback
|
|
1337
|
-
* only fire if it matches the `PlayerForm`
|
|
1402
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1403
|
+
* an optional third argument that will make the callback only fire if it matches the `PlayerForm`
|
|
1404
|
+
* provided.
|
|
1338
1405
|
*
|
|
1339
1406
|
* ```ts
|
|
1340
1407
|
* function postTransformation(
|
|
@@ -1344,12 +1411,13 @@ export declare enum ModCallbackCustom {
|
|
|
1344
1411
|
* ): void {}
|
|
1345
1412
|
* ```
|
|
1346
1413
|
*/
|
|
1347
|
-
POST_TRANSFORMATION =
|
|
1414
|
+
POST_TRANSFORMATION = 86,
|
|
1348
1415
|
/**
|
|
1349
1416
|
* Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
|
|
1350
1417
|
*
|
|
1351
|
-
* When registering the callback
|
|
1352
|
-
* only fire if it matches the
|
|
1418
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
|
|
1419
|
+
* an optional third argument that will make the callback only fire if it matches the
|
|
1420
|
+
* `TrinketType` provided.
|
|
1353
1421
|
*
|
|
1354
1422
|
* ```ts
|
|
1355
1423
|
* function postTrinketBreak(
|
|
@@ -1358,22 +1426,23 @@ export declare enum ModCallbackCustom {
|
|
|
1358
1426
|
* ): void {}
|
|
1359
1427
|
* ```
|
|
1360
1428
|
*/
|
|
1361
|
-
POST_TRINKET_BREAK =
|
|
1429
|
+
POST_TRINKET_BREAK = 87,
|
|
1362
1430
|
/**
|
|
1363
1431
|
* Fires from the `POST_PEFFECT_UPDATE` callback on the frame before a Berserk effect ends when
|
|
1364
1432
|
* the player is predicted to die (e.g. they currently have no health left or they took damage in
|
|
1365
1433
|
* a "Lost" form).
|
|
1366
1434
|
*
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1370
|
-
*
|
|
1435
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1436
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1437
|
+
* matches the `PlayerVariant` provided.
|
|
1438
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1439
|
+
* matches the `PlayerType` provided.
|
|
1371
1440
|
*
|
|
1372
1441
|
* ```ts
|
|
1373
1442
|
* function preBerserkDeath(player: EntityPlayer): void {}
|
|
1374
1443
|
* ```
|
|
1375
1444
|
*/
|
|
1376
|
-
PRE_BERSERK_DEATH =
|
|
1445
|
+
PRE_BERSERK_DEATH = 88,
|
|
1377
1446
|
/**
|
|
1378
1447
|
* Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
|
|
1379
1448
|
* to initiate a custom revival, return an integer that corresponds to the item or type of revival
|
|
@@ -1382,16 +1451,17 @@ export declare enum ModCallbackCustom {
|
|
|
1382
1451
|
* This callback is useful because reviving the player after the game things that player should
|
|
1383
1452
|
* have died will result in the save data for the run getting deleted.
|
|
1384
1453
|
*
|
|
1385
|
-
*
|
|
1386
|
-
*
|
|
1387
|
-
*
|
|
1388
|
-
*
|
|
1454
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1455
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1456
|
+
* matches the `PlayerVariant` provided.
|
|
1457
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1458
|
+
* matches the `PlayerType` provided.
|
|
1389
1459
|
*
|
|
1390
1460
|
* ```ts
|
|
1391
1461
|
* function preCustomRevive(player: EntityPlayer): int | undefined {}
|
|
1392
1462
|
* ```
|
|
1393
1463
|
*/
|
|
1394
|
-
PRE_CUSTOM_REVIVE =
|
|
1464
|
+
PRE_CUSTOM_REVIVE = 89,
|
|
1395
1465
|
/**
|
|
1396
1466
|
* Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
|
|
1397
1467
|
* meets all of the conditions to pick it up.
|
|
@@ -1401,26 +1471,28 @@ export declare enum ModCallbackCustom {
|
|
|
1401
1471
|
* note that this callback will continue to fire for every frame that the player touches the
|
|
1402
1472
|
* pedestal, so you would need to continue returning false.)
|
|
1403
1473
|
*
|
|
1404
|
-
*
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1474
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1475
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1476
|
+
* matches the `PlayerVariant` provided.
|
|
1477
|
+
* - You can provide an optional fourth argument that will make the callback only fire if it
|
|
1478
|
+
* matches the `PlayerType` provided.
|
|
1408
1479
|
*
|
|
1409
1480
|
* ```ts
|
|
1410
1481
|
* function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
|
|
1411
1482
|
* ```
|
|
1412
1483
|
*/
|
|
1413
|
-
PRE_GET_PEDESTAL =
|
|
1484
|
+
PRE_GET_PEDESTAL = 90,
|
|
1414
1485
|
/**
|
|
1415
1486
|
* Fires from the `POST_PEFFECT_UPDATE` callback when an item becomes queued (i.e. when the player
|
|
1416
1487
|
* begins to hold the item above their head).
|
|
1417
1488
|
*
|
|
1418
1489
|
* Note that this callback will only fire once per Forgotten/Soul pair.
|
|
1419
1490
|
*
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1491
|
+
* When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
|
|
1492
|
+
* - You can provide an optional third argument that will make the callback only fire if it
|
|
1493
|
+
* matches the `ItemType` provided.
|
|
1494
|
+
* - You can provide an optional fourth argument that will make the callback only fire if the
|
|
1495
|
+
* sub-type matches the `CollectibleType` or the `TrinketType` provided.
|
|
1424
1496
|
*
|
|
1425
1497
|
* ```ts
|
|
1426
1498
|
* function preItemPickup(
|
|
@@ -1429,7 +1501,7 @@ export declare enum ModCallbackCustom {
|
|
|
1429
1501
|
* ): void {}
|
|
1430
1502
|
* ```
|
|
1431
1503
|
*/
|
|
1432
|
-
PRE_ITEM_PICKUP =
|
|
1504
|
+
PRE_ITEM_PICKUP = 91,
|
|
1433
1505
|
/**
|
|
1434
1506
|
* Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
|
|
1435
1507
|
* player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
|
|
@@ -1443,6 +1515,6 @@ export declare enum ModCallbackCustom {
|
|
|
1443
1515
|
* function preNewLevel(player: EntityPlayer): void {}
|
|
1444
1516
|
* ```
|
|
1445
1517
|
*/
|
|
1446
|
-
PRE_NEW_LEVEL =
|
|
1518
|
+
PRE_NEW_LEVEL = 92
|
|
1447
1519
|
}
|
|
1448
1520
|
//# sourceMappingURL=ModCallbackCustom.d.ts.map
|