isaacscript-common 1.0.537 → 1.0.541

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ require("lualib_bundle");
3
+ local ____exports = {}
4
+ local hasSubscriptions, postTearUpdate, v
5
+ local ____exports = require("features.saveDataManager.exports")
6
+ local saveDataManager = ____exports.saveDataManager
7
+ local ____postTearInitVeryLate = require("callbacks.subscriptions.postTearInitVeryLate")
8
+ local postTearInitVeryLateFire = ____postTearInitVeryLate.postTearInitVeryLateFire
9
+ local postTearInitVeryLateHasSubscriptions = ____postTearInitVeryLate.postTearInitVeryLateHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return postTearInitVeryLateHasSubscriptions(nil)
12
+ end
13
+ function postTearUpdate(self, tear)
14
+ if not hasSubscriptions(nil) then
15
+ return
16
+ end
17
+ if tear.FrameCount == 0 then
18
+ return
19
+ end
20
+ local index = GetPtrHash(tear)
21
+ if not v.room.firedSet:has(index) then
22
+ v.room.firedSet:add(index)
23
+ postTearInitVeryLateFire(nil, tear)
24
+ end
25
+ end
26
+ v = {
27
+ room = {
28
+ firedSet = __TS__New(Set)
29
+ }
30
+ }
31
+ function ____exports.postTearInitVeryLateCallbackInit(self, mod)
32
+ saveDataManager(nil, "postTearInitVeryLate", v, hasSubscriptions)
33
+ mod:AddCallback(ModCallbacks.MC_POST_TEAR_UPDATE, postTearUpdate)
34
+ end
35
+ return ____exports
@@ -0,0 +1,2 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare type PostTearInitVeryLateCallbackType = (tear: EntityTear) => void;
@@ -0,0 +1,26 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ require("lualib_bundle");
3
+ local ____exports = {}
4
+ local subscriptions = {}
5
+ function ____exports.postTearInitVeryLateHasSubscriptions(self)
6
+ return #subscriptions > 0
7
+ end
8
+ function ____exports.postTearInitVeryLateRegister(self, callback, tearVariant)
9
+ __TS__ArrayPush(subscriptions, {callback, tearVariant})
10
+ end
11
+ function ____exports.postTearInitVeryLateFire(self, tear)
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback
14
+ callback = ____value[1]
15
+ local tearVariant
16
+ tearVariant = ____value[2]
17
+ do
18
+ if (tearVariant ~= nil) and (tearVariant ~= tear.Variant) then
19
+ goto __continue5
20
+ end
21
+ callback(nil, tear)
22
+ end
23
+ ::__continue5::
24
+ end
25
+ end
26
+ return ____exports
@@ -51,6 +51,7 @@ export declare const EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45;
51
51
  * information, see the documentation for the `clearSprite()` helper function.
52
52
  */
53
53
  export declare const EMPTY_PNG_PATH = "gfx/none.png";
54
+ export declare const FAMILIARS_THAT_SHOOT_PLAYER_TEARS: Set<FamiliarVariant>;
54
55
  /** As of Repentance, the final stage is floor 13 (which is the Home floor). */
55
56
  export declare const FINAL_STAGE: number;
56
57
  /**
@@ -22,6 +22,7 @@ ____exports.DISTANCE_OF_GRID_TILE = 40
22
22
  ____exports.DOOR_HITBOX_DISTANCE = 11
23
23
  ____exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45
24
24
  ____exports.EMPTY_PNG_PATH = "gfx/none.png"
25
+ ____exports.FAMILIARS_THAT_SHOOT_PLAYER_TEARS = __TS__New(Set, {FamiliarVariant.SCISSORS, FamiliarVariant.INCUBUS, FamiliarVariant.FATES_REWARD, FamiliarVariant.SPRINKLER, FamiliarVariant.LOST_SOUL, FamiliarVariant.TWISTED_BABY, FamiliarVariant.BLOOD_BABY, FamiliarVariant.DECAP_ATTACK})
25
26
  ____exports.FINAL_STAGE = LevelStage.NUM_STAGES - 1
26
27
  ____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
27
28
  ____exports.GENESIS_ROOM_VARIANT = 1000
@@ -0,0 +1,2 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare function isFamiliarThatShootsPlayerTears(familiar: EntityFamiliar): boolean;
@@ -0,0 +1,8 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ local ____constants = require("constants")
4
+ local FAMILIARS_THAT_SHOOT_PLAYER_TEARS = ____constants.FAMILIARS_THAT_SHOOT_PLAYER_TEARS
5
+ function ____exports.isFamiliarThatShootsPlayerTears(self, familiar)
6
+ return FAMILIARS_THAT_SHOOT_PLAYER_TEARS:has(familiar.Type)
7
+ end
8
+ return ____exports
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export { deepCopy } from "./functions/deepCopy";
20
20
  export { deepCopyTests } from "./functions/deepCopyTests";
21
21
  export * from "./functions/doors";
22
22
  export * from "./functions/entity";
23
+ export * from "./functions/familiars";
23
24
  export * from "./functions/flag";
24
25
  export * from "./functions/gridEntity";
25
26
  export * from "./functions/input";
package/dist/index.lua CHANGED
@@ -166,6 +166,14 @@ do
166
166
  end
167
167
  end
168
168
  end
169
+ do
170
+ local ____export = require("functions.familiars")
171
+ for ____exportKey, ____exportValue in pairs(____export) do
172
+ if ____exportKey ~= "default" then
173
+ ____exports[____exportKey] = ____exportValue
174
+ end
175
+ end
176
+ end
169
177
  do
170
178
  local ____export = require("functions.flag")
171
179
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -36,6 +36,7 @@ import { PostSlotInitCallbackType } from "../callbacks/subscriptions/postSlotIni
36
36
  import { PostSlotRenderCallbackType } from "../callbacks/subscriptions/postSlotRender";
37
37
  import { PostSlotUpdateCallbackType } from "../callbacks/subscriptions/postSlotUpdate";
38
38
  import { PostTearInitLateCallbackType } from "../callbacks/subscriptions/postTearInitLate";
39
+ import { PostTearInitVeryLateCallbackType } from "../callbacks/subscriptions/postTearInitVeryLate";
39
40
  import { PostTransformationCallbackType } from "../callbacks/subscriptions/postTransformation";
40
41
  import { PreCustomReviveCallbackType } from "../callbacks/subscriptions/preCustomRevive";
41
42
  import { PreItemPickupCallbackType } from "../callbacks/subscriptions/preItemPickup";
@@ -75,6 +76,10 @@ export interface CallbackParametersCustom {
75
76
  callback: PostTearInitLateCallbackType,
76
77
  tearVariant?: TearVariant | int
77
78
  ];
79
+ [ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE]: [
80
+ callback: PostTearInitVeryLateCallbackType,
81
+ tearVariant?: TearVariant | int
82
+ ];
78
83
  [ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE]: [
79
84
  callback: PostFamiliarInitLateCallbackType,
80
85
  familiarVariant?: FamiliarVariant | int
@@ -16,35 +16,36 @@ export declare enum ModCallbacksCustom {
16
16
  MC_PRE_NEW_LEVEL = 7,
17
17
  MC_POST_PLAYER_INIT_LATE = 8,
18
18
  MC_POST_TEAR_INIT_LATE = 9,
19
- MC_POST_FAMILIAR_INIT_LATE = 10,
20
- MC_POST_BOMB_INIT_LATE = 11,
21
- MC_POST_PICKUP_INIT_LATE = 12,
22
- MC_POST_LASER_INIT_LATE = 13,
23
- MC_POST_KNIFE_INIT_LATE = 14,
24
- MC_POST_PROJECTILE_INIT_LATE = 15,
25
- MC_POST_NPC_INIT_LATE = 16,
26
- MC_POST_EFFECT_INIT_LATE = 17,
27
- MC_POST_PICKUP_COLLECT = 18,
28
- MC_PRE_ITEM_PICKUP = 19,
29
- MC_POST_ITEM_PICKUP = 20,
30
- MC_POST_PLAYER_CHANGE_TYPE = 21,
31
- MC_POST_PLAYER_CHANGE_HEALTH = 22,
32
- MC_POST_PLAYER_FATAL_DAMAGE = 23,
33
- MC_PRE_CUSTOM_REVIVE = 24,
34
- MC_POST_CUSTOM_REVIVE = 25,
35
- MC_POST_FLIP = 26,
36
- MC_POST_FIRST_FLIP = 27,
37
- MC_POST_ESAU_JR = 28,
38
- MC_POST_FIRST_ESAU_JR = 29,
39
- MC_POST_TRANSFORMATION = 30,
40
- MC_POST_PURCHASE = 31,
41
- MC_POST_SACRIFICE = 32,
42
- MC_POST_CURSED_TELEPORT = 33,
43
- MC_POST_SLOT_INIT = 34,
44
- MC_POST_SLOT_UPDATE = 35,
45
- MC_POST_SLOT_RENDER = 36,
46
- MC_POST_SLOT_DESTROYED = 37,
47
- MC_POST_GRID_ENTITY_INIT = 38,
48
- MC_POST_GRID_ENTITY_UPDATE = 39,
49
- MC_POST_GRID_ENTITY_REMOVE = 40
19
+ MC_POST_TEAR_INIT_VERY_LATE = 10,
20
+ MC_POST_FAMILIAR_INIT_LATE = 11,
21
+ MC_POST_BOMB_INIT_LATE = 12,
22
+ MC_POST_PICKUP_INIT_LATE = 13,
23
+ MC_POST_LASER_INIT_LATE = 14,
24
+ MC_POST_KNIFE_INIT_LATE = 15,
25
+ MC_POST_PROJECTILE_INIT_LATE = 16,
26
+ MC_POST_NPC_INIT_LATE = 17,
27
+ MC_POST_EFFECT_INIT_LATE = 18,
28
+ MC_POST_PICKUP_COLLECT = 19,
29
+ MC_PRE_ITEM_PICKUP = 20,
30
+ MC_POST_ITEM_PICKUP = 21,
31
+ MC_POST_PLAYER_CHANGE_TYPE = 22,
32
+ MC_POST_PLAYER_CHANGE_HEALTH = 23,
33
+ MC_POST_PLAYER_FATAL_DAMAGE = 24,
34
+ MC_PRE_CUSTOM_REVIVE = 25,
35
+ MC_POST_CUSTOM_REVIVE = 26,
36
+ MC_POST_FLIP = 27,
37
+ MC_POST_FIRST_FLIP = 28,
38
+ MC_POST_ESAU_JR = 29,
39
+ MC_POST_FIRST_ESAU_JR = 30,
40
+ MC_POST_TRANSFORMATION = 31,
41
+ MC_POST_PURCHASE = 32,
42
+ MC_POST_SACRIFICE = 33,
43
+ MC_POST_CURSED_TELEPORT = 34,
44
+ MC_POST_SLOT_INIT = 35,
45
+ MC_POST_SLOT_UPDATE = 36,
46
+ MC_POST_SLOT_RENDER = 37,
47
+ MC_POST_SLOT_DESTROYED = 38,
48
+ MC_POST_GRID_ENTITY_INIT = 39,
49
+ MC_POST_GRID_ENTITY_UPDATE = 40,
50
+ MC_POST_GRID_ENTITY_REMOVE = 41
50
51
  }
@@ -21,66 +21,68 @@ ____exports.ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE = 8
21
21
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE] = "MC_POST_PLAYER_INIT_LATE"
22
22
  ____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE = 9
23
23
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE] = "MC_POST_TEAR_INIT_LATE"
24
- ____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE = 10
24
+ ____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE = 10
25
+ ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE] = "MC_POST_TEAR_INIT_VERY_LATE"
26
+ ____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE = 11
25
27
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE] = "MC_POST_FAMILIAR_INIT_LATE"
26
- ____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE = 11
28
+ ____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE = 12
27
29
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE] = "MC_POST_BOMB_INIT_LATE"
28
- ____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE = 12
30
+ ____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE = 13
29
31
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE] = "MC_POST_PICKUP_INIT_LATE"
30
- ____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE = 13
32
+ ____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE = 14
31
33
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE] = "MC_POST_LASER_INIT_LATE"
32
- ____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE = 14
34
+ ____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE = 15
33
35
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE] = "MC_POST_KNIFE_INIT_LATE"
34
- ____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE = 15
36
+ ____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE = 16
35
37
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE] = "MC_POST_PROJECTILE_INIT_LATE"
36
- ____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE = 16
38
+ ____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE = 17
37
39
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE] = "MC_POST_NPC_INIT_LATE"
38
- ____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE = 17
40
+ ____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE = 18
39
41
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE] = "MC_POST_EFFECT_INIT_LATE"
40
- ____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT = 18
42
+ ____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT = 19
41
43
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT] = "MC_POST_PICKUP_COLLECT"
42
- ____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP = 19
44
+ ____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP = 20
43
45
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP] = "MC_PRE_ITEM_PICKUP"
44
- ____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP = 20
46
+ ____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP = 21
45
47
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP] = "MC_POST_ITEM_PICKUP"
46
- ____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE = 21
48
+ ____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE = 22
47
49
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE] = "MC_POST_PLAYER_CHANGE_TYPE"
48
- ____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH = 22
50
+ ____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH = 23
49
51
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH] = "MC_POST_PLAYER_CHANGE_HEALTH"
50
- ____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE = 23
52
+ ____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE = 24
51
53
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE] = "MC_POST_PLAYER_FATAL_DAMAGE"
52
- ____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE = 24
54
+ ____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE = 25
53
55
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE] = "MC_PRE_CUSTOM_REVIVE"
54
- ____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE = 25
56
+ ____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE = 26
55
57
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE] = "MC_POST_CUSTOM_REVIVE"
56
- ____exports.ModCallbacksCustom.MC_POST_FLIP = 26
58
+ ____exports.ModCallbacksCustom.MC_POST_FLIP = 27
57
59
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FLIP] = "MC_POST_FLIP"
58
- ____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP = 27
60
+ ____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP = 28
59
61
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP] = "MC_POST_FIRST_FLIP"
60
- ____exports.ModCallbacksCustom.MC_POST_ESAU_JR = 28
62
+ ____exports.ModCallbacksCustom.MC_POST_ESAU_JR = 29
61
63
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_ESAU_JR] = "MC_POST_ESAU_JR"
62
- ____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR = 29
64
+ ____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR = 30
63
65
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR] = "MC_POST_FIRST_ESAU_JR"
64
- ____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION = 30
66
+ ____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION = 31
65
67
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION] = "MC_POST_TRANSFORMATION"
66
- ____exports.ModCallbacksCustom.MC_POST_PURCHASE = 31
68
+ ____exports.ModCallbacksCustom.MC_POST_PURCHASE = 32
67
69
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PURCHASE] = "MC_POST_PURCHASE"
68
- ____exports.ModCallbacksCustom.MC_POST_SACRIFICE = 32
70
+ ____exports.ModCallbacksCustom.MC_POST_SACRIFICE = 33
69
71
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SACRIFICE] = "MC_POST_SACRIFICE"
70
- ____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT = 33
72
+ ____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT = 34
71
73
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT] = "MC_POST_CURSED_TELEPORT"
72
- ____exports.ModCallbacksCustom.MC_POST_SLOT_INIT = 34
74
+ ____exports.ModCallbacksCustom.MC_POST_SLOT_INIT = 35
73
75
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_INIT] = "MC_POST_SLOT_INIT"
74
- ____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE = 35
76
+ ____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE = 36
75
77
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE] = "MC_POST_SLOT_UPDATE"
76
- ____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER = 36
78
+ ____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER = 37
77
79
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER] = "MC_POST_SLOT_RENDER"
78
- ____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED = 37
80
+ ____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED = 38
79
81
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED] = "MC_POST_SLOT_DESTROYED"
80
- ____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT = 38
82
+ ____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT = 39
81
83
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT] = "MC_POST_GRID_ENTITY_INIT"
82
- ____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE = 39
84
+ ____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE = 40
83
85
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE] = "MC_POST_GRID_ENTITY_UPDATE"
84
- ____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE = 40
86
+ ____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE = 41
85
87
  ____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE] = "MC_POST_GRID_ENTITY_REMOVE"
86
88
  return ____exports
@@ -76,6 +76,8 @@ local ____postSlotUpdate = require("callbacks.subscriptions.postSlotUpdate")
76
76
  local postSlotUpdateRegister = ____postSlotUpdate.postSlotUpdateRegister
77
77
  local ____postTearInitLate = require("callbacks.subscriptions.postTearInitLate")
78
78
  local postTearInitLateRegister = ____postTearInitLate.postTearInitLateRegister
79
+ local ____postTearInitVeryLate = require("callbacks.subscriptions.postTearInitVeryLate")
80
+ local postTearInitVeryLateRegister = ____postTearInitVeryLate.postTearInitVeryLateRegister
79
81
  local ____postTransformation = require("callbacks.subscriptions.postTransformation")
80
82
  local postTransformationRegister = ____postTransformation.postTransformationRegister
81
83
  local ____preCustomRevive = require("callbacks.subscriptions.preCustomRevive")
@@ -106,249 +108,255 @@ function getCallbackName(self, callbackID)
106
108
  end
107
109
  function getCallbackRegisterFunction(self, callbackID)
108
110
  repeat
109
- local ____switch17 = callbackID
110
- local ____cond17 = ____switch17 == ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED
111
- if ____cond17 then
111
+ local ____switch18 = callbackID
112
+ local ____cond18 = ____switch18 == ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED
113
+ if ____cond18 then
112
114
  do
113
115
  return postGameStartedReorderedRegister
114
116
  end
115
117
  end
116
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_NEW_LEVEL_REORDERED)
117
- if ____cond17 then
118
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_NEW_LEVEL_REORDERED)
119
+ if ____cond18 then
118
120
  do
119
121
  return postNewLevelReorderedRegister
120
122
  end
121
123
  end
122
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_NEW_ROOM_REORDERED)
123
- if ____cond17 then
124
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_NEW_ROOM_REORDERED)
125
+ if ____cond18 then
124
126
  do
125
127
  return postNewRoomReorderedRegister
126
128
  end
127
129
  end
128
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_INIT_REORDERED)
129
- if ____cond17 then
130
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PLAYER_INIT_REORDERED)
131
+ if ____cond18 then
130
132
  do
131
133
  return postPlayerInitReorderedRegister
132
134
  end
133
135
  end
134
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_UPDATE_REORDERED)
135
- if ____cond17 then
136
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PLAYER_UPDATE_REORDERED)
137
+ if ____cond18 then
136
138
  do
137
139
  return postPlayerUpdateReorderedRegister
138
140
  end
139
141
  end
140
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED)
141
- if ____cond17 then
142
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED)
143
+ if ____cond18 then
142
144
  do
143
145
  return postPlayerRenderReorderedRegister
144
146
  end
145
147
  end
146
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY)
147
- if ____cond17 then
148
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY)
149
+ if ____cond18 then
148
150
  do
149
151
  return postNewRoomEarlyRegister
150
152
  end
151
153
  end
152
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_PRE_NEW_LEVEL)
153
- if ____cond17 then
154
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_PRE_NEW_LEVEL)
155
+ if ____cond18 then
154
156
  do
155
157
  return preNewLevelRegister
156
158
  end
157
159
  end
158
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE)
159
- if ____cond17 then
160
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE)
161
+ if ____cond18 then
160
162
  do
161
163
  return postPlayerInitLateRegister
162
164
  end
163
165
  end
164
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_TEAR_INIT_LATE)
165
- if ____cond17 then
166
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_TEAR_INIT_LATE)
167
+ if ____cond18 then
166
168
  do
167
169
  return postTearInitLateRegister
168
170
  end
169
171
  end
170
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE)
171
- if ____cond17 then
172
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE)
173
+ if ____cond18 then
174
+ do
175
+ return postTearInitVeryLateRegister
176
+ end
177
+ end
178
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE)
179
+ if ____cond18 then
172
180
  do
173
181
  return postFamiliarInitLateRegister
174
182
  end
175
183
  end
176
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_BOMB_INIT_LATE)
177
- if ____cond17 then
184
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_BOMB_INIT_LATE)
185
+ if ____cond18 then
178
186
  do
179
187
  return postBombInitLateRegister
180
188
  end
181
189
  end
182
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE)
183
- if ____cond17 then
190
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE)
191
+ if ____cond18 then
184
192
  do
185
193
  return postPickupInitLateRegister
186
194
  end
187
195
  end
188
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_LASER_INIT_LATE)
189
- if ____cond17 then
196
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_LASER_INIT_LATE)
197
+ if ____cond18 then
190
198
  do
191
199
  return postLaserInitLateRegister
192
200
  end
193
201
  end
194
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE)
195
- if ____cond17 then
202
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE)
203
+ if ____cond18 then
196
204
  do
197
205
  return postKnifeInitLateRegister
198
206
  end
199
207
  end
200
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE)
201
- if ____cond17 then
208
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE)
209
+ if ____cond18 then
202
210
  do
203
211
  return postProjectileInitLateRegister
204
212
  end
205
213
  end
206
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_NPC_INIT_LATE)
207
- if ____cond17 then
214
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_NPC_INIT_LATE)
215
+ if ____cond18 then
208
216
  do
209
217
  return postNPCInitLateRegister
210
218
  end
211
219
  end
212
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE)
213
- if ____cond17 then
220
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE)
221
+ if ____cond18 then
214
222
  do
215
223
  return postEffectInitLateRegister
216
224
  end
217
225
  end
218
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PICKUP_COLLECT)
219
- if ____cond17 then
226
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PICKUP_COLLECT)
227
+ if ____cond18 then
220
228
  do
221
229
  return postPickupCollectRegister
222
230
  end
223
231
  end
224
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_PRE_ITEM_PICKUP)
225
- if ____cond17 then
232
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_PRE_ITEM_PICKUP)
233
+ if ____cond18 then
226
234
  do
227
235
  return preItemPickupRegister
228
236
  end
229
237
  end
230
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_ITEM_PICKUP)
231
- if ____cond17 then
238
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_ITEM_PICKUP)
239
+ if ____cond18 then
232
240
  do
233
241
  return postItemPickupRegister
234
242
  end
235
243
  end
236
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE)
237
- if ____cond17 then
244
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE)
245
+ if ____cond18 then
238
246
  do
239
247
  return postPlayerChangeTypeRegister
240
248
  end
241
249
  end
242
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH)
243
- if ____cond17 then
250
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH)
251
+ if ____cond18 then
244
252
  do
245
253
  return postPlayerChangeHealthRegister
246
254
  end
247
255
  end
248
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE)
249
- if ____cond17 then
256
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE)
257
+ if ____cond18 then
250
258
  do
251
259
  return postPlayerFatalDamageRegister
252
260
  end
253
261
  end
254
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE)
255
- if ____cond17 then
262
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE)
263
+ if ____cond18 then
256
264
  do
257
265
  return preCustomReviveRegister
258
266
  end
259
267
  end
260
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_CUSTOM_REVIVE)
261
- if ____cond17 then
268
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_CUSTOM_REVIVE)
269
+ if ____cond18 then
262
270
  do
263
271
  return postCustomReviveRegister
264
272
  end
265
273
  end
266
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_FLIP)
267
- if ____cond17 then
274
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_FLIP)
275
+ if ____cond18 then
268
276
  do
269
277
  return postFlipRegister
270
278
  end
271
279
  end
272
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_FIRST_FLIP)
273
- if ____cond17 then
280
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_FIRST_FLIP)
281
+ if ____cond18 then
274
282
  do
275
283
  return postFirstFlipRegister
276
284
  end
277
285
  end
278
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_ESAU_JR)
279
- if ____cond17 then
286
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_ESAU_JR)
287
+ if ____cond18 then
280
288
  do
281
289
  return postEsauJrRegister
282
290
  end
283
291
  end
284
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_FIRST_ESAU_JR)
285
- if ____cond17 then
292
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_FIRST_ESAU_JR)
293
+ if ____cond18 then
286
294
  do
287
295
  return postFirstEsauJrRegister
288
296
  end
289
297
  end
290
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_TRANSFORMATION)
291
- if ____cond17 then
298
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_TRANSFORMATION)
299
+ if ____cond18 then
292
300
  do
293
301
  return postTransformationRegister
294
302
  end
295
303
  end
296
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PURCHASE)
297
- if ____cond17 then
304
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_PURCHASE)
305
+ if ____cond18 then
298
306
  do
299
307
  return postPurchaseRegister
300
308
  end
301
309
  end
302
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_SACRIFICE)
303
- if ____cond17 then
310
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_SACRIFICE)
311
+ if ____cond18 then
304
312
  do
305
313
  return postSacrificeRegister
306
314
  end
307
315
  end
308
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_CURSED_TELEPORT)
309
- if ____cond17 then
316
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_CURSED_TELEPORT)
317
+ if ____cond18 then
310
318
  do
311
319
  return postCursedTeleportRegister
312
320
  end
313
321
  end
314
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_SLOT_INIT)
315
- if ____cond17 then
322
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_SLOT_INIT)
323
+ if ____cond18 then
316
324
  do
317
325
  return postSlotInitRegister
318
326
  end
319
327
  end
320
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_SLOT_UPDATE)
321
- if ____cond17 then
328
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_SLOT_UPDATE)
329
+ if ____cond18 then
322
330
  do
323
331
  return postSlotUpdateRegister
324
332
  end
325
333
  end
326
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_SLOT_RENDER)
327
- if ____cond17 then
334
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_SLOT_RENDER)
335
+ if ____cond18 then
328
336
  do
329
337
  return postSlotRenderRegister
330
338
  end
331
339
  end
332
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_SLOT_DESTROYED)
333
- if ____cond17 then
340
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_SLOT_DESTROYED)
341
+ if ____cond18 then
334
342
  do
335
343
  return postSlotDestroyedRegister
336
344
  end
337
345
  end
338
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT)
339
- if ____cond17 then
346
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT)
347
+ if ____cond18 then
340
348
  do
341
349
  return postGridEntityInitRegister
342
350
  end
343
351
  end
344
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE)
345
- if ____cond17 then
352
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE)
353
+ if ____cond18 then
346
354
  do
347
355
  return postGridEntityUpdateRegister
348
356
  end
349
357
  end
350
- ____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE)
351
- if ____cond17 then
358
+ ____cond18 = ____cond18 or (____switch18 == ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE)
359
+ if ____cond18 then
352
360
  do
353
361
  return postGridEntityRemoveRegister
354
362
  end
@@ -413,6 +421,11 @@ function ModUpgraded.prototype.SaveData(self, data)
413
421
  end
414
422
  function ModUpgraded.prototype.AddCallbackCustom(self, callbackID, ...)
415
423
  local callbackRegisterFunction = getCallbackRegisterFunction(nil, callbackID)
424
+ if callbackRegisterFunction == nil then
425
+ error(
426
+ "Failed to find a callback registration function for custom callback: " .. tostring(callbackID)
427
+ )
428
+ end
416
429
  callbackRegisterFunction(nil, ...)
417
430
  end
418
431
  return ____exports
@@ -54,6 +54,8 @@ local ____postSlotRenderBroken = require("callbacks.postSlotRenderBroken")
54
54
  local postSlotRenderBrokenCallbacksInit = ____postSlotRenderBroken.postSlotRenderBrokenCallbacksInit
55
55
  local ____postTearInitLate = require("callbacks.postTearInitLate")
56
56
  local postTearInitLateCallbackInit = ____postTearInitLate.postTearInitLateCallbackInit
57
+ local ____postTearInitVeryLate = require("callbacks.postTearInitVeryLate")
58
+ local postTearInitVeryLateCallbackInit = ____postTearInitVeryLate.postTearInitVeryLateCallbackInit
57
59
  local ____postTransformation = require("callbacks.postTransformation")
58
60
  local postTransformationCallbackInit = ____postTransformation.postTransformationCallbackInit
59
61
  local ____preNewLevel = require("callbacks.preNewLevel")
@@ -89,6 +91,7 @@ function initCustomCallbacks(self, mod)
89
91
  postPlayerReorderedCallbacksInit(nil, mod)
90
92
  postPlayerInitLateCallbackInit(nil, mod)
91
93
  postTearInitLateCallbackInit(nil, mod)
94
+ postTearInitVeryLateCallbackInit(nil, mod)
92
95
  postFamiliarInitLateCallbackInit(nil, mod)
93
96
  postBombInitLateCallbackInit(nil, mod)
94
97
  postPickupInitLateCallbackInit(nil, mod)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.537",
3
+ "version": "1.0.541",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",