isaacscript-common 1.2.136 → 1.2.139
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/postCustomDoorEnter.d.ts +8 -0
- package/dist/callbacks/postCustomDoorEnter.lua +35 -0
- package/dist/callbacks/postPlayerChangeHealth.lua +4 -64
- package/dist/callbacks/subscriptions/postCustomDoorEnter.d.ts +2 -0
- package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +25 -0
- package/dist/constants.d.ts +7 -0
- package/dist/constants.lua +1 -0
- package/dist/features/deployJSONRoom.lua +11 -22
- package/dist/features/disableInputs.lua +6 -20
- package/dist/features/disableSound.lua +4 -12
- package/dist/features/extraConsoleCommands/commands.d.ts +334 -0
- package/dist/features/extraConsoleCommands/commands.lua +930 -0
- package/dist/features/extraConsoleCommands/init.d.ts +25 -0
- package/dist/features/extraConsoleCommands/init.lua +194 -0
- package/dist/features/extraConsoleCommands/v.d.ts +13 -0
- package/dist/features/extraConsoleCommands/v.lua +11 -0
- package/dist/features/forgottenSwitch.lua +3 -8
- package/dist/features/getCollectibleItemPoolType.lua +4 -9
- package/dist/features/isPonyActive.lua +3 -8
- package/dist/features/preventCollectibleRotate.lua +3 -8
- package/dist/features/runInNFrames.lua +6 -20
- package/dist/features/saveDataManager/constants.d.ts +3 -0
- package/dist/features/saveDataManager/constants.lua +5 -0
- package/dist/features/saveDataManager/exports.lua +9 -18
- package/dist/features/saveDataManager/load.lua +4 -3
- package/dist/features/saveDataManager/main.lua +4 -10
- package/dist/features/saveDataManager/merge.lua +2 -2
- package/dist/features/saveDataManager/save.lua +3 -1
- package/dist/features/sirenHelpers.lua +4 -8
- package/dist/featuresInitialized.d.ts +1 -1
- package/dist/featuresInitialized.lua +5 -0
- package/dist/functions/deepCopy.lua +2 -2
- package/dist/functions/log.d.ts +5 -1
- package/dist/functions/log.lua +175 -2
- package/dist/functions/map.d.ts +16 -0
- package/dist/functions/map.lua +24 -0
- package/dist/functions/player.d.ts +2 -2
- package/dist/functions/playerHealth.d.ts +3 -0
- package/dist/functions/playerHealth.lua +142 -0
- package/dist/functions/rooms.lua +4 -5
- package/dist/functions/run.d.ts +12 -0
- package/dist/functions/run.lua +25 -0
- package/dist/functions/utils.d.ts +0 -6
- package/dist/functions/utils.lua +0 -8
- package/dist/functions/vector.lua +8 -8
- package/dist/index.d.ts +8 -0
- package/dist/index.lua +62 -0
- package/dist/maps/cardMap.d.ts +3 -0
- package/dist/maps/cardMap.lua +202 -0
- package/dist/maps/characterMap.d.ts +3 -0
- package/dist/maps/characterMap.lua +90 -0
- package/dist/maps/pillEffectMap.d.ts +3 -0
- package/dist/maps/pillEffectMap.lua +88 -0
- package/dist/maps/roomTypeMap.d.ts +3 -0
- package/dist/maps/roomTypeMap.lua +43 -0
- package/dist/maps/roomTypeNameMap.d.ts +2 -0
- package/dist/maps/roomTypeNameMap.lua +38 -0
- package/dist/types/CallbackParametersCustom.d.ts +4 -0
- package/dist/types/HealthType.d.ts +4 -2
- package/dist/types/HealthType.lua +3 -1
- package/dist/types/ModCallbacksCustom.d.ts +2 -1
- package/dist/types/ModCallbacksCustom.lua +2 -0
- package/dist/types/ModUpgraded.lua +8 -0
- package/dist/types/PlayerIndex.d.ts +2 -2
- package/dist/upgradeMod.lua +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____lualib = require("lualib_bundle")
|
|
3
|
+
local Map = ____lualib.Map
|
|
4
|
+
local __TS__StringSplit = ____lualib.__TS__StringSplit
|
|
5
|
+
local __TS__StringSlice = ____lualib.__TS__StringSlice
|
|
6
|
+
local ____exports = {}
|
|
7
|
+
local addHeart, devilAngel, listEntities, listGridEntities, movePlayer, printEnabled, spawnTrapdoorOrCrawlspace, warpToRoomType, DEFAULT_MOVE_UNITS
|
|
8
|
+
local ____cachedClasses = require("cachedClasses")
|
|
9
|
+
local game = ____cachedClasses.game
|
|
10
|
+
local sfxManager = ____cachedClasses.sfxManager
|
|
11
|
+
local ____constants = require("constants")
|
|
12
|
+
local PILL_GIANT_FLAG = ____constants.PILL_GIANT_FLAG
|
|
13
|
+
local TRINKET_GOLDEN_FLAG = ____constants.TRINKET_GOLDEN_FLAG
|
|
14
|
+
local ____gridEntity = require("functions.gridEntity")
|
|
15
|
+
local spawnGridEntityWithVariant = ____gridEntity.spawnGridEntityWithVariant
|
|
16
|
+
local ____log = require("functions.log")
|
|
17
|
+
local logAllSeedEffects = ____log.logAllSeedEffects
|
|
18
|
+
local logEntities = ____log.logEntities
|
|
19
|
+
local logGridEntities = ____log.logGridEntities
|
|
20
|
+
local logRoom = ____log.logRoom
|
|
21
|
+
local logSounds = ____log.logSounds
|
|
22
|
+
local logTemporaryEffects = ____log.logTemporaryEffects
|
|
23
|
+
local ____map = require("functions.map")
|
|
24
|
+
local getMapPartialMatch = ____map.getMapPartialMatch
|
|
25
|
+
local ____npc = require("functions.npc")
|
|
26
|
+
local getNPCs = ____npc.getNPCs
|
|
27
|
+
local ____player = require("functions.player")
|
|
28
|
+
local getPlayers = ____player.getPlayers
|
|
29
|
+
local useActiveItemTemp = ____player.useActiveItemTemp
|
|
30
|
+
local ____playerHealth = require("functions.playerHealth")
|
|
31
|
+
local addPlayerHealthType = ____playerHealth.addPlayerHealthType
|
|
32
|
+
local ____rooms = require("functions.rooms")
|
|
33
|
+
local changeRoom = ____rooms.changeRoom
|
|
34
|
+
local getRoomData = ____rooms.getRoomData
|
|
35
|
+
local getRoomGridIndexesForType = ____rooms.getRoomGridIndexesForType
|
|
36
|
+
local gridToPos = ____rooms.gridToPos
|
|
37
|
+
local ____run = require("functions.run")
|
|
38
|
+
local restart = ____run.restart
|
|
39
|
+
local ____utils = require("functions.utils")
|
|
40
|
+
local printConsole = ____utils.printConsole
|
|
41
|
+
local ____vector = require("functions.vector")
|
|
42
|
+
local directionToVector = ____vector.directionToVector
|
|
43
|
+
local ____cardMap = require("maps.cardMap")
|
|
44
|
+
local CARD_MAP = ____cardMap.CARD_MAP
|
|
45
|
+
local ____characterMap = require("maps.characterMap")
|
|
46
|
+
local CHARACTER_MAP = ____characterMap.CHARACTER_MAP
|
|
47
|
+
local ____pillEffectMap = require("maps.pillEffectMap")
|
|
48
|
+
local PILL_EFFECT_MAP = ____pillEffectMap.PILL_EFFECT_MAP
|
|
49
|
+
local ____roomTypeMap = require("maps.roomTypeMap")
|
|
50
|
+
local ROOM_TYPE_MAP = ____roomTypeMap.ROOM_TYPE_MAP
|
|
51
|
+
local ____roomTypeNameMap = require("maps.roomTypeNameMap")
|
|
52
|
+
local ROOM_TYPE_NAME_MAP = ____roomTypeNameMap.ROOM_TYPE_NAME_MAP
|
|
53
|
+
local ____HealthType = require("types.HealthType")
|
|
54
|
+
local HealthType = ____HealthType.HealthType
|
|
55
|
+
local ____v = require("features.extraConsoleCommands.v")
|
|
56
|
+
local v = ____v.default
|
|
57
|
+
function ____exports.blackHearts(self, params)
|
|
58
|
+
addHeart(nil, params, HealthType.BLACK)
|
|
59
|
+
end
|
|
60
|
+
function ____exports.chaosCardTears(self)
|
|
61
|
+
v.run.chaosCardTears = not v.run.chaosCardTears
|
|
62
|
+
printEnabled(nil, v.run.chaosCardTears, "Chaos Card tears")
|
|
63
|
+
end
|
|
64
|
+
function ____exports.devil(self)
|
|
65
|
+
devilAngel(nil, true)
|
|
66
|
+
end
|
|
67
|
+
function ____exports.eternalHearts(self, params)
|
|
68
|
+
addHeart(nil, params, HealthType.ETERNAL)
|
|
69
|
+
end
|
|
70
|
+
function ____exports.goldenBomb(self)
|
|
71
|
+
local player = Isaac.GetPlayer()
|
|
72
|
+
player:AddGoldenBomb()
|
|
73
|
+
end
|
|
74
|
+
function ____exports.hearts(self, params)
|
|
75
|
+
addHeart(nil, params, HealthType.RED)
|
|
76
|
+
end
|
|
77
|
+
function ____exports.IAMERROR(self)
|
|
78
|
+
changeRoom(nil, GridRooms.ROOM_ERROR_IDX)
|
|
79
|
+
end
|
|
80
|
+
function ____exports.soulHearts(self, params)
|
|
81
|
+
addHeart(nil, params, HealthType.SOUL)
|
|
82
|
+
end
|
|
83
|
+
function ____exports.sound(self, params)
|
|
84
|
+
local soundEffect = tonumber(params)
|
|
85
|
+
if soundEffect == nil then
|
|
86
|
+
printConsole(nil, "That is an invalid sound effect ID.")
|
|
87
|
+
return
|
|
88
|
+
end
|
|
89
|
+
sfxManager:Play(soundEffect)
|
|
90
|
+
end
|
|
91
|
+
function ____exports.startingRoom(self)
|
|
92
|
+
local level = game:GetLevel()
|
|
93
|
+
local startingRoomIndex = level:GetStartingRoomIndex()
|
|
94
|
+
changeRoom(nil, startingRoomIndex)
|
|
95
|
+
end
|
|
96
|
+
function addHeart(self, params, healthType)
|
|
97
|
+
local numHearts = healthType == HealthType.MAX_HEARTS and 2 or 1
|
|
98
|
+
if params ~= "" then
|
|
99
|
+
local num = tonumber(params)
|
|
100
|
+
if num == nil then
|
|
101
|
+
printConsole(nil, "That is an invalid amount of hearts to add.")
|
|
102
|
+
return
|
|
103
|
+
end
|
|
104
|
+
numHearts = num
|
|
105
|
+
end
|
|
106
|
+
local player = Isaac.GetPlayer()
|
|
107
|
+
addPlayerHealthType(nil, player, healthType, numHearts)
|
|
108
|
+
end
|
|
109
|
+
function devilAngel(self, useDevil)
|
|
110
|
+
local level = game:GetLevel()
|
|
111
|
+
local devilAngelRoomData = getRoomData(nil, GridRooms.ROOM_DEVIL_IDX)
|
|
112
|
+
if devilAngelRoomData ~= nil then
|
|
113
|
+
local roomType = devilAngelRoomData.Type
|
|
114
|
+
local conflictingType = useDevil and RoomType.ROOM_ANGEL or RoomType.ROOM_DEVIL
|
|
115
|
+
if roomType == conflictingType then
|
|
116
|
+
local roomDesc = level:GetRoomByIdx(GridRooms.ROOM_DEVIL_IDX)
|
|
117
|
+
roomDesc.Data = nil
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
if useDevil then
|
|
121
|
+
level:InitializeDevilAngelRoom(false, true)
|
|
122
|
+
else
|
|
123
|
+
level:InitializeDevilAngelRoom(true, false)
|
|
124
|
+
end
|
|
125
|
+
changeRoom(nil, GridRooms.ROOM_DEVIL_IDX)
|
|
126
|
+
end
|
|
127
|
+
function listEntities(self, params, includeBackgroundEffects)
|
|
128
|
+
local entityTypeFilter
|
|
129
|
+
if params ~= "" then
|
|
130
|
+
entityTypeFilter = tonumber(params)
|
|
131
|
+
if entityTypeFilter == nil then
|
|
132
|
+
printConsole(nil, "That is an invalid entity type to filter by.")
|
|
133
|
+
return
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
137
|
+
printConsole(nil, "Logged the entities in the room to the \"log.txt\" file.")
|
|
138
|
+
end
|
|
139
|
+
function listGridEntities(self, params, includeWalls)
|
|
140
|
+
local gridEntityTypeFilter
|
|
141
|
+
if params ~= "" then
|
|
142
|
+
gridEntityTypeFilter = tonumber(params)
|
|
143
|
+
if gridEntityTypeFilter == nil then
|
|
144
|
+
printConsole(nil, "That is an invalid grid entity type to filter by.")
|
|
145
|
+
return
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
logGridEntities(includeWalls, gridEntityTypeFilter)
|
|
149
|
+
printConsole(nil, "Logged the grid entities in the room to the \"log.txt\" file.")
|
|
150
|
+
end
|
|
151
|
+
function movePlayer(self, params, direction)
|
|
152
|
+
local amount = DEFAULT_MOVE_UNITS
|
|
153
|
+
if params ~= "" then
|
|
154
|
+
local num = tonumber(params)
|
|
155
|
+
if num == nil then
|
|
156
|
+
printConsole(nil, "That is an invalid amount of units to move.")
|
|
157
|
+
return
|
|
158
|
+
end
|
|
159
|
+
amount = num
|
|
160
|
+
end
|
|
161
|
+
local player = Isaac.GetPlayer()
|
|
162
|
+
local vector = directionToVector(nil, direction)
|
|
163
|
+
local modifiedVector = vector * amount
|
|
164
|
+
player.Position = player.Position + modifiedVector
|
|
165
|
+
end
|
|
166
|
+
function printEnabled(self, enabled, description)
|
|
167
|
+
local enabledText = enabled and "Enabled" or "Disabled"
|
|
168
|
+
printConsole(nil, ((enabledText .. " ") .. description) .. ".")
|
|
169
|
+
end
|
|
170
|
+
function spawnTrapdoorOrCrawlspace(self, trapdoor)
|
|
171
|
+
local room = game:GetRoom()
|
|
172
|
+
local player = Isaac.GetPlayer()
|
|
173
|
+
local position = room:FindFreeTilePosition(player.Position, 0)
|
|
174
|
+
local gridIndex = room:GetGridIndex(position)
|
|
175
|
+
local gridEntityType = trapdoor and GridEntityType.GRID_TRAPDOOR or GridEntityType.GRID_STAIRS
|
|
176
|
+
spawnGridEntityWithVariant(nil, gridEntityType, 0, gridIndex)
|
|
177
|
+
end
|
|
178
|
+
function warpToRoomType(self, roomType)
|
|
179
|
+
local roomTypeName = ROOM_TYPE_NAME_MAP:get(roomType)
|
|
180
|
+
if roomTypeName == nil then
|
|
181
|
+
printConsole(
|
|
182
|
+
nil,
|
|
183
|
+
"Invalid room type: " .. tostring(roomType)
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
local gridIndexes = getRoomGridIndexesForType(nil, roomType)
|
|
187
|
+
if #gridIndexes == 0 then
|
|
188
|
+
printConsole(
|
|
189
|
+
nil,
|
|
190
|
+
("There are no " .. tostring(roomTypeName)) .. "s on this floor."
|
|
191
|
+
)
|
|
192
|
+
return
|
|
193
|
+
end
|
|
194
|
+
local firstGridIndex = gridIndexes[1]
|
|
195
|
+
changeRoom(nil, firstGridIndex)
|
|
196
|
+
printConsole(
|
|
197
|
+
nil,
|
|
198
|
+
((("Warped to room type: " .. tostring(roomTypeName)) .. " (") .. tostring(roomType)) .. ")"
|
|
199
|
+
)
|
|
200
|
+
end
|
|
201
|
+
DEFAULT_MOVE_UNITS = 0.5
|
|
202
|
+
function ____exports.addCharges(self, params)
|
|
203
|
+
if params == "" then
|
|
204
|
+
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.)")
|
|
205
|
+
return
|
|
206
|
+
end
|
|
207
|
+
local args = __TS__StringSplit(params, " ")
|
|
208
|
+
if #args ~= 1 and #args ~= 2 then
|
|
209
|
+
printConsole(nil, "That is an invalid amount of arguments.")
|
|
210
|
+
return
|
|
211
|
+
end
|
|
212
|
+
local activeSlotString, chargeString = table.unpack(args)
|
|
213
|
+
local activeSlot = tonumber(activeSlotString)
|
|
214
|
+
if activeSlot == nil then
|
|
215
|
+
printConsole(nil, "The provided slot number is invalid: " .. activeSlotString)
|
|
216
|
+
return
|
|
217
|
+
end
|
|
218
|
+
if activeSlot < ActiveSlot.SLOT_PRIMARY or activeSlot > ActiveSlot.SLOT_POCKET2 then
|
|
219
|
+
printConsole(
|
|
220
|
+
nil,
|
|
221
|
+
"The provided slot number is invalid: " .. tostring(activeSlot)
|
|
222
|
+
)
|
|
223
|
+
return
|
|
224
|
+
end
|
|
225
|
+
local chargeNum = 1
|
|
226
|
+
if chargeString ~= nil then
|
|
227
|
+
local chargeNumAttempt = tonumber(chargeString)
|
|
228
|
+
if chargeNumAttempt == nil then
|
|
229
|
+
printConsole(nil, "The provided charge amount is invalid: " .. chargeString)
|
|
230
|
+
return
|
|
231
|
+
end
|
|
232
|
+
chargeNum = chargeNumAttempt
|
|
233
|
+
end
|
|
234
|
+
local player = Isaac.GetPlayer()
|
|
235
|
+
local currentCharge = player:GetActiveCharge(activeSlot)
|
|
236
|
+
local newCharge = currentCharge + chargeNum
|
|
237
|
+
player:SetActiveCharge(newCharge, activeSlot)
|
|
238
|
+
end
|
|
239
|
+
function ____exports.angel(self)
|
|
240
|
+
devilAngel(nil, false)
|
|
241
|
+
end
|
|
242
|
+
function ____exports.ascent(self)
|
|
243
|
+
game:SetStateFlag(GameStateFlag.STATE_BACKWARDS_PATH_INIT, true)
|
|
244
|
+
game:SetStateFlag(GameStateFlag.STATE_BACKWARDS_PATH, true)
|
|
245
|
+
printConsole(nil, "Set Ascent flags.")
|
|
246
|
+
end
|
|
247
|
+
function ____exports.bedroom(self)
|
|
248
|
+
local cleanBedroomGridIndexes = getRoomGridIndexesForType(nil, RoomType.ROOM_ISAACS)
|
|
249
|
+
if #cleanBedroomGridIndexes > 0 then
|
|
250
|
+
warpToRoomType(nil, RoomType.ROOM_ISAACS)
|
|
251
|
+
return
|
|
252
|
+
end
|
|
253
|
+
local dirtyBedroomGridIndexes = getRoomGridIndexesForType(nil, RoomType.ROOM_BARREN)
|
|
254
|
+
if #dirtyBedroomGridIndexes > 0 then
|
|
255
|
+
warpToRoomType(nil, RoomType.ROOM_BARREN)
|
|
256
|
+
return
|
|
257
|
+
end
|
|
258
|
+
printConsole(nil, "There are no Clean Bedrooms or Dirty Bedrooms on this floor.")
|
|
259
|
+
end
|
|
260
|
+
function ____exports.bh(self, params)
|
|
261
|
+
____exports.blackHearts(nil, params)
|
|
262
|
+
end
|
|
263
|
+
function ____exports.blackMarket(self)
|
|
264
|
+
changeRoom(nil, GridRooms.ROOM_BLACK_MARKET_IDX)
|
|
265
|
+
end
|
|
266
|
+
function ____exports.bloodCharges(self, params)
|
|
267
|
+
local charges = 1
|
|
268
|
+
if params ~= "" then
|
|
269
|
+
local num = tonumber(params)
|
|
270
|
+
if num == nil then
|
|
271
|
+
printConsole(nil, "That is an invalid amount of charges to add.")
|
|
272
|
+
return
|
|
273
|
+
end
|
|
274
|
+
charges = num
|
|
275
|
+
end
|
|
276
|
+
local player = Isaac.GetPlayer()
|
|
277
|
+
player:AddBloodCharge(charges)
|
|
278
|
+
end
|
|
279
|
+
function ____exports.bomb(self, params)
|
|
280
|
+
local numBombs = 1
|
|
281
|
+
if params ~= "" then
|
|
282
|
+
local num = tonumber(params)
|
|
283
|
+
if num == nil then
|
|
284
|
+
printConsole(nil, "That is an invalid amount of bombs to add.")
|
|
285
|
+
return
|
|
286
|
+
end
|
|
287
|
+
numBombs = num
|
|
288
|
+
end
|
|
289
|
+
local player = Isaac.GetPlayer()
|
|
290
|
+
player:AddBombs(numBombs)
|
|
291
|
+
end
|
|
292
|
+
function ____exports.bombs(self, params)
|
|
293
|
+
local numBombs = 99
|
|
294
|
+
if params ~= "" then
|
|
295
|
+
local num = tonumber(params)
|
|
296
|
+
if num == nil then
|
|
297
|
+
printConsole(nil, "That is an invalid amount of bombs to add.")
|
|
298
|
+
return
|
|
299
|
+
end
|
|
300
|
+
numBombs = num
|
|
301
|
+
end
|
|
302
|
+
local player = Isaac.GetPlayer()
|
|
303
|
+
player:AddBombs(numBombs)
|
|
304
|
+
end
|
|
305
|
+
function ____exports.boneHearts(self, params)
|
|
306
|
+
addHeart(nil, params, HealthType.BONE)
|
|
307
|
+
end
|
|
308
|
+
function ____exports.boss(self)
|
|
309
|
+
warpToRoomType(nil, RoomType.ROOM_BOSS)
|
|
310
|
+
end
|
|
311
|
+
function ____exports.bossRush(self)
|
|
312
|
+
changeRoom(nil, GridRooms.ROOM_BOSSRUSH_IDX)
|
|
313
|
+
end
|
|
314
|
+
function ____exports.bm(self)
|
|
315
|
+
____exports.blackMarket(nil)
|
|
316
|
+
end
|
|
317
|
+
function ____exports.brokenHearts(self, params)
|
|
318
|
+
addHeart(nil, params, HealthType.BROKEN)
|
|
319
|
+
end
|
|
320
|
+
function ____exports.card(self, params)
|
|
321
|
+
if params == "" then
|
|
322
|
+
printConsole(nil, "You must specify a card name or number.")
|
|
323
|
+
return
|
|
324
|
+
end
|
|
325
|
+
local num = tonumber(params)
|
|
326
|
+
if num ~= nil then
|
|
327
|
+
if num < 1 or num >= Card.NUM_CARDS then
|
|
328
|
+
printConsole(nil, "That is an invalid card sub-type.")
|
|
329
|
+
return
|
|
330
|
+
end
|
|
331
|
+
Isaac.ExecuteCommand("g k" .. tostring(num))
|
|
332
|
+
printConsole(
|
|
333
|
+
nil,
|
|
334
|
+
"Gave card: " .. tostring(num)
|
|
335
|
+
)
|
|
336
|
+
return
|
|
337
|
+
end
|
|
338
|
+
local match = getMapPartialMatch(nil, params, CARD_MAP)
|
|
339
|
+
if match == nil then
|
|
340
|
+
printConsole(nil, "Unknown card: " .. params)
|
|
341
|
+
return
|
|
342
|
+
end
|
|
343
|
+
Isaac.ExecuteCommand("g k" .. tostring(match))
|
|
344
|
+
printConsole(
|
|
345
|
+
nil,
|
|
346
|
+
"Gave card: " .. tostring(match)
|
|
347
|
+
)
|
|
348
|
+
end
|
|
349
|
+
function ____exports.cards(self)
|
|
350
|
+
local cardType = 1
|
|
351
|
+
do
|
|
352
|
+
local y = 0
|
|
353
|
+
while y <= 6 do
|
|
354
|
+
do
|
|
355
|
+
local x = 0
|
|
356
|
+
while x <= 12 do
|
|
357
|
+
if cardType == Card.NUM_CARDS then
|
|
358
|
+
return
|
|
359
|
+
end
|
|
360
|
+
local position = gridToPos(nil, x, y)
|
|
361
|
+
Isaac.Spawn(
|
|
362
|
+
EntityType.ENTITY_PICKUP,
|
|
363
|
+
PickupVariant.PICKUP_TAROTCARD,
|
|
364
|
+
cardType,
|
|
365
|
+
position,
|
|
366
|
+
Vector.Zero,
|
|
367
|
+
nil
|
|
368
|
+
)
|
|
369
|
+
cardType = cardType + 1
|
|
370
|
+
x = x + 1
|
|
371
|
+
end
|
|
372
|
+
end
|
|
373
|
+
y = y + 1
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
end
|
|
377
|
+
function ____exports.cc(self)
|
|
378
|
+
____exports.chaosCardTears(nil)
|
|
379
|
+
end
|
|
380
|
+
function ____exports.characterCommand(self, params)
|
|
381
|
+
if params == "" then
|
|
382
|
+
printConsole(nil, "You must specify a character name or number.")
|
|
383
|
+
return
|
|
384
|
+
end
|
|
385
|
+
local num = tonumber(params)
|
|
386
|
+
if num ~= nil then
|
|
387
|
+
if num < 0 or num >= PlayerType.NUM_PLAYER_TYPES then
|
|
388
|
+
printConsole(nil, "That is an invalid player sub-type.")
|
|
389
|
+
return
|
|
390
|
+
end
|
|
391
|
+
printConsole(
|
|
392
|
+
nil,
|
|
393
|
+
"Restarting as character: " .. tostring(num)
|
|
394
|
+
)
|
|
395
|
+
restart(nil, num)
|
|
396
|
+
return
|
|
397
|
+
end
|
|
398
|
+
local match = getMapPartialMatch(nil, params, CHARACTER_MAP)
|
|
399
|
+
if match == nil then
|
|
400
|
+
printConsole(nil, "Unknown character: " .. params)
|
|
401
|
+
return
|
|
402
|
+
end
|
|
403
|
+
restart(nil, match)
|
|
404
|
+
printConsole(
|
|
405
|
+
nil,
|
|
406
|
+
"Restarting as character: " .. tostring(match)
|
|
407
|
+
)
|
|
408
|
+
end
|
|
409
|
+
function ____exports.charge(self, params)
|
|
410
|
+
____exports.addCharges(nil, params)
|
|
411
|
+
end
|
|
412
|
+
function ____exports.cleanBedroom(self)
|
|
413
|
+
warpToRoomType(nil, RoomType.ROOM_ISAACS)
|
|
414
|
+
end
|
|
415
|
+
function ____exports.coin(self, params)
|
|
416
|
+
local numCoins = 1
|
|
417
|
+
if params ~= "" then
|
|
418
|
+
local num = tonumber(params)
|
|
419
|
+
if num == nil then
|
|
420
|
+
printConsole(nil, "That is an invalid amount of coins to add.")
|
|
421
|
+
return
|
|
422
|
+
end
|
|
423
|
+
numCoins = num
|
|
424
|
+
end
|
|
425
|
+
local player = Isaac.GetPlayer()
|
|
426
|
+
player:AddCoins(numCoins)
|
|
427
|
+
end
|
|
428
|
+
function ____exports.coins(self, params)
|
|
429
|
+
local numCoins = 999
|
|
430
|
+
if params ~= "" then
|
|
431
|
+
local num = tonumber(params)
|
|
432
|
+
if num == nil then
|
|
433
|
+
printConsole(nil, "That is an invalid amount of coins to add.")
|
|
434
|
+
return
|
|
435
|
+
end
|
|
436
|
+
numCoins = num
|
|
437
|
+
end
|
|
438
|
+
local player = Isaac.GetPlayer()
|
|
439
|
+
player:AddCoins(numCoins)
|
|
440
|
+
end
|
|
441
|
+
function ____exports.crawlspace(self)
|
|
442
|
+
spawnTrapdoorOrCrawlspace(nil, false)
|
|
443
|
+
end
|
|
444
|
+
function ____exports.d6(self)
|
|
445
|
+
local player = Isaac.GetPlayer()
|
|
446
|
+
useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_D6)
|
|
447
|
+
end
|
|
448
|
+
function ____exports.d20(self)
|
|
449
|
+
local player = Isaac.GetPlayer()
|
|
450
|
+
useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_D20)
|
|
451
|
+
end
|
|
452
|
+
function ____exports.damage(self)
|
|
453
|
+
v.run.maxDamage = not v.run.maxDamage
|
|
454
|
+
printEnabled(nil, v.run.maxDamage, "debug damage")
|
|
455
|
+
end
|
|
456
|
+
function ____exports.dd(self)
|
|
457
|
+
____exports.devil(nil)
|
|
458
|
+
end
|
|
459
|
+
function ____exports.dirtyBedroom(self)
|
|
460
|
+
warpToRoomType(nil, RoomType.ROOM_BARREN)
|
|
461
|
+
end
|
|
462
|
+
function ____exports.disableCurses(self)
|
|
463
|
+
v.persistent.disableCurses = not v.persistent.disableCurses
|
|
464
|
+
printEnabled(nil, not v.persistent.disableCurses, "curses")
|
|
465
|
+
end
|
|
466
|
+
function ____exports.down(self, params)
|
|
467
|
+
movePlayer(nil, params, Direction.DOWN)
|
|
468
|
+
end
|
|
469
|
+
function ____exports.dungeon(self)
|
|
470
|
+
changeRoom(nil, GridRooms.ROOM_DUNGEON_IDX)
|
|
471
|
+
end
|
|
472
|
+
function ____exports.effects(self)
|
|
473
|
+
local player = Isaac.GetPlayer()
|
|
474
|
+
logTemporaryEffects(player)
|
|
475
|
+
printConsole(nil, "Logged the player's effects to the \"log.txt\" file.")
|
|
476
|
+
end
|
|
477
|
+
function ____exports.eh(self, params)
|
|
478
|
+
____exports.eternalHearts(nil, params)
|
|
479
|
+
end
|
|
480
|
+
function ____exports.error(self)
|
|
481
|
+
____exports.IAMERROR(nil)
|
|
482
|
+
end
|
|
483
|
+
function ____exports.fool(self)
|
|
484
|
+
____exports.startingRoom(nil)
|
|
485
|
+
end
|
|
486
|
+
function ____exports.getPosition(self)
|
|
487
|
+
for ____, player in ipairs(getPlayers(nil)) do
|
|
488
|
+
local character = player:GetPlayerType()
|
|
489
|
+
printConsole(
|
|
490
|
+
nil,
|
|
491
|
+
((((("Player position for character " .. tostring(character)) .. ": (") .. tostring(player.Position.X)) .. ", ") .. tostring(player.Position.Y)) .. ")"
|
|
492
|
+
)
|
|
493
|
+
end
|
|
494
|
+
end
|
|
495
|
+
function ____exports.gigaBomb(self, params)
|
|
496
|
+
local numBombs = 1
|
|
497
|
+
if params ~= "" then
|
|
498
|
+
local num = tonumber(params)
|
|
499
|
+
if num == nil then
|
|
500
|
+
printConsole(nil, "That is an invalid amount of Giga Bombs to add.")
|
|
501
|
+
return
|
|
502
|
+
end
|
|
503
|
+
numBombs = num
|
|
504
|
+
end
|
|
505
|
+
local player = Isaac.GetPlayer()
|
|
506
|
+
player:AddGigaBombs(numBombs)
|
|
507
|
+
end
|
|
508
|
+
function ____exports.goldBomb(self)
|
|
509
|
+
____exports.goldenBomb(nil)
|
|
510
|
+
end
|
|
511
|
+
function ____exports.goldenHearts(self, params)
|
|
512
|
+
addHeart(nil, params, HealthType.GOLDEN)
|
|
513
|
+
end
|
|
514
|
+
function ____exports.goldenKey(self)
|
|
515
|
+
local player = Isaac.GetPlayer()
|
|
516
|
+
player:AddGoldenKey()
|
|
517
|
+
end
|
|
518
|
+
function ____exports.goldHearts(self, params)
|
|
519
|
+
____exports.goldenHearts(nil, params)
|
|
520
|
+
end
|
|
521
|
+
function ____exports.goldKey(self)
|
|
522
|
+
____exports.goldenKey(nil)
|
|
523
|
+
end
|
|
524
|
+
function ____exports.grid(self)
|
|
525
|
+
Isaac.ExecuteCommand("debug 2")
|
|
526
|
+
end
|
|
527
|
+
function ____exports.grid2(self)
|
|
528
|
+
Isaac.ExecuteCommand("debug 11")
|
|
529
|
+
end
|
|
530
|
+
function ____exports.h(self, params)
|
|
531
|
+
____exports.hearts(nil, params)
|
|
532
|
+
end
|
|
533
|
+
function ____exports.hitboxes(self)
|
|
534
|
+
Isaac.ExecuteCommand("debug 6")
|
|
535
|
+
end
|
|
536
|
+
function ____exports.key(self, params)
|
|
537
|
+
local numKeys = 1
|
|
538
|
+
if params ~= "" then
|
|
539
|
+
local num = tonumber(params)
|
|
540
|
+
if num == nil then
|
|
541
|
+
printConsole(nil, "That is an invalid amount of keys to add.")
|
|
542
|
+
return
|
|
543
|
+
end
|
|
544
|
+
numKeys = num
|
|
545
|
+
end
|
|
546
|
+
local player = Isaac.GetPlayer()
|
|
547
|
+
player:AddKeys(numKeys)
|
|
548
|
+
end
|
|
549
|
+
function ____exports.keys(self, params)
|
|
550
|
+
local numKeys = 99
|
|
551
|
+
if params ~= "" then
|
|
552
|
+
local num = tonumber(params)
|
|
553
|
+
if num == nil then
|
|
554
|
+
printConsole(nil, "That is an invalid amount of keys to add.")
|
|
555
|
+
return
|
|
556
|
+
end
|
|
557
|
+
numKeys = num
|
|
558
|
+
end
|
|
559
|
+
local player = Isaac.GetPlayer()
|
|
560
|
+
player:AddKeys(numKeys)
|
|
561
|
+
end
|
|
562
|
+
function ____exports.library(self)
|
|
563
|
+
warpToRoomType(nil, RoomType.ROOM_LIBRARY)
|
|
564
|
+
end
|
|
565
|
+
function ____exports.list(self, params)
|
|
566
|
+
listEntities(nil, params, false)
|
|
567
|
+
end
|
|
568
|
+
function ____exports.listAll(self, params)
|
|
569
|
+
listEntities(nil, params, true)
|
|
570
|
+
end
|
|
571
|
+
function ____exports.listGrid(self, params)
|
|
572
|
+
listGridEntities(nil, params, false)
|
|
573
|
+
end
|
|
574
|
+
function ____exports.listGridAll(self, params)
|
|
575
|
+
listGridEntities(nil, params, true)
|
|
576
|
+
end
|
|
577
|
+
function ____exports.lowHP(self)
|
|
578
|
+
for ____, npc in ipairs(getNPCs(nil)) do
|
|
579
|
+
npc.HitPoints = 1
|
|
580
|
+
end
|
|
581
|
+
printConsole(nil, "Set every NPC to 1 HP.")
|
|
582
|
+
end
|
|
583
|
+
function ____exports.luck(self)
|
|
584
|
+
Isaac.ExecuteCommand("debug 9")
|
|
585
|
+
end
|
|
586
|
+
function ____exports.maxHearts(self, params)
|
|
587
|
+
addHeart(nil, params, HealthType.MAX_HEARTS)
|
|
588
|
+
end
|
|
589
|
+
function ____exports.mh(self, params)
|
|
590
|
+
____exports.maxHearts(nil, params)
|
|
591
|
+
end
|
|
592
|
+
function ____exports.miniboss(self)
|
|
593
|
+
warpToRoomType(nil, RoomType.ROOM_MINIBOSS)
|
|
594
|
+
end
|
|
595
|
+
function ____exports.noCurses(self)
|
|
596
|
+
____exports.disableCurses(nil)
|
|
597
|
+
end
|
|
598
|
+
function ____exports.pill(self, params)
|
|
599
|
+
if params == "" then
|
|
600
|
+
printConsole(nil, "You must specify a pill name or number.")
|
|
601
|
+
return
|
|
602
|
+
end
|
|
603
|
+
local num = tonumber(params)
|
|
604
|
+
if num ~= nil then
|
|
605
|
+
if num < 1 or num >= PillEffect.NUM_PILL_EFFECTS then
|
|
606
|
+
printConsole(nil, "That is an invalid pill effect ID.")
|
|
607
|
+
return
|
|
608
|
+
end
|
|
609
|
+
Isaac.ExecuteCommand("g p" .. tostring(num))
|
|
610
|
+
printConsole(
|
|
611
|
+
nil,
|
|
612
|
+
"Gave pill: " .. tostring(num)
|
|
613
|
+
)
|
|
614
|
+
return
|
|
615
|
+
end
|
|
616
|
+
local match = getMapPartialMatch(nil, params, PILL_EFFECT_MAP)
|
|
617
|
+
if match == nil then
|
|
618
|
+
printConsole(nil, "Unknown pill effect: " .. params)
|
|
619
|
+
return
|
|
620
|
+
end
|
|
621
|
+
Isaac.ExecuteCommand("g p" .. tostring(match))
|
|
622
|
+
printConsole(
|
|
623
|
+
nil,
|
|
624
|
+
"Gave pill: " .. tostring(match)
|
|
625
|
+
)
|
|
626
|
+
end
|
|
627
|
+
function ____exports.pills(self)
|
|
628
|
+
local pillColor = 1
|
|
629
|
+
local horse = false
|
|
630
|
+
do
|
|
631
|
+
local y = 0
|
|
632
|
+
while y <= 6 do
|
|
633
|
+
do
|
|
634
|
+
local x = 0
|
|
635
|
+
while x <= 12 do
|
|
636
|
+
if pillColor == PillColor.NUM_PILLS then
|
|
637
|
+
if horse then
|
|
638
|
+
return
|
|
639
|
+
end
|
|
640
|
+
horse = true
|
|
641
|
+
pillColor = 1
|
|
642
|
+
end
|
|
643
|
+
local horsePillColor = pillColor + PILL_GIANT_FLAG
|
|
644
|
+
local subType = horse and horsePillColor or pillColor
|
|
645
|
+
local position = gridToPos(nil, x, y)
|
|
646
|
+
Isaac.Spawn(
|
|
647
|
+
EntityType.ENTITY_PICKUP,
|
|
648
|
+
PickupVariant.PICKUP_PILL,
|
|
649
|
+
subType,
|
|
650
|
+
position,
|
|
651
|
+
Vector.Zero,
|
|
652
|
+
nil
|
|
653
|
+
)
|
|
654
|
+
pillColor = pillColor + 1
|
|
655
|
+
x = x + 1
|
|
656
|
+
end
|
|
657
|
+
end
|
|
658
|
+
y = y + 1
|
|
659
|
+
end
|
|
660
|
+
end
|
|
661
|
+
end
|
|
662
|
+
function ____exports.planetarium(self)
|
|
663
|
+
warpToRoomType(nil, RoomType.ROOM_PLANETARIUM)
|
|
664
|
+
end
|
|
665
|
+
function ____exports.playSound(self, params)
|
|
666
|
+
____exports.sound(nil, params)
|
|
667
|
+
end
|
|
668
|
+
function ____exports.pocket(self, params)
|
|
669
|
+
if params == "" then
|
|
670
|
+
printConsole(nil, "You must supply a collectible type to put as the pocket item.")
|
|
671
|
+
return
|
|
672
|
+
end
|
|
673
|
+
local num = tonumber(params)
|
|
674
|
+
if num == nil then
|
|
675
|
+
printConsole(nil, "That is an invalid collectible type.")
|
|
676
|
+
return
|
|
677
|
+
end
|
|
678
|
+
local player = Isaac.GetPlayer()
|
|
679
|
+
player:SetPocketActiveItem(num, ActiveSlot.SLOT_POCKET)
|
|
680
|
+
end
|
|
681
|
+
function ____exports.poopMana(self, params)
|
|
682
|
+
local charges = 1
|
|
683
|
+
if params ~= "" then
|
|
684
|
+
local num = tonumber(params)
|
|
685
|
+
if num == nil then
|
|
686
|
+
printConsole(nil, "That is an invalid amount of mana to add.")
|
|
687
|
+
return
|
|
688
|
+
end
|
|
689
|
+
charges = num
|
|
690
|
+
end
|
|
691
|
+
local player = Isaac.GetPlayer()
|
|
692
|
+
player:AddPoopMana(charges)
|
|
693
|
+
end
|
|
694
|
+
function ____exports.positionCommand(self)
|
|
695
|
+
____exports.getPosition(nil)
|
|
696
|
+
end
|
|
697
|
+
function ____exports.redHearts(self, params)
|
|
698
|
+
____exports.hearts(nil, params)
|
|
699
|
+
end
|
|
700
|
+
function ____exports.rh(self, params)
|
|
701
|
+
____exports.redHearts(nil, params)
|
|
702
|
+
end
|
|
703
|
+
function ____exports.roomCommand(self)
|
|
704
|
+
logRoom()
|
|
705
|
+
end
|
|
706
|
+
function ____exports.rottenHearts(self, params)
|
|
707
|
+
addHeart(nil, params, HealthType.ROTTEN)
|
|
708
|
+
end
|
|
709
|
+
function ____exports.s(self, params)
|
|
710
|
+
if params == "" then
|
|
711
|
+
printConsole(nil, "You must specify a stage number.")
|
|
712
|
+
return
|
|
713
|
+
end
|
|
714
|
+
local finalCharacter = string.sub(params, -1)
|
|
715
|
+
local stageString
|
|
716
|
+
local stageTypeLetter
|
|
717
|
+
if finalCharacter == "a" or finalCharacter == "b" or finalCharacter == "c" or finalCharacter == "d" then
|
|
718
|
+
stageString = __TS__StringSlice(params, 0, #params - 1)
|
|
719
|
+
stageTypeLetter = finalCharacter
|
|
720
|
+
else
|
|
721
|
+
stageString = params
|
|
722
|
+
stageTypeLetter = ""
|
|
723
|
+
end
|
|
724
|
+
local stage = tonumber(stageString)
|
|
725
|
+
if stage == nil then
|
|
726
|
+
printConsole(
|
|
727
|
+
nil,
|
|
728
|
+
"That is an invalid stage number: " .. tostring(stage)
|
|
729
|
+
)
|
|
730
|
+
return
|
|
731
|
+
end
|
|
732
|
+
local minStage = 1
|
|
733
|
+
local maxStage = 13
|
|
734
|
+
if stage < minStage or stage > maxStage then
|
|
735
|
+
printConsole(
|
|
736
|
+
nil,
|
|
737
|
+
((("Invalid stage number; must be between " .. tostring(minStage)) .. " and ") .. tostring(maxStage)) .. "."
|
|
738
|
+
)
|
|
739
|
+
return
|
|
740
|
+
end
|
|
741
|
+
Isaac.ExecuteCommand(("stage " .. tostring(stage)) .. stageTypeLetter)
|
|
742
|
+
end
|
|
743
|
+
function ____exports.sacrifice(self)
|
|
744
|
+
warpToRoomType(nil, RoomType.ROOM_SACRIFICE)
|
|
745
|
+
end
|
|
746
|
+
function ____exports.secret(self)
|
|
747
|
+
warpToRoomType(nil, RoomType.ROOM_SECRET)
|
|
748
|
+
end
|
|
749
|
+
function ____exports.seeds(self)
|
|
750
|
+
logAllSeedEffects()
|
|
751
|
+
printConsole(nil, "Logged the seed effects to the \"log.txt\" file.")
|
|
752
|
+
end
|
|
753
|
+
function ____exports.setCharges(self, params)
|
|
754
|
+
if params == "" then
|
|
755
|
+
printConsole(nil, "You must specify a slot number and a charge amount. (Use 0 for the primary slot, 1 for the Schoolbag slot, 2 for the pocket item slot, and 3 for the Dice Bag slot.)")
|
|
756
|
+
return
|
|
757
|
+
end
|
|
758
|
+
local args = __TS__StringSplit(params, " ")
|
|
759
|
+
if #args == 1 then
|
|
760
|
+
printConsole(nil, "You must specify the amount of charge to set.")
|
|
761
|
+
return
|
|
762
|
+
end
|
|
763
|
+
if #args ~= 2 then
|
|
764
|
+
printConsole(nil, "That is an invalid amount of arguments.")
|
|
765
|
+
return
|
|
766
|
+
end
|
|
767
|
+
local activeSlotString, chargeString = table.unpack(args)
|
|
768
|
+
local activeSlot = tonumber(activeSlotString)
|
|
769
|
+
if activeSlot == nil then
|
|
770
|
+
printConsole(nil, "The provided slot number is invalid: " .. activeSlotString)
|
|
771
|
+
return
|
|
772
|
+
end
|
|
773
|
+
if activeSlot < ActiveSlot.SLOT_PRIMARY or activeSlot > ActiveSlot.SLOT_POCKET2 then
|
|
774
|
+
printConsole(
|
|
775
|
+
nil,
|
|
776
|
+
"The provided slot number is invalid: " .. tostring(activeSlot)
|
|
777
|
+
)
|
|
778
|
+
return
|
|
779
|
+
end
|
|
780
|
+
local chargeNum = tonumber(chargeString)
|
|
781
|
+
if chargeNum == nil then
|
|
782
|
+
printConsole(nil, "The provided charge amount is invalid: " .. chargeString)
|
|
783
|
+
return
|
|
784
|
+
end
|
|
785
|
+
if chargeNum < 0 then
|
|
786
|
+
printConsole(
|
|
787
|
+
nil,
|
|
788
|
+
"The provided charge amount is invalid: " .. tostring(chargeNum)
|
|
789
|
+
)
|
|
790
|
+
return
|
|
791
|
+
end
|
|
792
|
+
local player = Isaac.GetPlayer()
|
|
793
|
+
player:SetActiveCharge(chargeNum, activeSlot)
|
|
794
|
+
end
|
|
795
|
+
function ____exports.setPosition(self, params)
|
|
796
|
+
if params == "" then
|
|
797
|
+
printConsole(nil, "You must specify a position. (e.g. \"setposition 100 50\")")
|
|
798
|
+
return
|
|
799
|
+
end
|
|
800
|
+
local args = __TS__StringSplit(params, " ")
|
|
801
|
+
if #args ~= 2 then
|
|
802
|
+
printConsole(nil, "You must specify a position. (e.g. \"setposition 100 50\")")
|
|
803
|
+
return
|
|
804
|
+
end
|
|
805
|
+
local xString, yString = table.unpack(args)
|
|
806
|
+
local x = tonumber(xString)
|
|
807
|
+
if x == nil then
|
|
808
|
+
printConsole(nil, "That is an invalid x value: " .. xString)
|
|
809
|
+
return
|
|
810
|
+
end
|
|
811
|
+
local y = tonumber(yString)
|
|
812
|
+
if y == nil then
|
|
813
|
+
printConsole(nil, "That is an invalid y value: " .. yString)
|
|
814
|
+
return
|
|
815
|
+
end
|
|
816
|
+
local player = Isaac.GetPlayer()
|
|
817
|
+
local position = Vector(x, y)
|
|
818
|
+
player.Position = position
|
|
819
|
+
end
|
|
820
|
+
function ____exports.sh(self, params)
|
|
821
|
+
____exports.soulHearts(nil, params)
|
|
822
|
+
end
|
|
823
|
+
function ____exports.shop(self)
|
|
824
|
+
warpToRoomType(nil, RoomType.ROOM_SHOP)
|
|
825
|
+
end
|
|
826
|
+
function ____exports.smelt(self)
|
|
827
|
+
local player = Isaac.GetPlayer()
|
|
828
|
+
useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_SMELTER)
|
|
829
|
+
end
|
|
830
|
+
function ____exports.soulCharges(self, params)
|
|
831
|
+
local charges = 1
|
|
832
|
+
if params ~= "" then
|
|
833
|
+
local num = tonumber(params)
|
|
834
|
+
if num == nil then
|
|
835
|
+
printConsole(nil, "That is an invalid amount of charges to add.")
|
|
836
|
+
return
|
|
837
|
+
end
|
|
838
|
+
charges = num
|
|
839
|
+
end
|
|
840
|
+
local player = Isaac.GetPlayer()
|
|
841
|
+
player:AddSoulCharge(charges)
|
|
842
|
+
end
|
|
843
|
+
function ____exports.sounds(self)
|
|
844
|
+
logSounds()
|
|
845
|
+
printConsole(nil, "Logged the currently playing sound effects to the \"log.txt\" file.")
|
|
846
|
+
end
|
|
847
|
+
function ____exports.spam(self)
|
|
848
|
+
v.run.spamBloodRights = not v.run.spamBloodRights
|
|
849
|
+
printEnabled(nil, v.run.maxSpeed, "spamming Blood Rights")
|
|
850
|
+
end
|
|
851
|
+
function ____exports.spawnGoldenTrinket(self, params)
|
|
852
|
+
if params == "" then
|
|
853
|
+
printConsole(nil, "You must specify the number corresponding to the trinket type.")
|
|
854
|
+
return
|
|
855
|
+
end
|
|
856
|
+
local trinketType = tonumber(params)
|
|
857
|
+
if trinketType == nil then
|
|
858
|
+
printConsole(nil, "That is an invalid trinket type: " .. params)
|
|
859
|
+
return
|
|
860
|
+
end
|
|
861
|
+
local goldenTrinketType = trinketType + TRINKET_GOLDEN_FLAG
|
|
862
|
+
local room = game:GetRoom()
|
|
863
|
+
local centerPos = room:GetCenterPos()
|
|
864
|
+
Isaac.Spawn(
|
|
865
|
+
EntityType.ENTITY_PICKUP,
|
|
866
|
+
PickupVariant.PICKUP_TRINKET,
|
|
867
|
+
goldenTrinketType,
|
|
868
|
+
centerPos,
|
|
869
|
+
Vector.Zero,
|
|
870
|
+
nil
|
|
871
|
+
)
|
|
872
|
+
end
|
|
873
|
+
function ____exports.speed(self)
|
|
874
|
+
local player = Isaac.GetPlayer()
|
|
875
|
+
v.run.maxSpeed = not v.run.maxSpeed
|
|
876
|
+
if v.run.maxSpeed and not player:HasCollectible(CollectibleType.COLLECTIBLE_FATE) then
|
|
877
|
+
local numEternalHearts = player:GetEternalHearts()
|
|
878
|
+
if numEternalHearts == 0 then
|
|
879
|
+
player:AddCollectible(CollectibleType.COLLECTIBLE_FATE)
|
|
880
|
+
player:AddEternalHearts(-1)
|
|
881
|
+
else
|
|
882
|
+
player:AddEternalHearts(-1)
|
|
883
|
+
player:AddCollectible(CollectibleType.COLLECTIBLE_FATE)
|
|
884
|
+
end
|
|
885
|
+
end
|
|
886
|
+
player:AddCacheFlags(CacheFlag.CACHE_SPEED)
|
|
887
|
+
player:EvaluateItems()
|
|
888
|
+
printEnabled(nil, v.run.maxSpeed, "max speed")
|
|
889
|
+
end
|
|
890
|
+
function ____exports.superSecret(self)
|
|
891
|
+
warpToRoomType(nil, RoomType.ROOM_SUPERSECRET)
|
|
892
|
+
end
|
|
893
|
+
function ____exports.tears(self)
|
|
894
|
+
v.run.maxTears = not v.run.maxTears
|
|
895
|
+
local player = Isaac.GetPlayer()
|
|
896
|
+
player:AddCacheFlags(CacheFlag.CACHE_FIREDELAY)
|
|
897
|
+
player:EvaluateItems()
|
|
898
|
+
printEnabled(nil, v.run.maxDamage, "debug tear-rate")
|
|
899
|
+
end
|
|
900
|
+
function ____exports.trapdoorCommand(self)
|
|
901
|
+
spawnTrapdoorOrCrawlspace(nil, true)
|
|
902
|
+
end
|
|
903
|
+
function ____exports.treasure(self)
|
|
904
|
+
warpToRoomType(nil, RoomType.ROOM_TREASURE)
|
|
905
|
+
end
|
|
906
|
+
function ____exports.ultraSecret(self)
|
|
907
|
+
warpToRoomType(nil, RoomType.ROOM_ULTRASECRET)
|
|
908
|
+
end
|
|
909
|
+
function ____exports.warp(self, params)
|
|
910
|
+
if params == "" then
|
|
911
|
+
printConsole(nil, "You must specify a room type name or number.")
|
|
912
|
+
return
|
|
913
|
+
end
|
|
914
|
+
local num = tonumber(params)
|
|
915
|
+
if num ~= nil then
|
|
916
|
+
if num < 1 or num >= RoomType.NUM_ROOMTYPES then
|
|
917
|
+
printConsole(nil, "That is an invalid room type.")
|
|
918
|
+
return
|
|
919
|
+
end
|
|
920
|
+
warpToRoomType(nil, num)
|
|
921
|
+
return
|
|
922
|
+
end
|
|
923
|
+
local match = getMapPartialMatch(nil, params, ROOM_TYPE_MAP)
|
|
924
|
+
if match == nil then
|
|
925
|
+
printConsole(nil, "Unknown room type: " .. params)
|
|
926
|
+
return
|
|
927
|
+
end
|
|
928
|
+
warpToRoomType(nil, match)
|
|
929
|
+
end
|
|
930
|
+
return ____exports
|