isaacscript-common 1.2.138 → 1.2.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/callbacks/postSlotRender.d.ts +1 -0
  2. package/dist/callbacks/postSlotRender.lua +73 -0
  3. package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts +2 -0
  4. package/dist/callbacks/subscriptions/postSlotAnimationChanged.lua +25 -0
  5. package/dist/constants.d.ts +2 -0
  6. package/dist/features/deployJSONRoom.lua +11 -22
  7. package/dist/features/disableInputs.lua +6 -20
  8. package/dist/features/disableSound.lua +4 -12
  9. package/dist/features/extraConsoleCommands/commands.d.ts +88 -4
  10. package/dist/features/extraConsoleCommands/commands.lua +357 -71
  11. package/dist/features/extraConsoleCommands/init.lua +52 -9
  12. package/dist/features/extraConsoleCommands/v.d.ts +5 -1
  13. package/dist/features/extraConsoleCommands/v.lua +7 -1
  14. package/dist/features/forgottenSwitch.lua +3 -8
  15. package/dist/features/getCollectibleItemPoolType.lua +4 -9
  16. package/dist/features/isPonyActive.lua +3 -8
  17. package/dist/features/preventCollectibleRotate.lua +3 -8
  18. package/dist/features/runInNFrames.lua +6 -20
  19. package/dist/features/saveDataManager/constants.d.ts +3 -0
  20. package/dist/features/saveDataManager/constants.lua +5 -0
  21. package/dist/features/saveDataManager/exports.lua +9 -18
  22. package/dist/features/saveDataManager/load.lua +4 -3
  23. package/dist/features/saveDataManager/main.lua +4 -10
  24. package/dist/features/saveDataManager/merge.lua +2 -2
  25. package/dist/features/saveDataManager/save.lua +3 -1
  26. package/dist/features/sirenHelpers.lua +4 -8
  27. package/dist/featuresInitialized.d.ts +1 -1
  28. package/dist/featuresInitialized.lua +5 -0
  29. package/dist/functions/cards.lua +12 -18
  30. package/dist/functions/challenges.lua +3 -2
  31. package/dist/functions/collectibles.lua +8 -14
  32. package/dist/functions/deepCopy.lua +2 -2
  33. package/dist/functions/log.lua +3 -0
  34. package/dist/functions/map.d.ts +4 -1
  35. package/dist/functions/map.lua +5 -1
  36. package/dist/functions/pills.lua +10 -15
  37. package/dist/functions/player.d.ts +2 -0
  38. package/dist/functions/player.lua +37 -81
  39. package/dist/functions/rooms.lua +4 -5
  40. package/dist/functions/transformations.lua +3 -3
  41. package/dist/functions/trinkets.lua +8 -14
  42. package/dist/index.d.ts +2 -0
  43. package/dist/index.lua +16 -0
  44. package/dist/maps/cardDescriptionMap.d.ts +4 -1
  45. package/dist/maps/cardDescriptionMap.lua +103 -102
  46. package/dist/maps/cardNameMap.d.ts +4 -1
  47. package/dist/maps/cardNameMap.lua +103 -102
  48. package/dist/maps/cardTypeMap.d.ts +3 -1
  49. package/dist/maps/cardTypeMap.lua +102 -102
  50. package/dist/maps/challengeNameMap.d.ts +4 -1
  51. package/dist/maps/challengeNameMap.lua +50 -50
  52. package/dist/maps/characterNameMap.d.ts +5 -0
  53. package/dist/maps/characterNameMap.lua +49 -0
  54. package/dist/maps/collectibleDescriptionMap.d.ts +1 -0
  55. package/dist/maps/collectibleDescriptionMap.lua +1 -0
  56. package/dist/maps/collectibleNameMap.d.ts +1 -0
  57. package/dist/maps/collectibleNameMap.lua +1 -0
  58. package/dist/maps/pillEffectClassMap.d.ts +4 -1
  59. package/dist/maps/pillEffectClassMap.lua +56 -55
  60. package/dist/maps/pillEffectNameMap.d.ts +4 -1
  61. package/dist/maps/pillEffectNameMap.lua +55 -55
  62. package/dist/maps/pillEffectTypeMap.d.ts +4 -1
  63. package/dist/maps/pillEffectTypeMap.lua +55 -55
  64. package/dist/maps/roomTypeMap.d.ts +3 -0
  65. package/dist/maps/roomTypeMap.lua +43 -0
  66. package/dist/maps/roomTypeNameMap.d.ts +5 -0
  67. package/dist/maps/roomTypeNameMap.lua +37 -0
  68. package/dist/maps/transformationNameMap.d.ts +4 -1
  69. package/dist/maps/transformationNameMap.lua +19 -20
  70. package/dist/maps/trinketDescriptionMap.d.ts +1 -0
  71. package/dist/maps/trinketDescriptionMap.lua +1 -0
  72. package/dist/maps/trinketNameMap.d.ts +1 -0
  73. package/dist/maps/trinketNameMap.lua +1 -0
  74. package/dist/types/CallbackParametersCustom.d.ts +5 -0
  75. package/dist/types/CardType.d.ts +10 -8
  76. package/dist/types/CardType.lua +9 -7
  77. package/dist/types/ModCallbacksCustom.d.ts +10 -9
  78. package/dist/types/ModCallbacksCustom.lua +11 -9
  79. package/dist/types/ModUpgraded.lua +8 -0
  80. package/dist/types/PillEffectClass.d.ts +11 -5
  81. package/dist/types/PillEffectClass.lua +8 -5
  82. package/dist/types/PillEffectType.d.ts +10 -4
  83. package/dist/types/PillEffectType.lua +7 -4
  84. package/dist/upgradeMod.lua +3 -3
  85. 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,9 @@ 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
14
+ local ____cards = require("functions.cards")
15
+ local getCardName = ____cards.getCardName
12
16
  local ____gridEntity = require("functions.gridEntity")
13
17
  local spawnGridEntityWithVariant = ____gridEntity.spawnGridEntityWithVariant
14
18
  local ____log = require("functions.log")
@@ -22,7 +26,10 @@ local ____map = require("functions.map")
22
26
  local getMapPartialMatch = ____map.getMapPartialMatch
23
27
  local ____npc = require("functions.npc")
24
28
  local getNPCs = ____npc.getNPCs
29
+ local ____pills = require("functions.pills")
30
+ local getPillEffectName = ____pills.getPillEffectName
25
31
  local ____player = require("functions.player")
32
+ local getCharacterName = ____player.getCharacterName
26
33
  local getPlayers = ____player.getPlayers
27
34
  local useActiveItemTemp = ____player.useActiveItemTemp
28
35
  local ____playerHealth = require("functions.playerHealth")
@@ -44,6 +51,11 @@ local ____characterMap = require("maps.characterMap")
44
51
  local CHARACTER_MAP = ____characterMap.CHARACTER_MAP
45
52
  local ____pillEffectMap = require("maps.pillEffectMap")
46
53
  local PILL_EFFECT_MAP = ____pillEffectMap.PILL_EFFECT_MAP
54
+ local ____roomTypeMap = require("maps.roomTypeMap")
55
+ local ROOM_TYPE_MAP = ____roomTypeMap.ROOM_TYPE_MAP
56
+ local ____roomTypeNameMap = require("maps.roomTypeNameMap")
57
+ local DEFAULT_ROOM_TYPE_NAME = ____roomTypeNameMap.DEFAULT_ROOM_TYPE_NAME
58
+ local ROOM_TYPE_NAME_MAP = ____roomTypeNameMap.ROOM_TYPE_NAME_MAP
47
59
  local ____HealthType = require("types.HealthType")
48
60
  local HealthType = ____HealthType.HealthType
49
61
  local ____v = require("features.extraConsoleCommands.v")
@@ -65,10 +77,6 @@ function ____exports.goldenBomb(self)
65
77
  local player = Isaac.GetPlayer()
66
78
  player:AddGoldenBomb()
67
79
  end
68
- function ____exports.goldenKey(self)
69
- local player = Isaac.GetPlayer()
70
- player:AddGoldenKey()
71
- end
72
80
  function ____exports.hearts(self, params)
73
81
  addHeart(nil, params, HealthType.RED)
74
82
  end
@@ -78,6 +86,14 @@ end
78
86
  function ____exports.soulHearts(self, params)
79
87
  addHeart(nil, params, HealthType.SOUL)
80
88
  end
89
+ function ____exports.sound(self, params)
90
+ local soundEffect = tonumber(params)
91
+ if soundEffect == nil then
92
+ printConsole(nil, "That is an invalid sound effect ID.")
93
+ return
94
+ end
95
+ sfxManager:Play(soundEffect)
96
+ end
81
97
  function ____exports.startingRoom(self)
82
98
  local level = game:GetLevel()
83
99
  local startingRoomIndex = level:GetStartingRoomIndex()
@@ -165,7 +181,14 @@ function spawnTrapdoorOrCrawlspace(self, trapdoor)
165
181
  local gridEntityType = trapdoor and GridEntityType.GRID_TRAPDOOR or GridEntityType.GRID_STAIRS
166
182
  spawnGridEntityWithVariant(nil, gridEntityType, 0, gridIndex)
167
183
  end
168
- function warpToRoomType(self, roomType, roomTypeName)
184
+ function warpToRoomType(self, roomType)
185
+ local roomTypeName = ROOM_TYPE_NAME_MAP[roomType]
186
+ if roomTypeName == nil or roomTypeName == DEFAULT_ROOM_TYPE_NAME then
187
+ printConsole(
188
+ nil,
189
+ "Invalid room type: " .. tostring(roomType)
190
+ )
191
+ end
169
192
  local gridIndexes = getRoomGridIndexesForType(nil, roomType)
170
193
  if #gridIndexes == 0 then
171
194
  printConsole(nil, ("There are no " .. roomTypeName) .. "s on this floor.")
@@ -173,8 +196,49 @@ function warpToRoomType(self, roomType, roomTypeName)
173
196
  end
174
197
  local firstGridIndex = gridIndexes[1]
175
198
  changeRoom(nil, firstGridIndex)
199
+ printConsole(
200
+ nil,
201
+ ((("Warped to room type: " .. roomTypeName) .. " (") .. tostring(roomType)) .. ")"
202
+ )
176
203
  end
177
204
  DEFAULT_MOVE_UNITS = 0.5
205
+ function ____exports.addCharges(self, params)
206
+ if params == "" then
207
+ 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.)")
208
+ return
209
+ end
210
+ local args = __TS__StringSplit(params, " ")
211
+ if #args ~= 1 and #args ~= 2 then
212
+ printConsole(nil, "That is an invalid amount of arguments.")
213
+ return
214
+ end
215
+ local activeSlotString, chargeString = table.unpack(args)
216
+ local activeSlot = tonumber(activeSlotString)
217
+ if activeSlot == nil then
218
+ printConsole(nil, "The provided slot number is invalid: " .. activeSlotString)
219
+ return
220
+ end
221
+ if activeSlot < ActiveSlot.SLOT_PRIMARY or activeSlot > ActiveSlot.SLOT_POCKET2 then
222
+ printConsole(
223
+ nil,
224
+ "The provided slot number is invalid: " .. tostring(activeSlot)
225
+ )
226
+ return
227
+ end
228
+ local chargeNum = 1
229
+ if chargeString ~= nil then
230
+ local chargeNumAttempt = tonumber(chargeString)
231
+ if chargeNumAttempt == nil then
232
+ printConsole(nil, "The provided charge amount is invalid: " .. chargeString)
233
+ return
234
+ end
235
+ chargeNum = chargeNumAttempt
236
+ end
237
+ local player = Isaac.GetPlayer()
238
+ local currentCharge = player:GetActiveCharge(activeSlot)
239
+ local newCharge = currentCharge + chargeNum
240
+ player:SetActiveCharge(newCharge, activeSlot)
241
+ end
178
242
  function ____exports.angel(self)
179
243
  devilAngel(nil, false)
180
244
  end
@@ -183,6 +247,19 @@ function ____exports.ascent(self)
183
247
  game:SetStateFlag(GameStateFlag.STATE_BACKWARDS_PATH, true)
184
248
  printConsole(nil, "Set Ascent flags.")
185
249
  end
250
+ function ____exports.bedroom(self)
251
+ local cleanBedroomGridIndexes = getRoomGridIndexesForType(nil, RoomType.ROOM_ISAACS)
252
+ if #cleanBedroomGridIndexes > 0 then
253
+ warpToRoomType(nil, RoomType.ROOM_ISAACS)
254
+ return
255
+ end
256
+ local dirtyBedroomGridIndexes = getRoomGridIndexesForType(nil, RoomType.ROOM_BARREN)
257
+ if #dirtyBedroomGridIndexes > 0 then
258
+ warpToRoomType(nil, RoomType.ROOM_BARREN)
259
+ return
260
+ end
261
+ printConsole(nil, "There are no Clean Bedrooms or Dirty Bedrooms on this floor.")
262
+ end
186
263
  function ____exports.bh(self, params)
187
264
  ____exports.blackHearts(nil, params)
188
265
  end
@@ -232,7 +309,10 @@ function ____exports.boneHearts(self, params)
232
309
  addHeart(nil, params, HealthType.BONE)
233
310
  end
234
311
  function ____exports.boss(self)
235
- warpToRoomType(nil, RoomType.ROOM_BOSS, "Boss Room")
312
+ warpToRoomType(nil, RoomType.ROOM_BOSS)
313
+ end
314
+ function ____exports.bossRush(self)
315
+ changeRoom(nil, GridRooms.ROOM_BOSSRUSH_IDX)
236
316
  end
237
317
  function ____exports.bm(self)
238
318
  ____exports.blackMarket(nil)
@@ -245,28 +325,30 @@ function ____exports.card(self, params)
245
325
  printConsole(nil, "You must specify a card name or number.")
246
326
  return
247
327
  end
328
+ local cardNum
248
329
  local num = tonumber(params)
249
- if num ~= nil then
330
+ if num == nil then
331
+ local match = getMapPartialMatch(nil, params, CARD_MAP)
332
+ if match == nil then
333
+ printConsole(nil, "Unknown card: " .. params)
334
+ return
335
+ end
336
+ cardNum = match[2]
337
+ else
250
338
  if num < 1 or num >= Card.NUM_CARDS then
251
- printConsole(nil, "That is an invalid card sub-type.")
339
+ printConsole(
340
+ nil,
341
+ "Invalid card sub-type: " .. tostring(num)
342
+ )
252
343
  return
253
344
  end
254
- Isaac.ExecuteCommand("g k" .. tostring(num))
255
- printConsole(
256
- nil,
257
- "Gave card: " .. tostring(num)
258
- )
259
- return
260
- end
261
- local match = getMapPartialMatch(nil, params, CARD_MAP)
262
- if match == nil then
263
- printConsole(nil, "Unknown card: " .. params)
264
- return
345
+ cardNum = num
265
346
  end
266
- Isaac.ExecuteCommand("g k" .. tostring(match))
347
+ local cardName = getCardName(nil, cardNum)
348
+ Isaac.ExecuteCommand("g k" .. tostring(cardNum))
267
349
  printConsole(
268
350
  nil,
269
- "Gave card: " .. tostring(match)
351
+ ((("Gave card: " .. cardName) .. " (") .. tostring(cardNum)) .. ")"
270
352
  )
271
353
  end
272
354
  function ____exports.cards(self)
@@ -305,30 +387,38 @@ function ____exports.characterCommand(self, params)
305
387
  printConsole(nil, "You must specify a character name or number.")
306
388
  return
307
389
  end
390
+ local character
308
391
  local num = tonumber(params)
309
- if num ~= nil then
392
+ if num == nil then
393
+ local match = getMapPartialMatch(nil, params, CHARACTER_MAP)
394
+ if match == nil then
395
+ printConsole(nil, "Unknown character: " .. params)
396
+ return
397
+ end
398
+ character = match[2]
399
+ else
310
400
  if num < 0 or num >= PlayerType.NUM_PLAYER_TYPES then
311
- printConsole(nil, "That is an invalid player sub-type.")
401
+ printConsole(
402
+ nil,
403
+ "Invalid player sub-type: " .. tostring(num)
404
+ )
312
405
  return
313
406
  end
314
- printConsole(
315
- nil,
316
- "Restarting as character: " .. tostring(num)
317
- )
318
- restart(nil, num)
319
- return
320
- end
321
- local match = getMapPartialMatch(nil, params, CHARACTER_MAP)
322
- if match == nil then
323
- printConsole(nil, "Unknown character: " .. params)
324
- return
407
+ character = num
325
408
  end
326
- restart(nil, match)
409
+ local characterName = getCharacterName(nil, character)
410
+ restart(nil, character)
327
411
  printConsole(
328
412
  nil,
329
- "Restarting as character: " .. tostring(match)
413
+ ((("Restarting as character: " .. characterName) .. " (") .. tostring(character)) .. ")"
330
414
  )
331
415
  end
416
+ function ____exports.charge(self, params)
417
+ ____exports.addCharges(nil, params)
418
+ end
419
+ function ____exports.cleanBedroom(self)
420
+ warpToRoomType(nil, RoomType.ROOM_ISAACS)
421
+ end
332
422
  function ____exports.coin(self, params)
333
423
  local numCoins = 1
334
424
  if params ~= "" then
@@ -373,9 +463,19 @@ end
373
463
  function ____exports.dd(self)
374
464
  ____exports.devil(nil)
375
465
  end
466
+ function ____exports.dirtyBedroom(self)
467
+ warpToRoomType(nil, RoomType.ROOM_BARREN)
468
+ end
469
+ function ____exports.disableCurses(self)
470
+ v.persistent.disableCurses = not v.persistent.disableCurses
471
+ printEnabled(nil, not v.persistent.disableCurses, "curses")
472
+ end
376
473
  function ____exports.down(self, params)
377
474
  movePlayer(nil, params, Direction.DOWN)
378
475
  end
476
+ function ____exports.dungeon(self)
477
+ changeRoom(nil, GridRooms.ROOM_DUNGEON_IDX)
478
+ end
379
479
  function ____exports.effects(self)
380
480
  local player = Isaac.GetPlayer()
381
481
  logTemporaryEffects(player)
@@ -390,15 +490,56 @@ end
390
490
  function ____exports.fool(self)
391
491
  ____exports.startingRoom(nil)
392
492
  end
493
+ function ____exports.getPosition(self)
494
+ for ____, player in ipairs(getPlayers(nil)) do
495
+ local character = player:GetPlayerType()
496
+ printConsole(
497
+ nil,
498
+ ((((("Player position for character " .. tostring(character)) .. ": (") .. tostring(player.Position.X)) .. ", ") .. tostring(player.Position.Y)) .. ")"
499
+ )
500
+ end
501
+ end
502
+ function ____exports.gigaBomb(self, params)
503
+ local numBombs = 1
504
+ if params ~= "" then
505
+ local num = tonumber(params)
506
+ if num == nil then
507
+ printConsole(nil, "That is an invalid amount of Giga Bombs to add.")
508
+ return
509
+ end
510
+ numBombs = num
511
+ end
512
+ local player = Isaac.GetPlayer()
513
+ player:AddGigaBombs(numBombs)
514
+ end
393
515
  function ____exports.goldBomb(self)
394
516
  ____exports.goldenBomb(nil)
395
517
  end
518
+ function ____exports.goldenHearts(self, params)
519
+ addHeart(nil, params, HealthType.GOLDEN)
520
+ end
521
+ function ____exports.goldenKey(self)
522
+ local player = Isaac.GetPlayer()
523
+ player:AddGoldenKey()
524
+ end
525
+ function ____exports.goldHearts(self, params)
526
+ ____exports.goldenHearts(nil, params)
527
+ end
396
528
  function ____exports.goldKey(self)
397
529
  ____exports.goldenKey(nil)
398
530
  end
531
+ function ____exports.grid(self)
532
+ Isaac.ExecuteCommand("debug 2")
533
+ end
534
+ function ____exports.grid2(self)
535
+ Isaac.ExecuteCommand("debug 11")
536
+ end
399
537
  function ____exports.h(self, params)
400
538
  ____exports.hearts(nil, params)
401
539
  end
540
+ function ____exports.hitboxes(self)
541
+ Isaac.ExecuteCommand("debug 6")
542
+ end
402
543
  function ____exports.key(self, params)
403
544
  local numKeys = 1
404
545
  if params ~= "" then
@@ -425,6 +566,9 @@ function ____exports.keys(self, params)
425
566
  local player = Isaac.GetPlayer()
426
567
  player:AddKeys(numKeys)
427
568
  end
569
+ function ____exports.library(self)
570
+ warpToRoomType(nil, RoomType.ROOM_LIBRARY)
571
+ end
428
572
  function ____exports.list(self, params)
429
573
  listEntities(nil, params, false)
430
574
  end
@@ -452,33 +596,41 @@ end
452
596
  function ____exports.mh(self, params)
453
597
  ____exports.maxHearts(nil, params)
454
598
  end
599
+ function ____exports.miniboss(self)
600
+ warpToRoomType(nil, RoomType.ROOM_MINIBOSS)
601
+ end
602
+ function ____exports.noCurses(self)
603
+ ____exports.disableCurses(nil)
604
+ end
455
605
  function ____exports.pill(self, params)
456
606
  if params == "" then
457
607
  printConsole(nil, "You must specify a pill name or number.")
458
608
  return
459
609
  end
610
+ local pillEffect
460
611
  local num = tonumber(params)
461
- if num ~= nil then
612
+ if num == nil then
613
+ local match = getMapPartialMatch(nil, params, PILL_EFFECT_MAP)
614
+ if match == nil then
615
+ printConsole(nil, "Unknown pill effect: " .. params)
616
+ return
617
+ end
618
+ pillEffect = match[2]
619
+ else
462
620
  if num < 1 or num >= PillEffect.NUM_PILL_EFFECTS then
463
- printConsole(nil, "That is an invalid pill effect ID.")
621
+ printConsole(
622
+ nil,
623
+ "Invalid pill effect ID: " .. tostring(num)
624
+ )
464
625
  return
465
626
  end
466
- Isaac.ExecuteCommand("g p" .. tostring(num))
467
- printConsole(
468
- nil,
469
- "Gave pill: " .. tostring(num)
470
- )
471
- return
472
- end
473
- local match = getMapPartialMatch(nil, params, PILL_EFFECT_MAP)
474
- if match == nil then
475
- printConsole(nil, "Unknown pill effect: " .. params)
476
- return
627
+ pillEffect = num
477
628
  end
478
- Isaac.ExecuteCommand("g p" .. tostring(match))
629
+ local pillEffectName = getPillEffectName(nil, pillEffect)
630
+ Isaac.ExecuteCommand("g p" .. tostring(pillEffect))
479
631
  printConsole(
480
632
  nil,
481
- "Gave pill: " .. tostring(match)
633
+ ((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")"
482
634
  )
483
635
  end
484
636
  function ____exports.pills(self)
@@ -517,7 +669,10 @@ function ____exports.pills(self)
517
669
  end
518
670
  end
519
671
  function ____exports.planetarium(self)
520
- warpToRoomType(nil, RoomType.ROOM_PLANETARIUM, "Planetarium")
672
+ warpToRoomType(nil, RoomType.ROOM_PLANETARIUM)
673
+ end
674
+ function ____exports.playSound(self, params)
675
+ ____exports.sound(nil, params)
521
676
  end
522
677
  function ____exports.pocket(self, params)
523
678
  if params == "" then
@@ -532,14 +687,21 @@ function ____exports.pocket(self, params)
532
687
  local player = Isaac.GetPlayer()
533
688
  player:SetPocketActiveItem(num, ActiveSlot.SLOT_POCKET)
534
689
  end
535
- function ____exports.positionCommand(self)
536
- for ____, player in ipairs(getPlayers(nil)) do
537
- local character = player:GetPlayerType()
538
- printConsole(
539
- nil,
540
- ((((("Player position for character " .. tostring(character)) .. ": (") .. tostring(player.Position.X)) .. ", ") .. tostring(player.Position.Y)) .. ")"
541
- )
690
+ function ____exports.poopMana(self, params)
691
+ local charges = 1
692
+ if params ~= "" then
693
+ local num = tonumber(params)
694
+ if num == nil then
695
+ printConsole(nil, "That is an invalid amount of mana to add.")
696
+ return
697
+ end
698
+ charges = num
542
699
  end
700
+ local player = Isaac.GetPlayer()
701
+ player:AddPoopMana(charges)
702
+ end
703
+ function ____exports.positionCommand(self)
704
+ ____exports.getPosition(nil)
543
705
  end
544
706
  function ____exports.redHearts(self, params)
545
707
  ____exports.hearts(nil, params)
@@ -587,15 +749,88 @@ function ____exports.s(self, params)
587
749
  end
588
750
  Isaac.ExecuteCommand(("stage " .. tostring(stage)) .. stageTypeLetter)
589
751
  end
752
+ function ____exports.sacrifice(self)
753
+ warpToRoomType(nil, RoomType.ROOM_SACRIFICE)
754
+ end
755
+ function ____exports.secret(self)
756
+ warpToRoomType(nil, RoomType.ROOM_SECRET)
757
+ end
590
758
  function ____exports.seeds(self)
591
759
  logAllSeedEffects()
592
760
  printConsole(nil, "Logged the seed effects to the \"log.txt\" file.")
593
761
  end
762
+ function ____exports.setCharges(self, params)
763
+ if params == "" then
764
+ 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.)")
765
+ return
766
+ end
767
+ local args = __TS__StringSplit(params, " ")
768
+ if #args == 1 then
769
+ printConsole(nil, "You must specify the amount of charge to set.")
770
+ return
771
+ end
772
+ if #args ~= 2 then
773
+ printConsole(nil, "That is an invalid amount of arguments.")
774
+ return
775
+ end
776
+ local activeSlotString, chargeString = table.unpack(args)
777
+ local activeSlot = tonumber(activeSlotString)
778
+ if activeSlot == nil then
779
+ printConsole(nil, "The provided slot number is invalid: " .. activeSlotString)
780
+ return
781
+ end
782
+ if activeSlot < ActiveSlot.SLOT_PRIMARY or activeSlot > ActiveSlot.SLOT_POCKET2 then
783
+ printConsole(
784
+ nil,
785
+ "The provided slot number is invalid: " .. tostring(activeSlot)
786
+ )
787
+ return
788
+ end
789
+ local chargeNum = tonumber(chargeString)
790
+ if chargeNum == nil then
791
+ printConsole(nil, "The provided charge amount is invalid: " .. chargeString)
792
+ return
793
+ end
794
+ if chargeNum < 0 then
795
+ printConsole(
796
+ nil,
797
+ "The provided charge amount is invalid: " .. tostring(chargeNum)
798
+ )
799
+ return
800
+ end
801
+ local player = Isaac.GetPlayer()
802
+ player:SetActiveCharge(chargeNum, activeSlot)
803
+ end
804
+ function ____exports.setPosition(self, params)
805
+ if params == "" then
806
+ printConsole(nil, "You must specify a position. (e.g. \"setposition 100 50\")")
807
+ return
808
+ end
809
+ local args = __TS__StringSplit(params, " ")
810
+ if #args ~= 2 then
811
+ printConsole(nil, "You must specify a position. (e.g. \"setposition 100 50\")")
812
+ return
813
+ end
814
+ local xString, yString = table.unpack(args)
815
+ local x = tonumber(xString)
816
+ if x == nil then
817
+ printConsole(nil, "That is an invalid x value: " .. xString)
818
+ return
819
+ end
820
+ local y = tonumber(yString)
821
+ if y == nil then
822
+ printConsole(nil, "That is an invalid y value: " .. yString)
823
+ return
824
+ end
825
+ local player = Isaac.GetPlayer()
826
+ local position = Vector(x, y)
827
+ player.Position = position
828
+ end
594
829
  function ____exports.sh(self, params)
595
830
  ____exports.soulHearts(nil, params)
596
831
  end
597
832
  function ____exports.shop(self)
598
- warpToRoomType(nil, RoomType.ROOM_SHOP, "shop")
833
+ warpToRoomType(nil, RoomType.ROOM_SHOP)
599
834
  end
600
835
  function ____exports.smelt(self)
601
836
  local player = Isaac.GetPlayer()
@@ -614,20 +849,35 @@ function ____exports.soulCharges(self, params)
614
849
  local player = Isaac.GetPlayer()
615
850
  player:AddSoulCharge(charges)
616
851
  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
852
  function ____exports.sounds(self)
626
853
  logSounds()
627
854
  printConsole(nil, "Logged the currently playing sound effects to the \"log.txt\" file.")
628
855
  end
629
856
  function ____exports.spam(self)
630
857
  v.run.spamBloodRights = not v.run.spamBloodRights
858
+ printEnabled(nil, v.run.maxSpeed, "spamming Blood Rights")
859
+ end
860
+ function ____exports.spawnGoldenTrinket(self, params)
861
+ if params == "" then
862
+ printConsole(nil, "You must specify the number corresponding to the trinket type.")
863
+ return
864
+ end
865
+ local trinketType = tonumber(params)
866
+ if trinketType == nil then
867
+ printConsole(nil, "That is an invalid trinket type: " .. params)
868
+ return
869
+ end
870
+ local goldenTrinketType = trinketType + TRINKET_GOLDEN_FLAG
871
+ local room = game:GetRoom()
872
+ local centerPos = room:GetCenterPos()
873
+ Isaac.Spawn(
874
+ EntityType.ENTITY_PICKUP,
875
+ PickupVariant.PICKUP_TRINKET,
876
+ goldenTrinketType,
877
+ centerPos,
878
+ Vector.Zero,
879
+ nil
880
+ )
631
881
  end
632
882
  function ____exports.speed(self)
633
883
  local player = Isaac.GetPlayer()
@@ -646,13 +896,49 @@ function ____exports.speed(self)
646
896
  player:EvaluateItems()
647
897
  printEnabled(nil, v.run.maxSpeed, "max speed")
648
898
  end
899
+ function ____exports.superSecret(self)
900
+ warpToRoomType(nil, RoomType.ROOM_SUPERSECRET)
901
+ end
902
+ function ____exports.tears(self)
903
+ v.run.maxTears = not v.run.maxTears
904
+ local player = Isaac.GetPlayer()
905
+ player:AddCacheFlags(CacheFlag.CACHE_FIREDELAY)
906
+ player:EvaluateItems()
907
+ printEnabled(nil, v.run.maxDamage, "debug tear-rate")
908
+ end
649
909
  function ____exports.trapdoorCommand(self)
650
910
  spawnTrapdoorOrCrawlspace(nil, true)
651
911
  end
652
912
  function ____exports.treasure(self)
653
- warpToRoomType(nil, RoomType.ROOM_TREASURE, "Treasure Room")
913
+ warpToRoomType(nil, RoomType.ROOM_TREASURE)
654
914
  end
655
- function ____exports.ultra(self)
656
- warpToRoomType(nil, RoomType.ROOM_ULTRASECRET, "Ultra Secret Room")
915
+ function ____exports.ultraSecret(self)
916
+ warpToRoomType(nil, RoomType.ROOM_ULTRASECRET)
917
+ end
918
+ function ____exports.warp(self, params)
919
+ if params == "" then
920
+ printConsole(nil, "You must specify a room type name or number.")
921
+ return
922
+ end
923
+ local roomType
924
+ local num = tonumber(params)
925
+ if num == nil then
926
+ local match = getMapPartialMatch(nil, params, ROOM_TYPE_MAP)
927
+ if match == nil then
928
+ printConsole(nil, "Unknown room type: " .. params)
929
+ return
930
+ end
931
+ roomType = match[2]
932
+ else
933
+ if num < 1 or num >= RoomType.NUM_ROOMTYPES then
934
+ printConsole(
935
+ nil,
936
+ "Invalid room type: " .. tostring(num)
937
+ )
938
+ return
939
+ end
940
+ roomType = num
941
+ end
942
+ warpToRoomType(nil, roomType)
657
943
  end
658
944
  return ____exports