isaacscript-common 1.2.287 → 1.2.290

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/callbacks/postEffectStateChanged.d.ts +1 -0
  2. package/dist/callbacks/postEffectStateChanged.lua +35 -0
  3. package/dist/callbacks/postFamiliarStateChanged.d.ts +1 -0
  4. package/dist/callbacks/postFamiliarStateChanged.lua +35 -0
  5. package/dist/callbacks/postItemDischarged.d.ts +2 -0
  6. package/dist/callbacks/postItemDischarged.lua +83 -0
  7. package/dist/callbacks/postNPCStateChanged.d.ts +1 -0
  8. package/dist/callbacks/postNPCStateChanged.lua +35 -0
  9. package/dist/callbacks/postPickupStateChanged.d.ts +1 -0
  10. package/dist/callbacks/postPickupStateChanged.lua +35 -0
  11. package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts +2 -0
  12. package/dist/callbacks/subscriptions/postEffectStateChanged.lua +23 -0
  13. package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts +2 -0
  14. package/dist/callbacks/subscriptions/postFamiliarStateChanged.lua +23 -0
  15. package/dist/callbacks/subscriptions/postItemDischarged.d.ts +2 -0
  16. package/dist/callbacks/subscriptions/postItemDischarged.lua +23 -0
  17. package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +2 -0
  18. package/dist/callbacks/subscriptions/postNPCStateChanged.lua +27 -0
  19. package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts +2 -0
  20. package/dist/callbacks/subscriptions/postPickupStateChanged.lua +23 -0
  21. package/dist/enums/ModCallbacksCustom.d.ts +18 -13
  22. package/dist/enums/ModCallbacksCustom.lua +23 -13
  23. package/dist/features/debugDisplay.d.ts +80 -0
  24. package/dist/features/debugDisplay.lua +230 -0
  25. package/dist/features/extraConsoleCommands/commands.d.ts +6 -0
  26. package/dist/features/extraConsoleCommands/commands.lua +18 -118
  27. package/dist/features/extraConsoleCommands/commandsDisplay.d.ts +99 -0
  28. package/dist/features/extraConsoleCommands/commandsDisplay.lua +81 -0
  29. package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts +9 -0
  30. package/dist/features/extraConsoleCommands/commandsSubroutines.lua +126 -0
  31. package/dist/features/extraConsoleCommands/init.lua +26 -0
  32. package/dist/functions/utils.d.ts +2 -0
  33. package/dist/functions/utils.lua +4 -0
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.lua +25 -0
  36. package/dist/objects/callbackRegisterFunctions.lua +15 -0
  37. package/dist/types/AddCallbackParametersCustom.d.ts +26 -0
  38. package/dist/upgradeMod.lua +31 -10
  39. package/package.json +1 -1
@@ -0,0 +1,126 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ local ____cachedClasses = require("cachedClasses")
4
+ local game = ____cachedClasses.game
5
+ local ____HealthType = require("enums.HealthType")
6
+ local HealthType = ____HealthType.HealthType
7
+ local ____gridEntity = require("functions.gridEntity")
8
+ local spawnGridWithVariant = ____gridEntity.spawnGridWithVariant
9
+ local ____log = require("functions.log")
10
+ local logEntities = ____log.logEntities
11
+ local logGridEntities = ____log.logGridEntities
12
+ local ____playerHealth = require("functions.playerHealth")
13
+ local addPlayerHealthType = ____playerHealth.addPlayerHealthType
14
+ local ____roomData = require("functions.roomData")
15
+ local getRoomData = ____roomData.getRoomData
16
+ local getRoomDescriptor = ____roomData.getRoomDescriptor
17
+ local ____rooms = require("functions.rooms")
18
+ local changeRoom = ____rooms.changeRoom
19
+ local getRoomGridIndexesForType = ____rooms.getRoomGridIndexesForType
20
+ local ____utils = require("functions.utils")
21
+ local printConsole = ____utils.printConsole
22
+ local ____vector = require("functions.vector")
23
+ local directionToVector = ____vector.directionToVector
24
+ local ____roomTypeNames = require("objects.roomTypeNames")
25
+ local DEFAULT_ROOM_TYPE_NAME = ____roomTypeNames.DEFAULT_ROOM_TYPE_NAME
26
+ local ROOM_TYPE_NAMES = ____roomTypeNames.ROOM_TYPE_NAMES
27
+ local DEFAULT_MOVE_UNITS = 0.5
28
+ function ____exports.addHeart(self, params, healthType)
29
+ local numHearts = healthType == HealthType.MAX_HEARTS and 2 or 1
30
+ if params ~= "" then
31
+ local num = tonumber(params)
32
+ if num == nil then
33
+ printConsole(nil, "That is an invalid amount of hearts to add.")
34
+ return
35
+ end
36
+ numHearts = num
37
+ end
38
+ local player = Isaac.GetPlayer()
39
+ addPlayerHealthType(nil, player, healthType, numHearts)
40
+ end
41
+ function ____exports.devilAngel(self, useDevil)
42
+ local level = game:GetLevel()
43
+ local devilAngelRoomData = getRoomData(nil, GridRooms.ROOM_DEVIL_IDX)
44
+ if devilAngelRoomData ~= nil then
45
+ local roomType = devilAngelRoomData.Type
46
+ local conflictingType = useDevil and RoomType.ROOM_ANGEL or RoomType.ROOM_DEVIL
47
+ if roomType == conflictingType then
48
+ local roomDescriptor = getRoomDescriptor(nil, GridRooms.ROOM_DEVIL_IDX)
49
+ roomDescriptor.Data = nil
50
+ end
51
+ end
52
+ if useDevil then
53
+ level:InitializeDevilAngelRoom(false, true)
54
+ else
55
+ level:InitializeDevilAngelRoom(true, false)
56
+ end
57
+ changeRoom(nil, GridRooms.ROOM_DEVIL_IDX)
58
+ end
59
+ function ____exports.listEntities(self, params, includeBackgroundEffects)
60
+ local entityTypeFilter
61
+ if params ~= "" then
62
+ entityTypeFilter = tonumber(params)
63
+ if entityTypeFilter == nil then
64
+ printConsole(nil, "That is an invalid entity type to filter by.")
65
+ return
66
+ end
67
+ end
68
+ logEntities(includeBackgroundEffects, entityTypeFilter)
69
+ printConsole(nil, "Logged the entities in the room to the \"log.txt\" file.")
70
+ end
71
+ function ____exports.listGridEntities(self, params, includeWalls)
72
+ local gridEntityTypeFilter
73
+ if params ~= "" then
74
+ gridEntityTypeFilter = tonumber(params)
75
+ if gridEntityTypeFilter == nil then
76
+ printConsole(nil, "That is an invalid grid entity type to filter by.")
77
+ return
78
+ end
79
+ end
80
+ logGridEntities(includeWalls, gridEntityTypeFilter)
81
+ printConsole(nil, "Logged the grid entities in the room to the \"log.txt\" file.")
82
+ end
83
+ function ____exports.movePlayer(self, params, direction)
84
+ local amount = DEFAULT_MOVE_UNITS
85
+ if params ~= "" then
86
+ local num = tonumber(params)
87
+ if num == nil then
88
+ printConsole(nil, "That is an invalid amount of units to move.")
89
+ return
90
+ end
91
+ amount = num
92
+ end
93
+ local player = Isaac.GetPlayer()
94
+ local vector = directionToVector(nil, direction)
95
+ local modifiedVector = vector * amount
96
+ player.Position = player.Position + modifiedVector
97
+ end
98
+ function ____exports.spawnTrapdoorOrCrawlspace(self, trapdoor)
99
+ local room = game:GetRoom()
100
+ local player = Isaac.GetPlayer()
101
+ local position = room:FindFreeTilePosition(player.Position, 0)
102
+ local gridIndex = room:GetGridIndex(position)
103
+ local gridEntityType = trapdoor and GridEntityType.GRID_TRAPDOOR or GridEntityType.GRID_STAIRS
104
+ spawnGridWithVariant(nil, gridEntityType, 0, gridIndex)
105
+ end
106
+ function ____exports.warpToRoomType(self, roomType)
107
+ local roomTypeName = ROOM_TYPE_NAMES[roomType]
108
+ if roomTypeName == nil or roomTypeName == DEFAULT_ROOM_TYPE_NAME then
109
+ printConsole(
110
+ nil,
111
+ "Invalid room type: " .. tostring(roomType)
112
+ )
113
+ end
114
+ local gridIndexes = getRoomGridIndexesForType(nil, roomType)
115
+ if #gridIndexes == 0 then
116
+ printConsole(nil, ("There are no " .. roomTypeName) .. "s on this floor.")
117
+ return
118
+ end
119
+ local firstGridIndex = gridIndexes[1]
120
+ changeRoom(nil, firstGridIndex)
121
+ printConsole(
122
+ nil,
123
+ ((("Warped to room type: " .. roomTypeName) .. " (") .. tostring(roomType)) .. ")"
124
+ )
125
+ end
126
+ return ____exports
@@ -12,6 +12,7 @@ local printConsole = ____utils.printConsole
12
12
  local ____exports = require("features.saveDataManager.exports")
13
13
  local saveDataManager = ____exports.saveDataManager
14
14
  local commands = require("features.extraConsoleCommands.commands")
15
+ local commandsDisplay = require("features.extraConsoleCommands.commandsDisplay")
15
16
  local ____v = require("features.extraConsoleCommands.v")
16
17
  local v = ____v.default
17
18
  function featureEnabled(self)
@@ -102,6 +103,8 @@ commandFunctionsMap:set("blackmarket", commands.blackMarket)
102
103
  commandFunctionsMap:set("bloodcharges", commands.bloodCharges)
103
104
  commandFunctionsMap:set("bm", commands.bm)
104
105
  commandFunctionsMap:set("bomb", commands.bomb)
106
+ commandFunctionsMap:set("bombdisplay", commandsDisplay.bombDisplay)
107
+ commandFunctionsMap:set("bombsdisplay", commandsDisplay.bombsDisplay)
105
108
  commandFunctionsMap:set("bombs", commands.bombs)
106
109
  commandFunctionsMap:set("bonehearts", commands.boneHearts)
107
110
  commandFunctionsMap:set("boss", commands.boss)
@@ -126,10 +129,14 @@ commandFunctionsMap:set("dirtybedroom", commands.dirtyBedroom)
126
129
  commandFunctionsMap:set("disablecurses", commands.disableCurses)
127
130
  commandFunctionsMap:set("down", commands.down)
128
131
  commandFunctionsMap:set("dungeon", commands.dungeon)
132
+ commandFunctionsMap:set("effectdisplay", commandsDisplay.effectDisplay)
129
133
  commandFunctionsMap:set("effects", commands.effects)
134
+ commandFunctionsMap:set("effectsdisplay", commandsDisplay.effectsDisplay)
130
135
  commandFunctionsMap:set("eh", commands.eh)
131
136
  commandFunctionsMap:set("error", commands.error)
132
137
  commandFunctionsMap:set("eternalhearts", commands.eternalHearts)
138
+ commandFunctionsMap:set("familiardisplay", commandsDisplay.familiarDisplay)
139
+ commandFunctionsMap:set("familiarsdisplay", commandsDisplay.familiarsDisplay)
133
140
  commandFunctionsMap:set("fool", commands.fool)
134
141
  commandFunctionsMap:set("getposition", commands.getPosition)
135
142
  commandFunctionsMap:set("gigabomb", commands.gigaBomb)
@@ -147,6 +154,11 @@ commandFunctionsMap:set("hitboxes", commands.hitboxes)
147
154
  commandFunctionsMap:set("iamerror", commands.iAmError)
148
155
  commandFunctionsMap:set("key", commands.key)
149
156
  commandFunctionsMap:set("keys", commands.keys)
157
+ commandFunctionsMap:set("knifedisplay", commandsDisplay.knifeDisplay)
158
+ commandFunctionsMap:set("knivesdisplay", commandsDisplay.knivesDisplay)
159
+ commandFunctionsMap:set("laserdisplay", commandsDisplay.laserDisplay)
160
+ commandFunctionsMap:set("lasersdisplay", commandsDisplay.lasersDisplay)
161
+ commandFunctionsMap:set("left", commands.left)
150
162
  commandFunctionsMap:set("library", commands.library)
151
163
  commandFunctionsMap:set("list", commands.list)
152
164
  commandFunctionsMap:set("listall", commands.listAll)
@@ -158,15 +170,24 @@ commandFunctionsMap:set("maxhearts", commands.maxHearts)
158
170
  commandFunctionsMap:set("mh", commands.mh)
159
171
  commandFunctionsMap:set("miniboss", commands.miniboss)
160
172
  commandFunctionsMap:set("nocurses", commands.noCurses)
173
+ commandFunctionsMap:set("npcdisplay", commandsDisplay.npcDisplay)
174
+ commandFunctionsMap:set("npcsdisplay", commandsDisplay.npcsDisplay)
175
+ commandFunctionsMap:set("pickupdisplay", commandsDisplay.pickupDisplay)
176
+ commandFunctionsMap:set("pickupsdisplay", commandsDisplay.pickupsDisplay)
161
177
  commandFunctionsMap:set("pill", commands.pill)
162
178
  commandFunctionsMap:set("pills", commands.pills)
163
179
  commandFunctionsMap:set("planetarium", commands.planetarium)
180
+ commandFunctionsMap:set("playerdisplay", commandsDisplay.playerDisplay)
181
+ commandFunctionsMap:set("playersdisplay", commandsDisplay.playersDisplay)
164
182
  commandFunctionsMap:set("playsound", commands.playSound)
165
183
  commandFunctionsMap:set("pocket", commands.pocket)
166
184
  commandFunctionsMap:set("poopMana", commands.poopMana)
167
185
  commandFunctionsMap:set("position", commands.positionCommand)
186
+ commandFunctionsMap:set("projectiledisplay", commandsDisplay.projectileDisplay)
187
+ commandFunctionsMap:set("projectilesdisplay", commandsDisplay.projectilesDisplay)
168
188
  commandFunctionsMap:set("redhearts", commands.redHearts)
169
189
  commandFunctionsMap:set("rh", commands.rh)
190
+ commandFunctionsMap:set("right", commands.right)
170
191
  commandFunctionsMap:set("room", commands.roomCommand)
171
192
  commandFunctionsMap:set("rottenhearts", commands.rottenHearts)
172
193
  commandFunctionsMap:set("s", commands.s)
@@ -178,6 +199,8 @@ commandFunctionsMap:set("setcharges", commands.setCharges)
178
199
  commandFunctionsMap:set("setposition", commands.setPosition)
179
200
  commandFunctionsMap:set("sh", commands.sh)
180
201
  commandFunctionsMap:set("shop", commands.shop)
202
+ commandFunctionsMap:set("slotdisplay", commandsDisplay.slotDisplay)
203
+ commandFunctionsMap:set("slotsdisplay", commandsDisplay.slotsDisplay)
181
204
  commandFunctionsMap:set("smelt", commands.smelt)
182
205
  commandFunctionsMap:set("soulcharges", commands.soulCharges)
183
206
  commandFunctionsMap:set("soulhearts", commands.soulHearts)
@@ -188,9 +211,12 @@ commandFunctionsMap:set("spawngoldentrinket", commands.spawnGoldenTrinket)
188
211
  commandFunctionsMap:set("speed", commands.speed)
189
212
  commandFunctionsMap:set("supersecret", commands.superSecret)
190
213
  commandFunctionsMap:set("startingroom", commands.startingRoom)
214
+ commandFunctionsMap:set("teardisplay", commandsDisplay.tearDisplay)
191
215
  commandFunctionsMap:set("tears", commands.tears)
216
+ commandFunctionsMap:set("tearsdisplay", commandsDisplay.tearsDisplay)
192
217
  commandFunctionsMap:set("trapdoor", commands.trapdoorCommand)
193
218
  commandFunctionsMap:set("treasure", commands.treasure)
194
219
  commandFunctionsMap:set("ultrasecret", commands.ultraSecret)
220
+ commandFunctionsMap:set("up", commands.up)
195
221
  commandFunctionsMap:set("warp", commands.warp)
196
222
  return ____exports
@@ -103,6 +103,8 @@ export declare function isReflectionRender(): boolean;
103
103
  * of the message (which `Isaac.ConsoleOutput` does not do by default).
104
104
  */
105
105
  export declare function printConsole(msg: string): void;
106
+ /** Helper function to print whether something was enabled or disabled to the in-game console. */
107
+ export declare function printEnabled(enabled: boolean, description: string): void;
106
108
  /**
107
109
  * Helper function to repeat code N times. This is faster to type and cleaner than using a for loop.
108
110
  *
@@ -75,6 +75,10 @@ end
75
75
  function ____exports.printConsole(self, msg)
76
76
  Isaac.ConsoleOutput(msg .. "\n")
77
77
  end
78
+ function ____exports.printEnabled(self, enabled, description)
79
+ local enabledText = enabled and "Enabled" or "Disabled"
80
+ ____exports.printConsole(nil, ((enabledText .. " ") .. description) .. ".")
81
+ end
78
82
  ____exports["repeat"] = function(self, n, func)
79
83
  do
80
84
  local i = 0
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export * from "./enums/PocketItemType";
15
15
  export * from "./enums/SerializationType";
16
16
  export { registerCharacterHealthConversion } from "./features/characterHealthConversion";
17
17
  export { registerCharacterStats } from "./features/characterStats";
18
+ export { setBombDisplay, setEffectDisplay, setFamiliarDisplay, setKnifeDisplay, setLaserDisplay, setNPCDisplay, setPickupDisplay, setPlayerDisplay, setProjectileDisplay, setSlotDisplay, setTearDisplay, } from "./features/debugDisplay";
18
19
  export { deployJSONRoom, deployRandomJSONRoom, emptyRoom, } from "./features/deployJSONRoom";
19
20
  export { disableAllInputs, disableAllInputsExceptFor, disableMovementInputs, disableShootingInputs, enableAllInputs, enableAllInputsExceptFor, } from "./features/disableInputs";
20
21
  export { disableAllSound, enableAllSound } from "./features/disableSound";
package/dist/index.lua CHANGED
@@ -128,6 +128,31 @@ do
128
128
  local registerCharacterStats = ____characterStats.registerCharacterStats
129
129
  ____exports.registerCharacterStats = registerCharacterStats
130
130
  end
131
+ do
132
+ local ____debugDisplay = require("features.debugDisplay")
133
+ local setBombDisplay = ____debugDisplay.setBombDisplay
134
+ local setEffectDisplay = ____debugDisplay.setEffectDisplay
135
+ local setFamiliarDisplay = ____debugDisplay.setFamiliarDisplay
136
+ local setKnifeDisplay = ____debugDisplay.setKnifeDisplay
137
+ local setLaserDisplay = ____debugDisplay.setLaserDisplay
138
+ local setNPCDisplay = ____debugDisplay.setNPCDisplay
139
+ local setPickupDisplay = ____debugDisplay.setPickupDisplay
140
+ local setPlayerDisplay = ____debugDisplay.setPlayerDisplay
141
+ local setProjectileDisplay = ____debugDisplay.setProjectileDisplay
142
+ local setSlotDisplay = ____debugDisplay.setSlotDisplay
143
+ local setTearDisplay = ____debugDisplay.setTearDisplay
144
+ ____exports.setBombDisplay = setBombDisplay
145
+ ____exports.setEffectDisplay = setEffectDisplay
146
+ ____exports.setFamiliarDisplay = setFamiliarDisplay
147
+ ____exports.setKnifeDisplay = setKnifeDisplay
148
+ ____exports.setLaserDisplay = setLaserDisplay
149
+ ____exports.setNPCDisplay = setNPCDisplay
150
+ ____exports.setPickupDisplay = setPickupDisplay
151
+ ____exports.setPlayerDisplay = setPlayerDisplay
152
+ ____exports.setProjectileDisplay = setProjectileDisplay
153
+ ____exports.setSlotDisplay = setSlotDisplay
154
+ ____exports.setTearDisplay = setTearDisplay
155
+ end
131
156
  do
132
157
  local ____deployJSONRoom = require("features.deployJSONRoom")
133
158
  local deployJSONRoom = ____deployJSONRoom.deployJSONRoom
@@ -14,10 +14,14 @@ local ____postCustomRevive = require("callbacks.subscriptions.postCustomRevive")
14
14
  local postCustomReviveRegister = ____postCustomRevive.postCustomReviveRegister
15
15
  local ____postEffectInitLate = require("callbacks.subscriptions.postEffectInitLate")
16
16
  local postEffectInitLateRegister = ____postEffectInitLate.postEffectInitLateRegister
17
+ local ____postEffectStateChanged = require("callbacks.subscriptions.postEffectStateChanged")
18
+ local postEffectStateChangedRegister = ____postEffectStateChanged.postEffectStateChangedRegister
17
19
  local ____postEsauJr = require("callbacks.subscriptions.postEsauJr")
18
20
  local postEsauJrRegister = ____postEsauJr.postEsauJrRegister
19
21
  local ____postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarInitLate")
20
22
  local postFamiliarInitLateRegister = ____postFamiliarInitLate.postFamiliarInitLateRegister
23
+ local ____postFamiliarStateChanged = require("callbacks.subscriptions.postFamiliarStateChanged")
24
+ local postFamiliarStateChangedRegister = ____postFamiliarStateChanged.postFamiliarStateChangedRegister
21
25
  local ____postFirstEsauJr = require("callbacks.subscriptions.postFirstEsauJr")
22
26
  local postFirstEsauJrRegister = ____postFirstEsauJr.postFirstEsauJrRegister
23
27
  local ____postFirstFlip = require("callbacks.subscriptions.postFirstFlip")
@@ -38,6 +42,8 @@ local ____postGridEntityStateChange = require("callbacks.subscriptions.postGridE
38
42
  local postGridEntityStateChangeRegister = ____postGridEntityStateChange.postGridEntityStateChangeRegister
39
43
  local ____postGridEntityUpdate = require("callbacks.subscriptions.postGridEntityUpdate")
40
44
  local postGridEntityUpdateRegister = ____postGridEntityUpdate.postGridEntityUpdateRegister
45
+ local ____postItemDischarged = require("callbacks.subscriptions.postItemDischarged")
46
+ local postItemDischargeRegister = ____postItemDischarged.postItemDischargeRegister
41
47
  local ____postItemPickup = require("callbacks.subscriptions.postItemPickup")
42
48
  local postItemPickupRegister = ____postItemPickup.postItemPickupRegister
43
49
  local ____postKnifeInitLate = require("callbacks.subscriptions.postKnifeInitLate")
@@ -52,12 +58,16 @@ local ____postNewRoomReordered = require("callbacks.subscriptions.postNewRoomReo
52
58
  local postNewRoomReorderedRegister = ____postNewRoomReordered.postNewRoomReorderedRegister
53
59
  local ____postNPCInitLate = require("callbacks.subscriptions.postNPCInitLate")
54
60
  local postNPCInitLateRegister = ____postNPCInitLate.postNPCInitLateRegister
61
+ local ____postNPCStateChanged = require("callbacks.subscriptions.postNPCStateChanged")
62
+ local postNPCStateChangedRegister = ____postNPCStateChanged.postNPCStateChangedRegister
55
63
  local ____postPEffectUpdateReordered = require("callbacks.subscriptions.postPEffectUpdateReordered")
56
64
  local postPEffectUpdateReorderedRegister = ____postPEffectUpdateReordered.postPEffectUpdateReorderedRegister
57
65
  local ____postPickupCollect = require("callbacks.subscriptions.postPickupCollect")
58
66
  local postPickupCollectRegister = ____postPickupCollect.postPickupCollectRegister
59
67
  local ____postPickupInitLate = require("callbacks.subscriptions.postPickupInitLate")
60
68
  local postPickupInitLateRegister = ____postPickupInitLate.postPickupInitLateRegister
69
+ local ____postPickupStateChanged = require("callbacks.subscriptions.postPickupStateChanged")
70
+ local postPickupStateChangedRegister = ____postPickupStateChanged.postPickupStateChangedRegister
61
71
  local ____postPlayerChangeHealth = require("callbacks.subscriptions.postPlayerChangeHealth")
62
72
  local postPlayerChangeHealthRegister = ____postPlayerChangeHealth.postPlayerChangeHealthRegister
63
73
  local ____postPlayerChangeType = require("callbacks.subscriptions.postPlayerChangeType")
@@ -149,11 +159,16 @@ ____exports.CALLBACK_REGISTER_FUNCTIONS = {
149
159
  [ModCallbacksCustom.MC_POST_SACRIFICE] = postSacrificeRegister,
150
160
  [ModCallbacksCustom.MC_POST_CURSED_TELEPORT] = postCursedTeleportRegister,
151
161
  [ModCallbacksCustom.MC_POST_TRINKET_BREAK] = postTrinketBreakRegister,
162
+ [ModCallbacksCustom.MC_POST_ITEM_DISCHARGE] = postItemDischargeRegister,
152
163
  [ModCallbacksCustom.MC_POST_SLOT_INIT] = postSlotInitRegister,
153
164
  [ModCallbacksCustom.MC_POST_SLOT_UPDATE] = postSlotUpdateRegister,
154
165
  [ModCallbacksCustom.MC_POST_SLOT_RENDER] = postSlotRenderRegister,
155
166
  [ModCallbacksCustom.MC_POST_SLOT_ANIMATION_CHANGED] = postSlotAnimationChangedRegister,
156
167
  [ModCallbacksCustom.MC_POST_SLOT_DESTROYED] = postSlotDestroyedRegister,
168
+ [ModCallbacksCustom.MC_POST_FAMILIAR_STATE_CHANGED] = postFamiliarStateChangedRegister,
169
+ [ModCallbacksCustom.MC_POST_PICKUP_STATE_CHANGED] = postPickupStateChangedRegister,
170
+ [ModCallbacksCustom.MC_POST_EFFECT_STATE_CHANGED] = postEffectStateChangedRegister,
171
+ [ModCallbacksCustom.MC_POST_NPC_STATE_CHANGED] = postNPCStateChangedRegister,
157
172
  [ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT] = postGridEntityInitRegister,
158
173
  [ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE] = postGridEntityUpdateRegister,
159
174
  [ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE] = postGridEntityRemoveRegister,
@@ -6,8 +6,10 @@ import { PostCursedTeleportCallbackType } from "../callbacks/subscriptions/postC
6
6
  import { PostCustomDoorEnterCallbackType } from "../callbacks/subscriptions/postCustomDoorEnter";
7
7
  import { PostCustomReviveCallbackType } from "../callbacks/subscriptions/postCustomRevive";
8
8
  import { PostEffectInitLateCallbackType } from "../callbacks/subscriptions/postEffectInitLate";
9
+ import { PostEffectStateChangedCallbackType } from "../callbacks/subscriptions/postEffectStateChanged";
9
10
  import { PostEsauJrCallbackType } from "../callbacks/subscriptions/postEsauJr";
10
11
  import { PostFamiliarInitLateCallbackType } from "../callbacks/subscriptions/postFamiliarInitLate";
12
+ import { PostFamiliarStateChangedCallbackType } from "../callbacks/subscriptions/postFamiliarStateChanged";
11
13
  import { PostFirstEsauJrCallbackType } from "../callbacks/subscriptions/postFirstEsauJr";
12
14
  import { PostFirstFlipCallbackType } from "../callbacks/subscriptions/postFirstFlip";
13
15
  import { PostFlipCallbackType } from "../callbacks/subscriptions/postFlip";
@@ -18,6 +20,7 @@ import { PostGridEntityInitCallbackType } from "../callbacks/subscriptions/postG
18
20
  import { PostGridEntityRemoveCallbackType } from "../callbacks/subscriptions/postGridEntityRemove";
19
21
  import { PostGridEntityStateChangeCallbackType } from "../callbacks/subscriptions/postGridEntityStateChange";
20
22
  import { PostGridEntityUpdateCallbackType } from "../callbacks/subscriptions/postGridEntityUpdate";
23
+ import { PostItemDischargedCallbackType } from "../callbacks/subscriptions/postItemDischarged";
21
24
  import { PostItemPickupCallbackType } from "../callbacks/subscriptions/postItemPickup";
22
25
  import { PostKnifeInitLateCallbackType } from "../callbacks/subscriptions/postKnifeInitLate";
23
26
  import { PostLaserInitLateCallbackType } from "../callbacks/subscriptions/postLaserInitLate";
@@ -25,9 +28,11 @@ import { PostNewLevelReorderedCallbackType } from "../callbacks/subscriptions/po
25
28
  import { PostNewRoomEarlyCallbackType } from "../callbacks/subscriptions/postNewRoomEarly";
26
29
  import { PostNewRoomReorderedCallbackType } from "../callbacks/subscriptions/postNewRoomReordered";
27
30
  import { PostNPCInitLateCallbackType } from "../callbacks/subscriptions/postNPCInitLate";
31
+ import { PostNPCStateChangedCallbackType } from "../callbacks/subscriptions/postNPCStateChanged";
28
32
  import { PostPEffectUpdateReorderedCallbackType } from "../callbacks/subscriptions/postPEffectUpdateReordered";
29
33
  import { PostPickupCollectCallbackType } from "../callbacks/subscriptions/postPickupCollect";
30
34
  import { PostPickupInitLateCallbackType } from "../callbacks/subscriptions/postPickupInitLate";
35
+ import { PostPickupStateChangedCallbackType } from "../callbacks/subscriptions/postPickupStateChanged";
31
36
  import { PostPlayerChangeHealthCallbackType } from "../callbacks/subscriptions/postPlayerChangeHealth";
32
37
  import { PostPlayerChangeTypeCallbackType } from "../callbacks/subscriptions/postPlayerChangeType";
33
38
  import { PostPlayerFatalDamageCallbackType } from "../callbacks/subscriptions/postPlayerFatalDamage";
@@ -194,6 +199,10 @@ export interface AddCallbackParametersCustom {
194
199
  callback: PostTrinketBreakCallbackType,
195
200
  trinketType?: TrinketType | int
196
201
  ];
202
+ [ModCallbacksCustom.MC_POST_ITEM_DISCHARGE]: [
203
+ callback: PostItemDischargedCallbackType,
204
+ collectibleType?: CollectibleType | int
205
+ ];
197
206
  [ModCallbacksCustom.MC_POST_SLOT_INIT]: [
198
207
  callback: PostSlotInitCallbackType,
199
208
  slotVariant?: SlotVariant
@@ -214,6 +223,23 @@ export interface AddCallbackParametersCustom {
214
223
  callback: PostSlotDestroyedCallbackType,
215
224
  slotVariant?: SlotVariant
216
225
  ];
226
+ [ModCallbacksCustom.MC_POST_FAMILIAR_STATE_CHANGED]: [
227
+ callback: PostFamiliarStateChangedCallbackType,
228
+ familiarVariant?: FamiliarVariant
229
+ ];
230
+ [ModCallbacksCustom.MC_POST_PICKUP_STATE_CHANGED]: [
231
+ callback: PostPickupStateChangedCallbackType,
232
+ pickupVariant?: PickupVariant
233
+ ];
234
+ [ModCallbacksCustom.MC_POST_EFFECT_STATE_CHANGED]: [
235
+ callback: PostEffectStateChangedCallbackType,
236
+ effectVariant?: EffectVariant
237
+ ];
238
+ [ModCallbacksCustom.MC_POST_NPC_STATE_CHANGED]: [
239
+ callback: PostNPCStateChangedCallbackType,
240
+ entityType?: EntityType | int,
241
+ variant?: int
242
+ ];
217
243
  [ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT]: [
218
244
  callback: PostGridEntityInitCallbackType,
219
245
  gridEntityType?: GridEntityType
@@ -1,7 +1,7 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__New = ____lualib.__TS__New
3
3
  local ____exports = {}
4
- local initCustomCallbacks, initFeatures
4
+ local initCustomCallbacks, initFeaturesMajor, initFeaturesMinor
5
5
  local ____customRevive = require("callbacks.customRevive")
6
6
  local customReviveCallbacksInit = ____customRevive.customReviveCallbacksInit
7
7
  local ____itemPickup = require("callbacks.itemPickup")
@@ -18,16 +18,22 @@ local ____postCustomDoorEnter = require("callbacks.postCustomDoorEnter")
18
18
  local postCustomDoorEnterCallbackInit = ____postCustomDoorEnter.postCustomDoorEnterCallbackInit
19
19
  local ____postEffectInitLate = require("callbacks.postEffectInitLate")
20
20
  local postEffectInitLateCallbackInit = ____postEffectInitLate.postEffectInitLateCallbackInit
21
+ local ____postEffectStateChanged = require("callbacks.postEffectStateChanged")
22
+ local postEffectStateChangedCallbackInit = ____postEffectStateChanged.postEffectStateChangedCallbackInit
21
23
  local ____postEsauJr = require("callbacks.postEsauJr")
22
24
  local postEsauJrCallbacksInit = ____postEsauJr.postEsauJrCallbacksInit
23
25
  local ____postFamiliarInitLate = require("callbacks.postFamiliarInitLate")
24
26
  local postFamiliarInitLateCallbackInit = ____postFamiliarInitLate.postFamiliarInitLateCallbackInit
27
+ local ____postFamiliarStateChanged = require("callbacks.postFamiliarStateChanged")
28
+ local postFamiliarStateChangedCallbackInit = ____postFamiliarStateChanged.postFamiliarStateChangedCallbackInit
25
29
  local ____postFlip = require("callbacks.postFlip")
26
30
  local postFlipCallbacksInit = ____postFlip.postFlipCallbacksInit
27
31
  local ____postGridEntity = require("callbacks.postGridEntity")
28
32
  local postGridEntityCallbacksInit = ____postGridEntity.postGridEntityCallbacksInit
29
33
  local ____postGridEntityCollision = require("callbacks.postGridEntityCollision")
30
34
  local postGridEntityCollisionInit = ____postGridEntityCollision.postGridEntityCollisionInit
35
+ local ____postItemDischarged = require("callbacks.postItemDischarged")
36
+ local postItemDischargeCallbackInit = ____postItemDischarged.postItemDischargeCallbackInit
31
37
  local ____postKnifeInitLate = require("callbacks.postKnifeInitLate")
32
38
  local postKnifeInitLateCallbackInit = ____postKnifeInitLate.postKnifeInitLateCallbackInit
33
39
  local ____postLaserInitLate = require("callbacks.postLaserInitLate")
@@ -36,10 +42,14 @@ local ____postNewRoomEarly = require("callbacks.postNewRoomEarly")
36
42
  local postNewRoomEarlyCallbackInit = ____postNewRoomEarly.postNewRoomEarlyCallbackInit
37
43
  local ____postNPCInitLate = require("callbacks.postNPCInitLate")
38
44
  local postNPCInitLateCallbackInit = ____postNPCInitLate.postNPCInitLateCallbackInit
45
+ local ____postNPCStateChanged = require("callbacks.postNPCStateChanged")
46
+ local postNPCStateChangedCallbackInit = ____postNPCStateChanged.postNPCStateChangedCallbackInit
39
47
  local ____postPickupCollect = require("callbacks.postPickupCollect")
40
48
  local postPickupCollectCallbackInit = ____postPickupCollect.postPickupCollectCallbackInit
41
49
  local ____postPickupInitLate = require("callbacks.postPickupInitLate")
42
50
  local postPickupInitLateCallbackInit = ____postPickupInitLate.postPickupInitLateCallbackInit
51
+ local ____postPickupStateChanged = require("callbacks.postPickupStateChanged")
52
+ local postPickupStateChangedCallbackInit = ____postPickupStateChanged.postPickupStateChangedCallbackInit
43
53
  local ____postPlayerChangeHealth = require("callbacks.postPlayerChangeHealth")
44
54
  local postPlayerChangeHealthCallbackInit = ____postPlayerChangeHealth.postPlayerChangeHealthCallbackInit
45
55
  local ____postPlayerChangeType = require("callbacks.postPlayerChangeType")
@@ -82,6 +92,8 @@ local ____characterHealthConversion = require("features.characterHealthConversio
82
92
  local characterHealthConversionInit = ____characterHealthConversion.characterHealthConversionInit
83
93
  local ____characterStats = require("features.characterStats")
84
94
  local characterStatsInit = ____characterStats.characterStatsInit
95
+ local ____debugDisplay = require("features.debugDisplay")
96
+ local debugDisplayInit = ____debugDisplay.debugDisplayInit
85
97
  local ____deployJSONRoom = require("features.deployJSONRoom")
86
98
  local deployJSONRoomInit = ____deployJSONRoom.deployJSONRoomInit
87
99
  local ____disableInputs = require("features.disableInputs")
@@ -145,30 +157,38 @@ function initCustomCallbacks(self, mod)
145
157
  postPurchaseCallbackInit(nil, mod)
146
158
  postSacrificeCallbackInit(nil, mod)
147
159
  postTrinketBreakCallbackInit(nil, mod)
160
+ postItemDischargeCallbackInit(nil, mod)
148
161
  postCursedTeleportCallbackInit(nil, mod)
149
162
  postSlotInitUpdateCallbacksInit(nil, mod)
150
163
  postSlotRenderCallbacksInit(nil, mod)
164
+ postFamiliarStateChangedCallbackInit(nil, mod)
165
+ postPickupStateChangedCallbackInit(nil, mod)
166
+ postEffectStateChangedCallbackInit(nil, mod)
167
+ postNPCStateChangedCallbackInit(nil, mod)
151
168
  postGridEntityCallbacksInit(nil, mod)
152
169
  postGridEntityCollisionInit(nil, mod)
153
170
  postBoneSwingCallbackInit(nil, mod)
154
171
  postCustomDoorEnterCallbackInit(nil)
155
172
  end
156
- function initFeatures(self, mod)
173
+ function initFeaturesMajor(self, mod)
157
174
  deployJSONRoomInit(nil, mod)
175
+ runInNFramesInit(nil, mod)
176
+ characterStatsInit(nil, mod)
177
+ characterHealthConversionInit(nil, mod)
178
+ end
179
+ function initFeaturesMinor(self, mod)
158
180
  disableInputsInit(nil, mod)
159
181
  disableSoundsInit(nil, mod)
182
+ fadeInRemoverInit(nil, mod)
183
+ fastResetInit(nil, mod)
184
+ debugDisplayInit(nil, mod)
160
185
  forgottenSwitchInit(nil, mod)
161
186
  getCollectibleItemPoolTypeInit(nil, mod)
162
- preventCollectibleRotateInit(nil, mod)
163
- runInNFramesInit(nil, mod)
164
- sirenHelpersInit(nil, mod)
165
187
  isPonyActiveInit(nil, mod)
166
188
  playerInventoryInit(nil, mod)
189
+ preventCollectibleRotateInit(nil, mod)
190
+ sirenHelpersInit(nil, mod)
167
191
  taintedLazarusPlayersInit(nil, mod)
168
- fastResetInit(nil, mod)
169
- fadeInRemoverInit(nil, mod)
170
- characterStatsInit(nil, mod)
171
- characterHealthConversionInit(nil, mod)
172
192
  end
173
193
  function ____exports.upgradeMod(self, modVanilla)
174
194
  patchErrorFunction(nil)
@@ -178,7 +198,8 @@ function ____exports.upgradeMod(self, modVanilla)
178
198
  postNewRoomEarlyCallbackInit(nil, mod)
179
199
  saveDataManagerInit(nil, mod)
180
200
  initCustomCallbacks(nil, mod)
181
- initFeatures(nil, mod)
201
+ initFeaturesMajor(nil, mod)
202
+ initFeaturesMinor(nil, mod)
182
203
  end
183
204
  return mod
184
205
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.287",
3
+ "version": "1.2.290",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",