isaacscript-common 1.2.138 → 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/constants.d.ts +2 -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 +88 -4
- package/dist/features/extraConsoleCommands/commands.lua +299 -27
- package/dist/features/extraConsoleCommands/init.lua +46 -5
- package/dist/features/extraConsoleCommands/v.d.ts +5 -1
- package/dist/features/extraConsoleCommands/v.lua +7 -1
- 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.lua +3 -0
- package/dist/functions/rooms.lua +4 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.lua +16 -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/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____lualib = require("lualib_bundle")
|
|
3
3
|
local Map = ____lualib.Map
|
|
4
|
+
local __TS__StringSplit = ____lualib.__TS__StringSplit
|
|
4
5
|
local __TS__StringSlice = ____lualib.__TS__StringSlice
|
|
5
6
|
local ____exports = {}
|
|
6
7
|
local addHeart, devilAngel, listEntities, listGridEntities, movePlayer, printEnabled, spawnTrapdoorOrCrawlspace, warpToRoomType, DEFAULT_MOVE_UNITS
|
|
@@ -9,6 +10,7 @@ local game = ____cachedClasses.game
|
|
|
9
10
|
local sfxManager = ____cachedClasses.sfxManager
|
|
10
11
|
local ____constants = require("constants")
|
|
11
12
|
local PILL_GIANT_FLAG = ____constants.PILL_GIANT_FLAG
|
|
13
|
+
local TRINKET_GOLDEN_FLAG = ____constants.TRINKET_GOLDEN_FLAG
|
|
12
14
|
local ____gridEntity = require("functions.gridEntity")
|
|
13
15
|
local spawnGridEntityWithVariant = ____gridEntity.spawnGridEntityWithVariant
|
|
14
16
|
local ____log = require("functions.log")
|
|
@@ -44,6 +46,10 @@ local ____characterMap = require("maps.characterMap")
|
|
|
44
46
|
local CHARACTER_MAP = ____characterMap.CHARACTER_MAP
|
|
45
47
|
local ____pillEffectMap = require("maps.pillEffectMap")
|
|
46
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
|
|
47
53
|
local ____HealthType = require("types.HealthType")
|
|
48
54
|
local HealthType = ____HealthType.HealthType
|
|
49
55
|
local ____v = require("features.extraConsoleCommands.v")
|
|
@@ -65,10 +71,6 @@ function ____exports.goldenBomb(self)
|
|
|
65
71
|
local player = Isaac.GetPlayer()
|
|
66
72
|
player:AddGoldenBomb()
|
|
67
73
|
end
|
|
68
|
-
function ____exports.goldenKey(self)
|
|
69
|
-
local player = Isaac.GetPlayer()
|
|
70
|
-
player:AddGoldenKey()
|
|
71
|
-
end
|
|
72
74
|
function ____exports.hearts(self, params)
|
|
73
75
|
addHeart(nil, params, HealthType.RED)
|
|
74
76
|
end
|
|
@@ -78,6 +80,14 @@ end
|
|
|
78
80
|
function ____exports.soulHearts(self, params)
|
|
79
81
|
addHeart(nil, params, HealthType.SOUL)
|
|
80
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
|
|
81
91
|
function ____exports.startingRoom(self)
|
|
82
92
|
local level = game:GetLevel()
|
|
83
93
|
local startingRoomIndex = level:GetStartingRoomIndex()
|
|
@@ -165,16 +175,67 @@ function spawnTrapdoorOrCrawlspace(self, trapdoor)
|
|
|
165
175
|
local gridEntityType = trapdoor and GridEntityType.GRID_TRAPDOOR or GridEntityType.GRID_STAIRS
|
|
166
176
|
spawnGridEntityWithVariant(nil, gridEntityType, 0, gridIndex)
|
|
167
177
|
end
|
|
168
|
-
function warpToRoomType(self, roomType
|
|
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
|
|
169
186
|
local gridIndexes = getRoomGridIndexesForType(nil, roomType)
|
|
170
187
|
if #gridIndexes == 0 then
|
|
171
|
-
printConsole(
|
|
188
|
+
printConsole(
|
|
189
|
+
nil,
|
|
190
|
+
("There are no " .. tostring(roomTypeName)) .. "s on this floor."
|
|
191
|
+
)
|
|
172
192
|
return
|
|
173
193
|
end
|
|
174
194
|
local firstGridIndex = gridIndexes[1]
|
|
175
195
|
changeRoom(nil, firstGridIndex)
|
|
196
|
+
printConsole(
|
|
197
|
+
nil,
|
|
198
|
+
((("Warped to room type: " .. tostring(roomTypeName)) .. " (") .. tostring(roomType)) .. ")"
|
|
199
|
+
)
|
|
176
200
|
end
|
|
177
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
|
|
178
239
|
function ____exports.angel(self)
|
|
179
240
|
devilAngel(nil, false)
|
|
180
241
|
end
|
|
@@ -183,6 +244,19 @@ function ____exports.ascent(self)
|
|
|
183
244
|
game:SetStateFlag(GameStateFlag.STATE_BACKWARDS_PATH, true)
|
|
184
245
|
printConsole(nil, "Set Ascent flags.")
|
|
185
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
|
|
186
260
|
function ____exports.bh(self, params)
|
|
187
261
|
____exports.blackHearts(nil, params)
|
|
188
262
|
end
|
|
@@ -232,7 +306,10 @@ function ____exports.boneHearts(self, params)
|
|
|
232
306
|
addHeart(nil, params, HealthType.BONE)
|
|
233
307
|
end
|
|
234
308
|
function ____exports.boss(self)
|
|
235
|
-
warpToRoomType(nil, RoomType.ROOM_BOSS
|
|
309
|
+
warpToRoomType(nil, RoomType.ROOM_BOSS)
|
|
310
|
+
end
|
|
311
|
+
function ____exports.bossRush(self)
|
|
312
|
+
changeRoom(nil, GridRooms.ROOM_BOSSRUSH_IDX)
|
|
236
313
|
end
|
|
237
314
|
function ____exports.bm(self)
|
|
238
315
|
____exports.blackMarket(nil)
|
|
@@ -329,6 +406,12 @@ function ____exports.characterCommand(self, params)
|
|
|
329
406
|
"Restarting as character: " .. tostring(match)
|
|
330
407
|
)
|
|
331
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
|
|
332
415
|
function ____exports.coin(self, params)
|
|
333
416
|
local numCoins = 1
|
|
334
417
|
if params ~= "" then
|
|
@@ -373,9 +456,19 @@ end
|
|
|
373
456
|
function ____exports.dd(self)
|
|
374
457
|
____exports.devil(nil)
|
|
375
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
|
|
376
466
|
function ____exports.down(self, params)
|
|
377
467
|
movePlayer(nil, params, Direction.DOWN)
|
|
378
468
|
end
|
|
469
|
+
function ____exports.dungeon(self)
|
|
470
|
+
changeRoom(nil, GridRooms.ROOM_DUNGEON_IDX)
|
|
471
|
+
end
|
|
379
472
|
function ____exports.effects(self)
|
|
380
473
|
local player = Isaac.GetPlayer()
|
|
381
474
|
logTemporaryEffects(player)
|
|
@@ -390,15 +483,56 @@ end
|
|
|
390
483
|
function ____exports.fool(self)
|
|
391
484
|
____exports.startingRoom(nil)
|
|
392
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
|
|
393
508
|
function ____exports.goldBomb(self)
|
|
394
509
|
____exports.goldenBomb(nil)
|
|
395
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
|
|
396
521
|
function ____exports.goldKey(self)
|
|
397
522
|
____exports.goldenKey(nil)
|
|
398
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
|
|
399
530
|
function ____exports.h(self, params)
|
|
400
531
|
____exports.hearts(nil, params)
|
|
401
532
|
end
|
|
533
|
+
function ____exports.hitboxes(self)
|
|
534
|
+
Isaac.ExecuteCommand("debug 6")
|
|
535
|
+
end
|
|
402
536
|
function ____exports.key(self, params)
|
|
403
537
|
local numKeys = 1
|
|
404
538
|
if params ~= "" then
|
|
@@ -425,6 +559,9 @@ function ____exports.keys(self, params)
|
|
|
425
559
|
local player = Isaac.GetPlayer()
|
|
426
560
|
player:AddKeys(numKeys)
|
|
427
561
|
end
|
|
562
|
+
function ____exports.library(self)
|
|
563
|
+
warpToRoomType(nil, RoomType.ROOM_LIBRARY)
|
|
564
|
+
end
|
|
428
565
|
function ____exports.list(self, params)
|
|
429
566
|
listEntities(nil, params, false)
|
|
430
567
|
end
|
|
@@ -452,6 +589,12 @@ end
|
|
|
452
589
|
function ____exports.mh(self, params)
|
|
453
590
|
____exports.maxHearts(nil, params)
|
|
454
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
|
|
455
598
|
function ____exports.pill(self, params)
|
|
456
599
|
if params == "" then
|
|
457
600
|
printConsole(nil, "You must specify a pill name or number.")
|
|
@@ -517,7 +660,10 @@ function ____exports.pills(self)
|
|
|
517
660
|
end
|
|
518
661
|
end
|
|
519
662
|
function ____exports.planetarium(self)
|
|
520
|
-
warpToRoomType(nil, RoomType.ROOM_PLANETARIUM
|
|
663
|
+
warpToRoomType(nil, RoomType.ROOM_PLANETARIUM)
|
|
664
|
+
end
|
|
665
|
+
function ____exports.playSound(self, params)
|
|
666
|
+
____exports.sound(nil, params)
|
|
521
667
|
end
|
|
522
668
|
function ____exports.pocket(self, params)
|
|
523
669
|
if params == "" then
|
|
@@ -532,14 +678,21 @@ function ____exports.pocket(self, params)
|
|
|
532
678
|
local player = Isaac.GetPlayer()
|
|
533
679
|
player:SetPocketActiveItem(num, ActiveSlot.SLOT_POCKET)
|
|
534
680
|
end
|
|
535
|
-
function ____exports.
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
(
|
|
541
|
-
|
|
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
|
|
542
690
|
end
|
|
691
|
+
local player = Isaac.GetPlayer()
|
|
692
|
+
player:AddPoopMana(charges)
|
|
693
|
+
end
|
|
694
|
+
function ____exports.positionCommand(self)
|
|
695
|
+
____exports.getPosition(nil)
|
|
543
696
|
end
|
|
544
697
|
function ____exports.redHearts(self, params)
|
|
545
698
|
____exports.hearts(nil, params)
|
|
@@ -587,15 +740,88 @@ function ____exports.s(self, params)
|
|
|
587
740
|
end
|
|
588
741
|
Isaac.ExecuteCommand(("stage " .. tostring(stage)) .. stageTypeLetter)
|
|
589
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
|
|
590
749
|
function ____exports.seeds(self)
|
|
591
750
|
logAllSeedEffects()
|
|
592
751
|
printConsole(nil, "Logged the seed effects to the \"log.txt\" file.")
|
|
593
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
|
|
594
820
|
function ____exports.sh(self, params)
|
|
595
821
|
____exports.soulHearts(nil, params)
|
|
596
822
|
end
|
|
597
823
|
function ____exports.shop(self)
|
|
598
|
-
warpToRoomType(nil, RoomType.ROOM_SHOP
|
|
824
|
+
warpToRoomType(nil, RoomType.ROOM_SHOP)
|
|
599
825
|
end
|
|
600
826
|
function ____exports.smelt(self)
|
|
601
827
|
local player = Isaac.GetPlayer()
|
|
@@ -614,20 +840,35 @@ function ____exports.soulCharges(self, params)
|
|
|
614
840
|
local player = Isaac.GetPlayer()
|
|
615
841
|
player:AddSoulCharge(charges)
|
|
616
842
|
end
|
|
617
|
-
function ____exports.sound(self, params)
|
|
618
|
-
local soundEffect = tonumber(params)
|
|
619
|
-
if soundEffect == nil then
|
|
620
|
-
printConsole(nil, "That is an invalid sound effect ID.")
|
|
621
|
-
return
|
|
622
|
-
end
|
|
623
|
-
sfxManager:Play(soundEffect)
|
|
624
|
-
end
|
|
625
843
|
function ____exports.sounds(self)
|
|
626
844
|
logSounds()
|
|
627
845
|
printConsole(nil, "Logged the currently playing sound effects to the \"log.txt\" file.")
|
|
628
846
|
end
|
|
629
847
|
function ____exports.spam(self)
|
|
630
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
|
+
)
|
|
631
872
|
end
|
|
632
873
|
function ____exports.speed(self)
|
|
633
874
|
local player = Isaac.GetPlayer()
|
|
@@ -646,13 +887,44 @@ function ____exports.speed(self)
|
|
|
646
887
|
player:EvaluateItems()
|
|
647
888
|
printEnabled(nil, v.run.maxSpeed, "max speed")
|
|
648
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
|
|
649
900
|
function ____exports.trapdoorCommand(self)
|
|
650
901
|
spawnTrapdoorOrCrawlspace(nil, true)
|
|
651
902
|
end
|
|
652
903
|
function ____exports.treasure(self)
|
|
653
|
-
warpToRoomType(nil, RoomType.ROOM_TREASURE
|
|
904
|
+
warpToRoomType(nil, RoomType.ROOM_TREASURE)
|
|
905
|
+
end
|
|
906
|
+
function ____exports.ultraSecret(self)
|
|
907
|
+
warpToRoomType(nil, RoomType.ROOM_ULTRASECRET)
|
|
654
908
|
end
|
|
655
|
-
function ____exports.
|
|
656
|
-
|
|
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)
|
|
657
929
|
end
|
|
658
930
|
return ____exports
|
|
@@ -3,7 +3,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
3
3
|
local Map = ____lualib.Map
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local ____exports = {}
|
|
6
|
-
local postUpdate, evaluateCacheSpeed, entityTakeDmgPlayer, executeCmd, postFireTear, commandFunctionsMap
|
|
6
|
+
local featureEnabled, postUpdate, evaluateCacheFireDelay, evaluateCacheSpeed, entityTakeDmgPlayer, postCurseEval, executeCmd, postFireTear, commandFunctionsMap, initialized
|
|
7
7
|
local ____constants = require("constants")
|
|
8
8
|
local MAX_SPEED_STAT = ____constants.MAX_SPEED_STAT
|
|
9
9
|
local ____map = require("functions.map")
|
|
@@ -15,12 +15,20 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
15
15
|
local commands = require("features.extraConsoleCommands.commands")
|
|
16
16
|
local ____v = require("features.extraConsoleCommands.v")
|
|
17
17
|
local v = ____v.default
|
|
18
|
+
function featureEnabled(self)
|
|
19
|
+
return initialized
|
|
20
|
+
end
|
|
18
21
|
function postUpdate(self)
|
|
19
22
|
if v.run.spamBloodRights then
|
|
20
23
|
local player = Isaac.GetPlayer()
|
|
21
24
|
player:UseActiveItem(CollectibleType.COLLECTIBLE_BLOOD_RIGHTS)
|
|
22
25
|
end
|
|
23
26
|
end
|
|
27
|
+
function evaluateCacheFireDelay(self, player)
|
|
28
|
+
if v.run.maxTears then
|
|
29
|
+
player.FireDelay = 1
|
|
30
|
+
end
|
|
31
|
+
end
|
|
24
32
|
function evaluateCacheSpeed(self, player)
|
|
25
33
|
if v.run.maxSpeed then
|
|
26
34
|
player.MoveSpeed = MAX_SPEED_STAT
|
|
@@ -32,6 +40,9 @@ function entityTakeDmgPlayer(self)
|
|
|
32
40
|
end
|
|
33
41
|
return nil
|
|
34
42
|
end
|
|
43
|
+
function postCurseEval(self, curses)
|
|
44
|
+
return v.persistent.disableCurses and LevelCurse.CURSE_NONE or curses
|
|
45
|
+
end
|
|
35
46
|
function executeCmd(self, command, params)
|
|
36
47
|
local commandFunction = getMapPartialMatch(nil, command, commandFunctionsMap)
|
|
37
48
|
if commandFunction == nil then
|
|
@@ -50,13 +61,15 @@ function postFireTear(self, tear)
|
|
|
50
61
|
end
|
|
51
62
|
end
|
|
52
63
|
commandFunctionsMap = __TS__New(Map)
|
|
53
|
-
|
|
64
|
+
initialized = false
|
|
54
65
|
function ____exports.enableExtraConsoleCommands(self, mod)
|
|
55
66
|
initialized = true
|
|
56
|
-
saveDataManager(nil, "extraConsoleCommands", v)
|
|
67
|
+
saveDataManager(nil, "extraConsoleCommands", v, featureEnabled)
|
|
57
68
|
mod:AddCallback(ModCallbacks.MC_POST_UPDATE, postUpdate)
|
|
69
|
+
mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, evaluateCacheFireDelay, CacheFlag.CACHE_FIREDELAY)
|
|
58
70
|
mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, evaluateCacheSpeed, CacheFlag.CACHE_SPEED)
|
|
59
71
|
mod:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.ENTITY_PLAYER)
|
|
72
|
+
mod:AddCallback(ModCallbacks.MC_POST_CURSE_EVAL, postCurseEval)
|
|
60
73
|
mod:AddCallback(ModCallbacks.MC_EXECUTE_CMD, executeCmd)
|
|
61
74
|
mod:AddCallback(ModCallbacks.MC_POST_FIRE_TEAR, postFireTear)
|
|
62
75
|
end
|
|
@@ -78,8 +91,10 @@ function ____exports.removeConsoleCommand(self, commandName)
|
|
|
78
91
|
end
|
|
79
92
|
commandFunctionsMap:delete(commandName)
|
|
80
93
|
end
|
|
94
|
+
commandFunctionsMap:set("addcharges", commands.addCharges)
|
|
81
95
|
commandFunctionsMap:set("angel", commands.angel)
|
|
82
96
|
commandFunctionsMap:set("ascent", commands.ascent)
|
|
97
|
+
commandFunctionsMap:set("bedroom", commands.bedroom)
|
|
83
98
|
commandFunctionsMap:set("bh", commands.bh)
|
|
84
99
|
commandFunctionsMap:set("blackhearts", commands.blackHearts)
|
|
85
100
|
commandFunctionsMap:set("blackmarket", commands.blackMarket)
|
|
@@ -88,6 +103,7 @@ commandFunctionsMap:set("bomb", commands.bomb)
|
|
|
88
103
|
commandFunctionsMap:set("bombs", commands.bombs)
|
|
89
104
|
commandFunctionsMap:set("bonehearts", commands.boneHearts)
|
|
90
105
|
commandFunctionsMap:set("boss", commands.boss)
|
|
106
|
+
commandFunctionsMap:set("bossrush", commands.bossRush)
|
|
91
107
|
commandFunctionsMap:set("bm", commands.bm)
|
|
92
108
|
commandFunctionsMap:set("brokenhearts", commands.brokenHearts)
|
|
93
109
|
commandFunctionsMap:set("card", commands.card)
|
|
@@ -95,6 +111,8 @@ commandFunctionsMap:set("cards", commands.cards)
|
|
|
95
111
|
commandFunctionsMap:set("cc", commands.cc)
|
|
96
112
|
commandFunctionsMap:set("chaoscardtears", commands.chaosCardTears)
|
|
97
113
|
commandFunctionsMap:set("character", commands.characterCommand)
|
|
114
|
+
commandFunctionsMap:set("charge", commands.charge)
|
|
115
|
+
commandFunctionsMap:set("cleanbedroom", commands.cleanBedroom)
|
|
98
116
|
commandFunctionsMap:set("coin", commands.coin)
|
|
99
117
|
commandFunctionsMap:set("coins", commands.coins)
|
|
100
118
|
commandFunctionsMap:set("crawlspace", commands.crawlspace)
|
|
@@ -103,21 +121,32 @@ commandFunctionsMap:set("d20", commands.d20)
|
|
|
103
121
|
commandFunctionsMap:set("damage", commands.damage)
|
|
104
122
|
commandFunctionsMap:set("dd", commands.dd)
|
|
105
123
|
commandFunctionsMap:set("devil", commands.devil)
|
|
124
|
+
commandFunctionsMap:set("dirtybedroom", commands.dirtyBedroom)
|
|
125
|
+
commandFunctionsMap:set("disablecurses", commands.disableCurses)
|
|
106
126
|
commandFunctionsMap:set("down", commands.down)
|
|
127
|
+
commandFunctionsMap:set("dungeon", commands.dungeon)
|
|
107
128
|
commandFunctionsMap:set("effects", commands.effects)
|
|
108
129
|
commandFunctionsMap:set("eh", commands.eh)
|
|
109
130
|
commandFunctionsMap:set("error", commands.error)
|
|
110
131
|
commandFunctionsMap:set("eternalhearts", commands.eternalHearts)
|
|
111
132
|
commandFunctionsMap:set("fool", commands.fool)
|
|
133
|
+
commandFunctionsMap:set("getposition", commands.getPosition)
|
|
134
|
+
commandFunctionsMap:set("gigabomb", commands.gigaBomb)
|
|
112
135
|
commandFunctionsMap:set("goldbomb", commands.goldBomb)
|
|
113
136
|
commandFunctionsMap:set("goldenbomb", commands.goldenBomb)
|
|
114
|
-
commandFunctionsMap:set("
|
|
137
|
+
commandFunctionsMap:set("goldenhearts", commands.goldenHearts)
|
|
115
138
|
commandFunctionsMap:set("goldenkey", commands.goldenKey)
|
|
139
|
+
commandFunctionsMap:set("goldhearts", commands.goldHearts)
|
|
140
|
+
commandFunctionsMap:set("goldkey", commands.goldKey)
|
|
141
|
+
commandFunctionsMap:set("grid", commands.grid)
|
|
142
|
+
commandFunctionsMap:set("grid2", commands.grid2)
|
|
116
143
|
commandFunctionsMap:set("h", commands.h)
|
|
117
144
|
commandFunctionsMap:set("hearts", commands.hearts)
|
|
145
|
+
commandFunctionsMap:set("hitboxes", commands.hitboxes)
|
|
118
146
|
commandFunctionsMap:set("iamerror", commands.IAMERROR)
|
|
119
147
|
commandFunctionsMap:set("key", commands.key)
|
|
120
148
|
commandFunctionsMap:set("keys", commands.keys)
|
|
149
|
+
commandFunctionsMap:set("library", commands.library)
|
|
121
150
|
commandFunctionsMap:set("list", commands.list)
|
|
122
151
|
commandFunctionsMap:set("listall", commands.listAll)
|
|
123
152
|
commandFunctionsMap:set("listgrid", commands.listGrid)
|
|
@@ -126,17 +155,25 @@ commandFunctionsMap:set("lowhp", commands.lowHP)
|
|
|
126
155
|
commandFunctionsMap:set("luck", commands.luck)
|
|
127
156
|
commandFunctionsMap:set("maxhearts", commands.maxHearts)
|
|
128
157
|
commandFunctionsMap:set("mh", commands.mh)
|
|
158
|
+
commandFunctionsMap:set("miniboss", commands.miniboss)
|
|
159
|
+
commandFunctionsMap:set("nocurses", commands.noCurses)
|
|
129
160
|
commandFunctionsMap:set("pill", commands.pill)
|
|
130
161
|
commandFunctionsMap:set("pills", commands.pills)
|
|
131
162
|
commandFunctionsMap:set("planetarium", commands.planetarium)
|
|
163
|
+
commandFunctionsMap:set("playsound", commands.playSound)
|
|
132
164
|
commandFunctionsMap:set("pocket", commands.pocket)
|
|
165
|
+
commandFunctionsMap:set("poopMana", commands.poopMana)
|
|
133
166
|
commandFunctionsMap:set("position", commands.positionCommand)
|
|
134
167
|
commandFunctionsMap:set("redhearts", commands.redHearts)
|
|
135
168
|
commandFunctionsMap:set("rh", commands.rh)
|
|
136
169
|
commandFunctionsMap:set("room", commands.roomCommand)
|
|
137
170
|
commandFunctionsMap:set("rottenhearts", commands.rottenHearts)
|
|
138
171
|
commandFunctionsMap:set("s", commands.s)
|
|
172
|
+
commandFunctionsMap:set("sacrifice", commands.sacrifice)
|
|
173
|
+
commandFunctionsMap:set("secret", commands.secret)
|
|
139
174
|
commandFunctionsMap:set("seeds", commands.seeds)
|
|
175
|
+
commandFunctionsMap:set("setcharges", commands.setCharges)
|
|
176
|
+
commandFunctionsMap:set("setposition", commands.setPosition)
|
|
140
177
|
commandFunctionsMap:set("sh", commands.sh)
|
|
141
178
|
commandFunctionsMap:set("shop", commands.shop)
|
|
142
179
|
commandFunctionsMap:set("smelt", commands.smelt)
|
|
@@ -145,9 +182,13 @@ commandFunctionsMap:set("soulhearts", commands.soulHearts)
|
|
|
145
182
|
commandFunctionsMap:set("sound", commands.sound)
|
|
146
183
|
commandFunctionsMap:set("sounds", commands.sounds)
|
|
147
184
|
commandFunctionsMap:set("spam", commands.spam)
|
|
185
|
+
commandFunctionsMap:set("spawngoldentrinket", commands.spawnGoldenTrinket)
|
|
148
186
|
commandFunctionsMap:set("speed", commands.speed)
|
|
187
|
+
commandFunctionsMap:set("supersecret", commands.superSecret)
|
|
149
188
|
commandFunctionsMap:set("startingroom", commands.startingRoom)
|
|
189
|
+
commandFunctionsMap:set("tears", commands.tears)
|
|
150
190
|
commandFunctionsMap:set("trapdoor", commands.trapdoorCommand)
|
|
151
191
|
commandFunctionsMap:set("treasure", commands.treasure)
|
|
152
|
-
commandFunctionsMap:set("
|
|
192
|
+
commandFunctionsMap:set("ultrasecret", commands.ultraSecret)
|
|
193
|
+
commandFunctionsMap:set("warp", commands.warp)
|
|
153
194
|
return ____exports
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
-
local v = {
|
|
3
|
+
local v = {persistent = {disableCurses = false}, run = {
|
|
4
|
+
chaosCardTears = false,
|
|
5
|
+
spamBloodRights = false,
|
|
6
|
+
maxDamage = false,
|
|
7
|
+
maxSpeed = false,
|
|
8
|
+
maxTears = false
|
|
9
|
+
}}
|
|
4
10
|
____exports.default = v
|
|
5
11
|
return ____exports
|