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.
- package/dist/callbacks/postEffectStateChanged.d.ts +1 -0
- package/dist/callbacks/postEffectStateChanged.lua +35 -0
- package/dist/callbacks/postFamiliarStateChanged.d.ts +1 -0
- package/dist/callbacks/postFamiliarStateChanged.lua +35 -0
- package/dist/callbacks/postItemDischarged.d.ts +2 -0
- package/dist/callbacks/postItemDischarged.lua +83 -0
- package/dist/callbacks/postNPCStateChanged.d.ts +1 -0
- package/dist/callbacks/postNPCStateChanged.lua +35 -0
- package/dist/callbacks/postPickupStateChanged.d.ts +1 -0
- package/dist/callbacks/postPickupStateChanged.lua +35 -0
- package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postEffectStateChanged.lua +23 -0
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.lua +23 -0
- package/dist/callbacks/subscriptions/postItemDischarged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postItemDischarged.lua +23 -0
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postNPCStateChanged.lua +27 -0
- package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postPickupStateChanged.lua +23 -0
- package/dist/enums/ModCallbacksCustom.d.ts +18 -13
- package/dist/enums/ModCallbacksCustom.lua +23 -13
- package/dist/features/debugDisplay.d.ts +80 -0
- package/dist/features/debugDisplay.lua +230 -0
- package/dist/features/extraConsoleCommands/commands.d.ts +6 -0
- package/dist/features/extraConsoleCommands/commands.lua +18 -118
- package/dist/features/extraConsoleCommands/commandsDisplay.d.ts +99 -0
- package/dist/features/extraConsoleCommands/commandsDisplay.lua +81 -0
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts +9 -0
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +126 -0
- package/dist/features/extraConsoleCommands/init.lua +26 -0
- package/dist/functions/utils.d.ts +2 -0
- package/dist/functions/utils.lua +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.lua +25 -0
- package/dist/objects/callbackRegisterFunctions.lua +15 -0
- package/dist/types/AddCallbackParametersCustom.d.ts +26 -0
- package/dist/upgradeMod.lua +31 -10
- package/package.json +1 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local defaultDisplayCallback, postFamiliarRender, postNPCRender, postPlayerRender, postPickupRender, postTearRender, postProjectileRender, postLaserRender, postKnifeRender, postEffectRender, postBombRender, postSlotRender, renderTextOnEntity, textCallbacks, v
|
|
4
|
+
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
5
|
+
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
6
|
+
local ____entity = require("functions.entity")
|
|
7
|
+
local getEntityID = ____entity.getEntityID
|
|
8
|
+
local ____utils = require("functions.utils")
|
|
9
|
+
local isReflectionRender = ____utils.isReflectionRender
|
|
10
|
+
local printEnabled = ____utils.printEnabled
|
|
11
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
12
|
+
local saveDataManager = ____exports.saveDataManager
|
|
13
|
+
function defaultDisplayCallback(self, entity)
|
|
14
|
+
return getEntityID(nil, entity)
|
|
15
|
+
end
|
|
16
|
+
function postFamiliarRender(self, familiar)
|
|
17
|
+
if not v.run.familiar then
|
|
18
|
+
return
|
|
19
|
+
end
|
|
20
|
+
local text = textCallbacks:familiar(familiar)
|
|
21
|
+
renderTextOnEntity(nil, familiar, text)
|
|
22
|
+
end
|
|
23
|
+
function postNPCRender(self, npc)
|
|
24
|
+
if not v.run.npc then
|
|
25
|
+
return
|
|
26
|
+
end
|
|
27
|
+
local text = textCallbacks:npc(npc)
|
|
28
|
+
renderTextOnEntity(nil, npc, text)
|
|
29
|
+
end
|
|
30
|
+
function postPlayerRender(self, player)
|
|
31
|
+
if not v.run.player then
|
|
32
|
+
return
|
|
33
|
+
end
|
|
34
|
+
local text = textCallbacks:player(player)
|
|
35
|
+
renderTextOnEntity(nil, player, text)
|
|
36
|
+
end
|
|
37
|
+
function postPickupRender(self, pickup)
|
|
38
|
+
if not v.run.pickup then
|
|
39
|
+
return
|
|
40
|
+
end
|
|
41
|
+
local text = textCallbacks:pickup(pickup)
|
|
42
|
+
renderTextOnEntity(nil, pickup, text)
|
|
43
|
+
end
|
|
44
|
+
function postTearRender(self, tear)
|
|
45
|
+
if not v.run.tear then
|
|
46
|
+
return
|
|
47
|
+
end
|
|
48
|
+
local text = textCallbacks:tear(tear)
|
|
49
|
+
renderTextOnEntity(nil, tear, text)
|
|
50
|
+
end
|
|
51
|
+
function postProjectileRender(self, projectile)
|
|
52
|
+
if not v.run.projectile then
|
|
53
|
+
return
|
|
54
|
+
end
|
|
55
|
+
local text = textCallbacks:projectile(projectile)
|
|
56
|
+
renderTextOnEntity(nil, projectile, text)
|
|
57
|
+
end
|
|
58
|
+
function postLaserRender(self, laser)
|
|
59
|
+
if not v.run.laser then
|
|
60
|
+
return
|
|
61
|
+
end
|
|
62
|
+
local text = textCallbacks:laser(laser)
|
|
63
|
+
renderTextOnEntity(nil, laser, text)
|
|
64
|
+
end
|
|
65
|
+
function postKnifeRender(self, knife)
|
|
66
|
+
if not v.run.knife then
|
|
67
|
+
return
|
|
68
|
+
end
|
|
69
|
+
local text = textCallbacks:knife(knife)
|
|
70
|
+
renderTextOnEntity(nil, knife, text)
|
|
71
|
+
end
|
|
72
|
+
function postEffectRender(self, effect)
|
|
73
|
+
if not v.run.effect then
|
|
74
|
+
return
|
|
75
|
+
end
|
|
76
|
+
local text = textCallbacks:effect(effect)
|
|
77
|
+
renderTextOnEntity(nil, effect, text)
|
|
78
|
+
end
|
|
79
|
+
function postBombRender(self, bomb)
|
|
80
|
+
if not v.run.bomb then
|
|
81
|
+
return
|
|
82
|
+
end
|
|
83
|
+
local text = textCallbacks:bomb(bomb)
|
|
84
|
+
renderTextOnEntity(nil, bomb, text)
|
|
85
|
+
end
|
|
86
|
+
function postSlotRender(self, slot)
|
|
87
|
+
if not v.run.slot then
|
|
88
|
+
return
|
|
89
|
+
end
|
|
90
|
+
local text = textCallbacks:slot(slot)
|
|
91
|
+
renderTextOnEntity(nil, slot, text)
|
|
92
|
+
end
|
|
93
|
+
function renderTextOnEntity(self, entity, text)
|
|
94
|
+
if isReflectionRender(nil) then
|
|
95
|
+
return
|
|
96
|
+
end
|
|
97
|
+
local position = Isaac.WorldToScreen(entity.Position)
|
|
98
|
+
Isaac.RenderText(
|
|
99
|
+
text,
|
|
100
|
+
position.X,
|
|
101
|
+
position.Y,
|
|
102
|
+
1,
|
|
103
|
+
1,
|
|
104
|
+
1,
|
|
105
|
+
1
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
textCallbacks = {
|
|
109
|
+
player = defaultDisplayCallback,
|
|
110
|
+
tear = defaultDisplayCallback,
|
|
111
|
+
familiar = defaultDisplayCallback,
|
|
112
|
+
bomb = defaultDisplayCallback,
|
|
113
|
+
pickup = defaultDisplayCallback,
|
|
114
|
+
slot = defaultDisplayCallback,
|
|
115
|
+
laser = defaultDisplayCallback,
|
|
116
|
+
knife = defaultDisplayCallback,
|
|
117
|
+
projectile = defaultDisplayCallback,
|
|
118
|
+
effect = defaultDisplayCallback,
|
|
119
|
+
npc = defaultDisplayCallback
|
|
120
|
+
}
|
|
121
|
+
v = {run = {
|
|
122
|
+
player = false,
|
|
123
|
+
tear = false,
|
|
124
|
+
familiar = false,
|
|
125
|
+
bomb = false,
|
|
126
|
+
pickup = false,
|
|
127
|
+
slot = false,
|
|
128
|
+
laser = false,
|
|
129
|
+
knife = false,
|
|
130
|
+
projectile = false,
|
|
131
|
+
effect = false,
|
|
132
|
+
npc = false
|
|
133
|
+
}}
|
|
134
|
+
function ____exports.debugDisplayInit(self, mod)
|
|
135
|
+
saveDataManager(
|
|
136
|
+
nil,
|
|
137
|
+
"debugDisplay",
|
|
138
|
+
v,
|
|
139
|
+
function() return false end
|
|
140
|
+
)
|
|
141
|
+
mod:AddCallback(ModCallbacks.MC_POST_FAMILIAR_RENDER, postFamiliarRender)
|
|
142
|
+
mod:AddCallback(ModCallbacks.MC_POST_NPC_RENDER, postNPCRender)
|
|
143
|
+
mod:AddCallback(ModCallbacks.MC_POST_PLAYER_RENDER, postPlayerRender)
|
|
144
|
+
mod:AddCallback(ModCallbacks.MC_POST_PICKUP_RENDER, postPickupRender)
|
|
145
|
+
mod:AddCallback(ModCallbacks.MC_POST_TEAR_RENDER, postTearRender)
|
|
146
|
+
mod:AddCallback(ModCallbacks.MC_POST_PROJECTILE_RENDER, postProjectileRender)
|
|
147
|
+
mod:AddCallback(ModCallbacks.MC_POST_LASER_RENDER, postLaserRender)
|
|
148
|
+
mod:AddCallback(ModCallbacks.MC_POST_KNIFE_RENDER, postKnifeRender)
|
|
149
|
+
mod:AddCallback(ModCallbacks.MC_POST_EFFECT_RENDER, postEffectRender)
|
|
150
|
+
mod:AddCallback(ModCallbacks.MC_POST_BOMB_RENDER, postBombRender)
|
|
151
|
+
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_SLOT_RENDER, postSlotRender)
|
|
152
|
+
end
|
|
153
|
+
function ____exports.togglePlayerDisplay(self)
|
|
154
|
+
v.run.player = not v.run.player
|
|
155
|
+
printEnabled(nil, v.run.player, "player display")
|
|
156
|
+
end
|
|
157
|
+
function ____exports.toggleTearDisplay(self)
|
|
158
|
+
v.run.tear = not v.run.tear
|
|
159
|
+
printEnabled(nil, v.run.tear, "tear display")
|
|
160
|
+
end
|
|
161
|
+
function ____exports.toggleFamiliarDisplay(self)
|
|
162
|
+
v.run.familiar = not v.run.familiar
|
|
163
|
+
printEnabled(nil, v.run.familiar, "familiar display")
|
|
164
|
+
end
|
|
165
|
+
function ____exports.toggleBombDisplay(self)
|
|
166
|
+
v.run.bomb = not v.run.bomb
|
|
167
|
+
printEnabled(nil, v.run.bomb, "bomb display")
|
|
168
|
+
end
|
|
169
|
+
function ____exports.togglePickupDisplay(self)
|
|
170
|
+
v.run.pickup = not v.run.pickup
|
|
171
|
+
printEnabled(nil, v.run.pickup, "pickup display")
|
|
172
|
+
end
|
|
173
|
+
function ____exports.toggleSlotDisplay(self)
|
|
174
|
+
v.run.slot = not v.run.slot
|
|
175
|
+
printEnabled(nil, v.run.slot, "slot display")
|
|
176
|
+
end
|
|
177
|
+
function ____exports.toggleLaserDisplay(self)
|
|
178
|
+
v.run.laser = not v.run.laser
|
|
179
|
+
printEnabled(nil, v.run.laser, "laser display")
|
|
180
|
+
end
|
|
181
|
+
function ____exports.toggleKnifeDisplay(self)
|
|
182
|
+
v.run.knife = not v.run.knife
|
|
183
|
+
printEnabled(nil, v.run.knife, "knife display")
|
|
184
|
+
end
|
|
185
|
+
function ____exports.toggleProjectileDisplay(self)
|
|
186
|
+
v.run.projectile = not v.run.projectile
|
|
187
|
+
printEnabled(nil, v.run.projectile, "projectile display")
|
|
188
|
+
end
|
|
189
|
+
function ____exports.toggleEffectDisplay(self)
|
|
190
|
+
v.run.effect = not v.run.effect
|
|
191
|
+
printEnabled(nil, v.run.effect, "effect display")
|
|
192
|
+
end
|
|
193
|
+
function ____exports.toggleNPCDisplay(self)
|
|
194
|
+
v.run.npc = not v.run.npc
|
|
195
|
+
printEnabled(nil, v.run.npc, "NPC display")
|
|
196
|
+
end
|
|
197
|
+
function ____exports.setPlayerDisplay(self, textCallback)
|
|
198
|
+
textCallbacks.player = textCallback
|
|
199
|
+
end
|
|
200
|
+
function ____exports.setTearDisplay(self, textCallback)
|
|
201
|
+
textCallbacks.tear = textCallback
|
|
202
|
+
end
|
|
203
|
+
function ____exports.setFamiliarDisplay(self, textCallback)
|
|
204
|
+
textCallbacks.familiar = textCallback
|
|
205
|
+
end
|
|
206
|
+
function ____exports.setBombDisplay(self, textCallback)
|
|
207
|
+
textCallbacks.bomb = textCallback
|
|
208
|
+
end
|
|
209
|
+
function ____exports.setPickupDisplay(self, textCallback)
|
|
210
|
+
textCallbacks.pickup = textCallback
|
|
211
|
+
end
|
|
212
|
+
function ____exports.setSlotDisplay(self, textCallback)
|
|
213
|
+
textCallbacks.slot = textCallback
|
|
214
|
+
end
|
|
215
|
+
function ____exports.setLaserDisplay(self, textCallback)
|
|
216
|
+
textCallbacks.laser = textCallback
|
|
217
|
+
end
|
|
218
|
+
function ____exports.setKnifeDisplay(self, textCallback)
|
|
219
|
+
textCallbacks.knife = textCallback
|
|
220
|
+
end
|
|
221
|
+
function ____exports.setProjectileDisplay(self, textCallback)
|
|
222
|
+
textCallbacks.projectile = textCallback
|
|
223
|
+
end
|
|
224
|
+
function ____exports.setEffectDisplay(self, textCallback)
|
|
225
|
+
textCallbacks.effect = textCallback
|
|
226
|
+
end
|
|
227
|
+
function ____exports.setNPCDisplay(self, textCallback)
|
|
228
|
+
textCallbacks.npc = textCallback
|
|
229
|
+
end
|
|
230
|
+
return ____exports
|
|
@@ -173,6 +173,8 @@ export declare function key(params: string): void;
|
|
|
173
173
|
* to remove keys.)
|
|
174
174
|
*/
|
|
175
175
|
export declare function keys(params: string): void;
|
|
176
|
+
/** Moves the player 0.5 units left. Provide a number to move a custom amount of units. */
|
|
177
|
+
export declare function left(params: string): void;
|
|
176
178
|
/** Warps to the first Library on the floor. */
|
|
177
179
|
export declare function library(): void;
|
|
178
180
|
/**
|
|
@@ -244,6 +246,8 @@ export declare function positionCommand(): void;
|
|
|
244
246
|
export declare function redHearts(params: string): void;
|
|
245
247
|
/** Alias for the "redhearts" command. */
|
|
246
248
|
export declare function rh(params: string): void;
|
|
249
|
+
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
250
|
+
export declare function right(params: string): void;
|
|
247
251
|
/** Logs information about the room to the "log.txt" file. */
|
|
248
252
|
export declare function roomCommand(): void;
|
|
249
253
|
/**
|
|
@@ -325,6 +329,8 @@ export declare function trapdoorCommand(): void;
|
|
|
325
329
|
export declare function treasure(): void;
|
|
326
330
|
/** Warps to the first Ultra Secret Room on the floor. */
|
|
327
331
|
export declare function ultraSecret(): void;
|
|
332
|
+
/** Moves the player 0.5 units up. Provide a number to move a custom amount of units. */
|
|
333
|
+
export declare function up(params: string): void;
|
|
328
334
|
/**
|
|
329
335
|
* Warps to the specified room type. Accepts either the room type number or the partial name of the
|
|
330
336
|
* room type.
|
|
@@ -3,7 +3,6 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__StringSplit = ____lualib.__TS__StringSplit
|
|
4
4
|
local __TS__StringSlice = ____lualib.__TS__StringSlice
|
|
5
5
|
local ____exports = {}
|
|
6
|
-
local addHeart, devilAngel, listEntities, listGridEntities, movePlayer, printEnabled, spawnTrapdoorOrCrawlspace, warpToRoomType, DEFAULT_MOVE_UNITS
|
|
7
6
|
local ____cachedClasses = require("cachedClasses")
|
|
8
7
|
local game = ____cachedClasses.game
|
|
9
8
|
local sfxManager = ____cachedClasses.sfxManager
|
|
@@ -18,12 +17,8 @@ local ____character = require("functions.character")
|
|
|
18
17
|
local getCharacterName = ____character.getCharacterName
|
|
19
18
|
local ____entitySpecific = require("functions.entitySpecific")
|
|
20
19
|
local getNPCs = ____entitySpecific.getNPCs
|
|
21
|
-
local ____gridEntity = require("functions.gridEntity")
|
|
22
|
-
local spawnGridWithVariant = ____gridEntity.spawnGridWithVariant
|
|
23
20
|
local ____log = require("functions.log")
|
|
24
21
|
local logEffects = ____log.logEffects
|
|
25
|
-
local logEntities = ____log.logEntities
|
|
26
|
-
local logGridEntities = ____log.logGridEntities
|
|
27
22
|
local logRoom = ____log.logRoom
|
|
28
23
|
local logSeedEffects = ____log.logSeedEffects
|
|
29
24
|
local logSounds = ____log.logSounds
|
|
@@ -38,13 +33,8 @@ local getPillEffectName = ____pills.getPillEffectName
|
|
|
38
33
|
local ____player = require("functions.player")
|
|
39
34
|
local getPlayerName = ____player.getPlayerName
|
|
40
35
|
local useActiveItemTemp = ____player.useActiveItemTemp
|
|
41
|
-
local ____playerHealth = require("functions.playerHealth")
|
|
42
|
-
local addPlayerHealthType = ____playerHealth.addPlayerHealthType
|
|
43
36
|
local ____playerIndex = require("functions.playerIndex")
|
|
44
37
|
local getPlayers = ____playerIndex.getPlayers
|
|
45
|
-
local ____roomData = require("functions.roomData")
|
|
46
|
-
local getRoomData = ____roomData.getRoomData
|
|
47
|
-
local getRoomDescriptor = ____roomData.getRoomDescriptor
|
|
48
38
|
local ____roomGrid = require("functions.roomGrid")
|
|
49
39
|
local gridCoordinatesToWorldPosition = ____roomGrid.gridCoordinatesToWorldPosition
|
|
50
40
|
local ____rooms = require("functions.rooms")
|
|
@@ -54,8 +44,7 @@ local ____run = require("functions.run")
|
|
|
54
44
|
local restart = ____run.restart
|
|
55
45
|
local ____utils = require("functions.utils")
|
|
56
46
|
local printConsole = ____utils.printConsole
|
|
57
|
-
local
|
|
58
|
-
local directionToVector = ____vector.directionToVector
|
|
47
|
+
local printEnabled = ____utils.printEnabled
|
|
59
48
|
local ____cardMap = require("maps.cardMap")
|
|
60
49
|
local CARD_MAP = ____cardMap.CARD_MAP
|
|
61
50
|
local ____characterMap = require("maps.characterMap")
|
|
@@ -64,9 +53,14 @@ local ____pillEffectMap = require("maps.pillEffectMap")
|
|
|
64
53
|
local PILL_EFFECT_MAP = ____pillEffectMap.PILL_EFFECT_MAP
|
|
65
54
|
local ____roomTypeMap = require("maps.roomTypeMap")
|
|
66
55
|
local ROOM_TYPE_MAP = ____roomTypeMap.ROOM_TYPE_MAP
|
|
67
|
-
local
|
|
68
|
-
local
|
|
69
|
-
local
|
|
56
|
+
local ____commandsSubroutines = require("features.extraConsoleCommands.commandsSubroutines")
|
|
57
|
+
local addHeart = ____commandsSubroutines.addHeart
|
|
58
|
+
local devilAngel = ____commandsSubroutines.devilAngel
|
|
59
|
+
local listEntities = ____commandsSubroutines.listEntities
|
|
60
|
+
local listGridEntities = ____commandsSubroutines.listGridEntities
|
|
61
|
+
local movePlayer = ____commandsSubroutines.movePlayer
|
|
62
|
+
local spawnTrapdoorOrCrawlspace = ____commandsSubroutines.spawnTrapdoorOrCrawlspace
|
|
63
|
+
local warpToRoomType = ____commandsSubroutines.warpToRoomType
|
|
70
64
|
local ____v = require("features.extraConsoleCommands.v")
|
|
71
65
|
local v = ____v.default
|
|
72
66
|
function ____exports.blackHearts(self, params)
|
|
@@ -115,109 +109,6 @@ function ____exports.startingRoom(self)
|
|
|
115
109
|
local startingRoomIndex = level:GetStartingRoomIndex()
|
|
116
110
|
changeRoom(nil, startingRoomIndex)
|
|
117
111
|
end
|
|
118
|
-
function addHeart(self, params, healthType)
|
|
119
|
-
local numHearts = healthType == HealthType.MAX_HEARTS and 2 or 1
|
|
120
|
-
if params ~= "" then
|
|
121
|
-
local num = tonumber(params)
|
|
122
|
-
if num == nil then
|
|
123
|
-
printConsole(nil, "That is an invalid amount of hearts to add.")
|
|
124
|
-
return
|
|
125
|
-
end
|
|
126
|
-
numHearts = num
|
|
127
|
-
end
|
|
128
|
-
local player = Isaac.GetPlayer()
|
|
129
|
-
addPlayerHealthType(nil, player, healthType, numHearts)
|
|
130
|
-
end
|
|
131
|
-
function devilAngel(self, useDevil)
|
|
132
|
-
local level = game:GetLevel()
|
|
133
|
-
local devilAngelRoomData = getRoomData(nil, GridRooms.ROOM_DEVIL_IDX)
|
|
134
|
-
if devilAngelRoomData ~= nil then
|
|
135
|
-
local roomType = devilAngelRoomData.Type
|
|
136
|
-
local conflictingType = useDevil and RoomType.ROOM_ANGEL or RoomType.ROOM_DEVIL
|
|
137
|
-
if roomType == conflictingType then
|
|
138
|
-
local roomDescriptor = getRoomDescriptor(nil, GridRooms.ROOM_DEVIL_IDX)
|
|
139
|
-
roomDescriptor.Data = nil
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
if useDevil then
|
|
143
|
-
level:InitializeDevilAngelRoom(false, true)
|
|
144
|
-
else
|
|
145
|
-
level:InitializeDevilAngelRoom(true, false)
|
|
146
|
-
end
|
|
147
|
-
changeRoom(nil, GridRooms.ROOM_DEVIL_IDX)
|
|
148
|
-
end
|
|
149
|
-
function listEntities(self, params, includeBackgroundEffects)
|
|
150
|
-
local entityTypeFilter
|
|
151
|
-
if params ~= "" then
|
|
152
|
-
entityTypeFilter = tonumber(params)
|
|
153
|
-
if entityTypeFilter == nil then
|
|
154
|
-
printConsole(nil, "That is an invalid entity type to filter by.")
|
|
155
|
-
return
|
|
156
|
-
end
|
|
157
|
-
end
|
|
158
|
-
logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
159
|
-
printConsole(nil, "Logged the entities in the room to the \"log.txt\" file.")
|
|
160
|
-
end
|
|
161
|
-
function listGridEntities(self, params, includeWalls)
|
|
162
|
-
local gridEntityTypeFilter
|
|
163
|
-
if params ~= "" then
|
|
164
|
-
gridEntityTypeFilter = tonumber(params)
|
|
165
|
-
if gridEntityTypeFilter == nil then
|
|
166
|
-
printConsole(nil, "That is an invalid grid entity type to filter by.")
|
|
167
|
-
return
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
logGridEntities(includeWalls, gridEntityTypeFilter)
|
|
171
|
-
printConsole(nil, "Logged the grid entities in the room to the \"log.txt\" file.")
|
|
172
|
-
end
|
|
173
|
-
function movePlayer(self, params, direction)
|
|
174
|
-
local amount = DEFAULT_MOVE_UNITS
|
|
175
|
-
if params ~= "" then
|
|
176
|
-
local num = tonumber(params)
|
|
177
|
-
if num == nil then
|
|
178
|
-
printConsole(nil, "That is an invalid amount of units to move.")
|
|
179
|
-
return
|
|
180
|
-
end
|
|
181
|
-
amount = num
|
|
182
|
-
end
|
|
183
|
-
local player = Isaac.GetPlayer()
|
|
184
|
-
local vector = directionToVector(nil, direction)
|
|
185
|
-
local modifiedVector = vector * amount
|
|
186
|
-
player.Position = player.Position + modifiedVector
|
|
187
|
-
end
|
|
188
|
-
function printEnabled(self, enabled, description)
|
|
189
|
-
local enabledText = enabled and "Enabled" or "Disabled"
|
|
190
|
-
printConsole(nil, ((enabledText .. " ") .. description) .. ".")
|
|
191
|
-
end
|
|
192
|
-
function spawnTrapdoorOrCrawlspace(self, trapdoor)
|
|
193
|
-
local room = game:GetRoom()
|
|
194
|
-
local player = Isaac.GetPlayer()
|
|
195
|
-
local position = room:FindFreeTilePosition(player.Position, 0)
|
|
196
|
-
local gridIndex = room:GetGridIndex(position)
|
|
197
|
-
local gridEntityType = trapdoor and GridEntityType.GRID_TRAPDOOR or GridEntityType.GRID_STAIRS
|
|
198
|
-
spawnGridWithVariant(nil, gridEntityType, 0, gridIndex)
|
|
199
|
-
end
|
|
200
|
-
function warpToRoomType(self, roomType)
|
|
201
|
-
local roomTypeName = ROOM_TYPE_NAMES[roomType]
|
|
202
|
-
if roomTypeName == nil or roomTypeName == DEFAULT_ROOM_TYPE_NAME then
|
|
203
|
-
printConsole(
|
|
204
|
-
nil,
|
|
205
|
-
"Invalid room type: " .. tostring(roomType)
|
|
206
|
-
)
|
|
207
|
-
end
|
|
208
|
-
local gridIndexes = getRoomGridIndexesForType(nil, roomType)
|
|
209
|
-
if #gridIndexes == 0 then
|
|
210
|
-
printConsole(nil, ("There are no " .. roomTypeName) .. "s on this floor.")
|
|
211
|
-
return
|
|
212
|
-
end
|
|
213
|
-
local firstGridIndex = gridIndexes[1]
|
|
214
|
-
changeRoom(nil, firstGridIndex)
|
|
215
|
-
printConsole(
|
|
216
|
-
nil,
|
|
217
|
-
((("Warped to room type: " .. roomTypeName) .. " (") .. tostring(roomType)) .. ")"
|
|
218
|
-
)
|
|
219
|
-
end
|
|
220
|
-
DEFAULT_MOVE_UNITS = 0.5
|
|
221
112
|
function ____exports.addCharges(self, params)
|
|
222
113
|
if params == "" then
|
|
223
114
|
printConsole(nil, "You must specify a slot number. (Use 0 for the primary slot, 1 for the Schoolbag slot, 2 for the pocket item slot, and 3 for the Dice Bag slot.)")
|
|
@@ -568,6 +459,9 @@ function ____exports.keys(self, params)
|
|
|
568
459
|
local player = Isaac.GetPlayer()
|
|
569
460
|
player:AddKeys(numKeys)
|
|
570
461
|
end
|
|
462
|
+
function ____exports.left(self, params)
|
|
463
|
+
movePlayer(nil, params, Direction.LEFT)
|
|
464
|
+
end
|
|
571
465
|
function ____exports.library(self)
|
|
572
466
|
warpToRoomType(nil, RoomType.ROOM_LIBRARY)
|
|
573
467
|
end
|
|
@@ -704,6 +598,9 @@ end
|
|
|
704
598
|
function ____exports.rh(self, params)
|
|
705
599
|
____exports.redHearts(nil, params)
|
|
706
600
|
end
|
|
601
|
+
function ____exports.right(self, params)
|
|
602
|
+
movePlayer(nil, params, Direction.RIGHT)
|
|
603
|
+
end
|
|
707
604
|
function ____exports.roomCommand(self)
|
|
708
605
|
logRoom()
|
|
709
606
|
end
|
|
@@ -908,6 +805,9 @@ end
|
|
|
908
805
|
function ____exports.ultraSecret(self)
|
|
909
806
|
warpToRoomType(nil, RoomType.ROOM_ULTRASECRET)
|
|
910
807
|
end
|
|
808
|
+
function ____exports.up(self, params)
|
|
809
|
+
movePlayer(nil, params, Direction.UP)
|
|
810
|
+
end
|
|
911
811
|
function ____exports.warp(self, params)
|
|
912
812
|
if params == "" then
|
|
913
813
|
printConsole(nil, "You must specify a room type name or number.")
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toggles custom text to appear next to every bomb. Useful for debugging.
|
|
3
|
+
*
|
|
4
|
+
* By default, the entity ID will be displayed. Use the `setBombDisplay` helper function to assign
|
|
5
|
+
* the text that you want to appear.
|
|
6
|
+
*/
|
|
7
|
+
export declare function bombDisplay(): void;
|
|
8
|
+
/** Alias for the "bombdisplay" command. */
|
|
9
|
+
export declare function bombsDisplay(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Toggles custom text to appear next to every effect. Useful for debugging.
|
|
12
|
+
*
|
|
13
|
+
* By default, the entity ID will be displayed. Use the `setEffectDisplay` helper function to assign
|
|
14
|
+
* the text that you want to appear.
|
|
15
|
+
*/
|
|
16
|
+
export declare function effectDisplay(): void;
|
|
17
|
+
/** Alias for the "effectdisplay" function. */
|
|
18
|
+
export declare function effectsDisplay(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Toggles custom text to appear next to every familiar. Useful for debugging.
|
|
21
|
+
*
|
|
22
|
+
* By default, the entity ID will be displayed. Use the `setFamiliarDisplay` helper function to
|
|
23
|
+
* assign the text that you want to appear.
|
|
24
|
+
*/
|
|
25
|
+
export declare function familiarDisplay(): void;
|
|
26
|
+
/** Alias for the "familiardisplay" command. */
|
|
27
|
+
export declare function familiarsDisplay(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Toggles custom text to appear next to every knife. Useful for debugging.
|
|
30
|
+
*
|
|
31
|
+
* By default, the entity ID will be displayed. Use the `setKnifeDisplay` helper function to assign
|
|
32
|
+
* the text that you want to appear.
|
|
33
|
+
*/
|
|
34
|
+
export declare function knifeDisplay(): void;
|
|
35
|
+
/** Alias for the "knifedisplay" command. */
|
|
36
|
+
export declare function knivesDisplay(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Toggles custom text to appear next to every laser. Useful for debugging.
|
|
39
|
+
*
|
|
40
|
+
* By default, the entity ID will be displayed. Use the `setLaserDisplay` helper function to assign
|
|
41
|
+
* the text that you want to appear.
|
|
42
|
+
*/
|
|
43
|
+
export declare function laserDisplay(): void;
|
|
44
|
+
/** Alias for the "laserdisplay" command. */
|
|
45
|
+
export declare function lasersDisplay(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Toggles custom text to appear next to every NPC. Useful for debugging.
|
|
48
|
+
*
|
|
49
|
+
* By default, the entity ID will be displayed. Use the `setNPCDisplay` helper function to assign
|
|
50
|
+
* the text that you want to appear.
|
|
51
|
+
*/
|
|
52
|
+
export declare function npcDisplay(): void;
|
|
53
|
+
/** Alias for the "npcdisplay" command. */
|
|
54
|
+
export declare function npcsDisplay(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Toggles custom text to appear next to every pickup. Useful for debugging.
|
|
57
|
+
*
|
|
58
|
+
* By default, the entity ID will be displayed. Use the `setPickupDisplay` helper function to assign
|
|
59
|
+
* the text that you want to appear.
|
|
60
|
+
*/
|
|
61
|
+
export declare function pickupDisplay(): void;
|
|
62
|
+
/** Alias for the "pickupdisplay" command. */
|
|
63
|
+
export declare function pickupsDisplay(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Toggles custom text to appear next to every player. Useful for debugging.
|
|
66
|
+
*
|
|
67
|
+
* By default, the entity ID will be displayed. Use the `setPlayerDisplay` helper function to assign
|
|
68
|
+
* the text that you want to appear.
|
|
69
|
+
*/
|
|
70
|
+
export declare function playerDisplay(): void;
|
|
71
|
+
/** Alias for the "playerdisplay" command. */
|
|
72
|
+
export declare function playersDisplay(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Toggles custom text to appear next to every projectile. Useful for debugging.
|
|
75
|
+
*
|
|
76
|
+
* By default, the entity ID will be displayed. Use the `setProjectileDisplay` helper function to
|
|
77
|
+
* assign the text that you want to appear.
|
|
78
|
+
*/
|
|
79
|
+
export declare function projectileDisplay(): void;
|
|
80
|
+
/** Alias for the "projectiledisplay" command. */
|
|
81
|
+
export declare function projectilesDisplay(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Toggles custom text to appear next to every slot. Useful for debugging.
|
|
84
|
+
*
|
|
85
|
+
* By default, the entity ID will be displayed. Use the `setSlotDisplay` helper function to assign
|
|
86
|
+
* the text that you want to appear.
|
|
87
|
+
*/
|
|
88
|
+
export declare function slotDisplay(): void;
|
|
89
|
+
/** Alias for the "slotdisplay" command. */
|
|
90
|
+
export declare function slotsDisplay(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Toggles custom text to appear next to every tear. Useful for debugging.
|
|
93
|
+
*
|
|
94
|
+
* By default, the entity ID will be displayed. Use the `setTearDisplay` helper function to assign
|
|
95
|
+
* the text that you want to appear.
|
|
96
|
+
*/
|
|
97
|
+
export declare function tearDisplay(): void;
|
|
98
|
+
/** Alias for the "teardisplay" command. */
|
|
99
|
+
export declare function tearsDisplay(): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local ____debugDisplay = require("features.debugDisplay")
|
|
4
|
+
local toggleBombDisplay = ____debugDisplay.toggleBombDisplay
|
|
5
|
+
local toggleEffectDisplay = ____debugDisplay.toggleEffectDisplay
|
|
6
|
+
local toggleFamiliarDisplay = ____debugDisplay.toggleFamiliarDisplay
|
|
7
|
+
local toggleKnifeDisplay = ____debugDisplay.toggleKnifeDisplay
|
|
8
|
+
local toggleLaserDisplay = ____debugDisplay.toggleLaserDisplay
|
|
9
|
+
local toggleNPCDisplay = ____debugDisplay.toggleNPCDisplay
|
|
10
|
+
local togglePickupDisplay = ____debugDisplay.togglePickupDisplay
|
|
11
|
+
local togglePlayerDisplay = ____debugDisplay.togglePlayerDisplay
|
|
12
|
+
local toggleProjectileDisplay = ____debugDisplay.toggleProjectileDisplay
|
|
13
|
+
local toggleSlotDisplay = ____debugDisplay.toggleSlotDisplay
|
|
14
|
+
local toggleTearDisplay = ____debugDisplay.toggleTearDisplay
|
|
15
|
+
function ____exports.bombDisplay(self)
|
|
16
|
+
toggleBombDisplay(nil)
|
|
17
|
+
end
|
|
18
|
+
function ____exports.bombsDisplay(self)
|
|
19
|
+
____exports.bombDisplay(nil)
|
|
20
|
+
end
|
|
21
|
+
function ____exports.effectDisplay(self)
|
|
22
|
+
toggleEffectDisplay(nil)
|
|
23
|
+
end
|
|
24
|
+
function ____exports.effectsDisplay(self)
|
|
25
|
+
____exports.effectDisplay(nil)
|
|
26
|
+
end
|
|
27
|
+
function ____exports.familiarDisplay(self)
|
|
28
|
+
toggleFamiliarDisplay(nil)
|
|
29
|
+
end
|
|
30
|
+
function ____exports.familiarsDisplay(self)
|
|
31
|
+
____exports.familiarDisplay(nil)
|
|
32
|
+
end
|
|
33
|
+
function ____exports.knifeDisplay(self)
|
|
34
|
+
toggleKnifeDisplay(nil)
|
|
35
|
+
end
|
|
36
|
+
function ____exports.knivesDisplay(self)
|
|
37
|
+
____exports.knifeDisplay(nil)
|
|
38
|
+
end
|
|
39
|
+
function ____exports.laserDisplay(self)
|
|
40
|
+
toggleLaserDisplay(nil)
|
|
41
|
+
end
|
|
42
|
+
function ____exports.lasersDisplay(self)
|
|
43
|
+
____exports.laserDisplay(nil)
|
|
44
|
+
end
|
|
45
|
+
function ____exports.npcDisplay(self)
|
|
46
|
+
toggleNPCDisplay(nil)
|
|
47
|
+
end
|
|
48
|
+
function ____exports.npcsDisplay(self)
|
|
49
|
+
____exports.npcDisplay(nil)
|
|
50
|
+
end
|
|
51
|
+
function ____exports.pickupDisplay(self)
|
|
52
|
+
togglePickupDisplay(nil)
|
|
53
|
+
end
|
|
54
|
+
function ____exports.pickupsDisplay(self)
|
|
55
|
+
____exports.pickupDisplay(nil)
|
|
56
|
+
end
|
|
57
|
+
function ____exports.playerDisplay(self)
|
|
58
|
+
togglePlayerDisplay(nil)
|
|
59
|
+
end
|
|
60
|
+
function ____exports.playersDisplay(self)
|
|
61
|
+
____exports.playerDisplay(nil)
|
|
62
|
+
end
|
|
63
|
+
function ____exports.projectileDisplay(self)
|
|
64
|
+
toggleProjectileDisplay(nil)
|
|
65
|
+
end
|
|
66
|
+
function ____exports.projectilesDisplay(self)
|
|
67
|
+
____exports.projectileDisplay(nil)
|
|
68
|
+
end
|
|
69
|
+
function ____exports.slotDisplay(self)
|
|
70
|
+
toggleSlotDisplay(nil)
|
|
71
|
+
end
|
|
72
|
+
function ____exports.slotsDisplay(self)
|
|
73
|
+
____exports.slotDisplay(nil)
|
|
74
|
+
end
|
|
75
|
+
function ____exports.tearDisplay(self)
|
|
76
|
+
toggleTearDisplay(nil)
|
|
77
|
+
end
|
|
78
|
+
function ____exports.tearsDisplay(self)
|
|
79
|
+
____exports.tearDisplay(nil)
|
|
80
|
+
end
|
|
81
|
+
return ____exports
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { HealthType } from "../../enums/HealthType";
|
|
3
|
+
export declare function addHeart(params: string, healthType: HealthType): void;
|
|
4
|
+
export declare function devilAngel(useDevil: boolean): void;
|
|
5
|
+
export declare function listEntities(params: string, includeBackgroundEffects: boolean): void;
|
|
6
|
+
export declare function listGridEntities(params: string, includeWalls: boolean): void;
|
|
7
|
+
export declare function movePlayer(params: string, direction: Direction): void;
|
|
8
|
+
export declare function spawnTrapdoorOrCrawlspace(trapdoor: boolean): void;
|
|
9
|
+
export declare function warpToRoomType(roomType: RoomType): void;
|