isaacscript-common 59.4.0 → 59.5.0

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 (53) hide show
  1. package/dist/index.rollup.d.ts +86 -1
  2. package/dist/isaacscript-common.lua +160 -50
  3. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  4. package/dist/src/classes/ModUpgraded.lua +2 -2
  5. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -1
  6. package/dist/src/classes/callbacks/PostCursedTeleport.lua +3 -2
  7. package/dist/src/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
  8. package/dist/src/classes/callbacks/PostPickupInitFirst.d.ts.map +1 -1
  9. package/dist/src/classes/callbacks/PostPickupInitFirst.lua +3 -5
  10. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
  11. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +5 -5
  12. package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  13. package/dist/src/classes/features/other/CustomTrapdoors.lua +10 -12
  14. package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
  15. package/dist/src/classes/features/other/PickupIndexCreation.lua +3 -2
  16. package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts.map +1 -1
  17. package/dist/src/classes/features/other/PreventCollectibleRotation.lua +3 -2
  18. package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -1
  19. package/dist/src/classes/features/other/SaveDataManager.lua +3 -4
  20. package/dist/src/classes/features/other/customStages/streakText.d.ts.map +1 -1
  21. package/dist/src/classes/features/other/customStages/streakText.lua +6 -5
  22. package/dist/src/functions/challenges.d.ts.map +1 -1
  23. package/dist/src/functions/challenges.lua +8 -2
  24. package/dist/src/functions/debugFunctions.d.ts +7 -1
  25. package/dist/src/functions/debugFunctions.d.ts.map +1 -1
  26. package/dist/src/functions/debugFunctions.lua +22 -16
  27. package/dist/src/functions/frames.d.ts +68 -0
  28. package/dist/src/functions/frames.d.ts.map +1 -0
  29. package/dist/src/functions/frames.lua +119 -0
  30. package/dist/src/functions/revive.d.ts.map +1 -1
  31. package/dist/src/functions/revive.lua +3 -4
  32. package/dist/src/functions/run.d.ts.map +1 -1
  33. package/dist/src/functions/run.lua +3 -1
  34. package/dist/src/index.d.ts +1 -0
  35. package/dist/src/index.d.ts.map +1 -1
  36. package/dist/src/index.lua +8 -0
  37. package/package.json +1 -1
  38. package/src/classes/ModUpgraded.ts +2 -3
  39. package/src/classes/callbacks/PostCursedTeleport.ts +2 -2
  40. package/src/classes/callbacks/PostItemDischarge.ts +2 -0
  41. package/src/classes/callbacks/PostPickupInitFirst.ts +2 -4
  42. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +4 -6
  43. package/src/classes/features/other/CustomTrapdoors.ts +11 -14
  44. package/src/classes/features/other/PickupIndexCreation.ts +2 -2
  45. package/src/classes/features/other/PreventCollectibleRotation.ts +2 -3
  46. package/src/classes/features/other/SaveDataManager.ts +2 -3
  47. package/src/classes/features/other/customStages/streakText.ts +10 -6
  48. package/src/functions/challenges.ts +11 -2
  49. package/src/functions/debugFunctions.ts +10 -1
  50. package/src/functions/frames.ts +172 -0
  51. package/src/functions/revive.ts +2 -3
  52. package/src/functions/run.ts +3 -1
  53. package/src/index.ts +1 -0
@@ -5487,6 +5487,19 @@ export declare function getEffects(effectVariant?: EffectVariant | -1, subType?:
5487
5487
  */
5488
5488
  export declare function getEffectsList(player: EntityPlayer): TemporaryEffect[];
5489
5489
 
5490
+ export declare function getElapsedGameFramesSince(gameFrameCount: int): int;
5491
+
5492
+ export declare function getElapsedRenderFramesSince(renderFrameCount: int): int;
5493
+
5494
+ export declare function getElapsedRoomFramesSince(roomFrameCount: int): int;
5495
+
5496
+ /**
5497
+ * Helper function to get the amount of elapsed time for benchmarking / profiling purposes.
5498
+ *
5499
+ * For more information, see the documentation for the `getTime` helper function.
5500
+ */
5501
+ export declare function getElapsedTimeSince(time: int | float): int;
5502
+
5490
5503
  /**
5491
5504
  * Helper function to get all of the entities in the room or all of the entities that match a
5492
5505
  * specific entity type / variant / sub-type.
@@ -7695,7 +7708,7 @@ export declare function getTeleporters(variant?: number): GridEntity[];
7695
7708
  * Default is true. If set to false, the `Isaac.GetTime()` method will
7696
7709
  * always be used.
7697
7710
  */
7698
- export declare function getTime(useSocketIfAvailable?: boolean): float;
7711
+ export declare function getTime(useSocketIfAvailable?: boolean): int | float;
7699
7712
 
7700
7713
  /** Helper function to get all of the `GridEntityTNT` in the room. */
7701
7714
  export declare function getTNT(variant?: number): GridEntityTNT[];
@@ -9376,6 +9389,30 @@ export declare function isOdd(num: int): boolean;
9376
9389
  */
9377
9390
  export declare function isPassiveOrFamiliarCollectible(collectibleOrCollectibleType: EntityPickup | CollectibleType): boolean;
9378
9391
 
9392
+ /**
9393
+ * Helper function to check if the current game frame count is higher than a specific game frame
9394
+ * count.
9395
+ *
9396
+ * This returns false if the submitted game frame count is null or undefined.
9397
+ */
9398
+ export declare function isPastGameFrame(gameFrameCount: int | null | undefined): boolean;
9399
+
9400
+ /**
9401
+ * Helper function to check if the current render frame count is higher than a specific render frame
9402
+ * count.
9403
+ *
9404
+ * This returns false if the submitted render frame count is null or undefined.
9405
+ */
9406
+ export declare function isPastRenderFrame(renderFrameCount: int | null | undefined): boolean;
9407
+
9408
+ /**
9409
+ * Helper function to check if the current room frame count is higher than a specific room frame
9410
+ * count.
9411
+ *
9412
+ * This returns false if the submitted room frame count is null or undefined.
9413
+ */
9414
+ export declare function isPastRoomFrame(roomFrameCount: int | null | undefined): boolean;
9415
+
9379
9416
  /** Helper function to narrow the type of `PickingUpItem`. */
9380
9417
  export declare function isPickingUpItemCollectible(pickingUpItem: PickingUpItem): pickingUpItem is PickingUpItemCollectible;
9381
9418
 
@@ -14387,12 +14424,60 @@ export declare function onFinalFloor(): boolean;
14387
14424
  */
14388
14425
  export declare function onFirstFloor(): boolean;
14389
14426
 
14427
+ /**
14428
+ * Helper function to check if the current game frame count is exactly equal to a specific game
14429
+ * frame count.
14430
+ *
14431
+ * This returns false if the submitted game frame count is null or undefined.
14432
+ */
14433
+ export declare function onGameFrame(gameFrameCount: int | null | undefined): boolean;
14434
+
14435
+ /**
14436
+ * Helper function to check if the current game frame count is equal to or higher than a specific
14437
+ * game frame count.
14438
+ *
14439
+ * This returns false if the submitted game frame count is null or undefined.
14440
+ */
14441
+ export declare function onOrPastGameFrame(gameFrameCount: int | null | undefined): boolean;
14442
+
14443
+ /**
14444
+ * Helper function to check if the current render frame count is equal to or higher than a specific
14445
+ * render frame count.
14446
+ *
14447
+ * This returns false if the submitted render frame count is null or undefined.
14448
+ */
14449
+ export declare function onOrPastRenderFrame(renderFrameCount: int | null | undefined): boolean;
14450
+
14451
+ /**
14452
+ * Helper function to check if the current room frame count is equal to or higher than a specific
14453
+ * room frame count.
14454
+ *
14455
+ * This returns false if the submitted room frame count is null or undefined.
14456
+ */
14457
+ export declare function onOrPastRoomFrame(roomFrameCount: int | null | undefined): boolean;
14458
+
14459
+ /**
14460
+ * Helper function to check if the current render frame count is exactly equal to a specific render
14461
+ * frame count.
14462
+ *
14463
+ * This returns false if the submitted render frame count is null or undefined.
14464
+ */
14465
+ export declare function onRenderFrame(renderFrameCount: int | null | undefined): boolean;
14466
+
14390
14467
  /**
14391
14468
  * Helper function to check if the current stage type is equal to `StageType.REPENTANCE` or
14392
14469
  * `StageType.REPENTANCE_B`.
14393
14470
  */
14394
14471
  export declare function onRepentanceStage(): boolean;
14395
14472
 
14473
+ /**
14474
+ * Helper function to check if the current room frame count is exactly equal to a specific room
14475
+ * frame count.
14476
+ *
14477
+ * This returns false if the submitted room frame count is null or undefined.
14478
+ */
14479
+ export declare function onRoomFrame(roomFrameCount: int | null | undefined): boolean;
14480
+
14396
14481
  /**
14397
14482
  * Helper function to check whether the player is playing on a set seed (i.e. that they entered in a
14398
14483
  * specific seed by pressing tab on the character selection screen). When the player resets the game
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 59.4.0
3
+ isaacscript-common 59.5.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -19072,6 +19072,91 @@ function PostCollectibleEmpty.prototype.collectibleTypeChanged(self, collectible
19072
19072
  self:fire(collectible, oldCollectibleType)
19073
19073
  end
19074
19074
  end
19075
+ return ____exports
19076
+ end,
19077
+ ["src.functions.frames"] = function(...)
19078
+ local ____exports = {}
19079
+ local ____cachedClasses = require("src.core.cachedClasses")
19080
+ local game = ____cachedClasses.game
19081
+ function ____exports.getElapsedGameFramesSince(self, gameFrameCount)
19082
+ local thisGameFrameCount = game:GetFrameCount()
19083
+ return thisGameFrameCount - gameFrameCount
19084
+ end
19085
+ function ____exports.getElapsedRenderFramesSince(self, renderFrameCount)
19086
+ local thisRenderFrameCount = Isaac.GetFrameCount()
19087
+ return thisRenderFrameCount - renderFrameCount
19088
+ end
19089
+ function ____exports.getElapsedRoomFramesSince(self, roomFrameCount)
19090
+ local room = game:GetRoom()
19091
+ local thisRoomFrameCount = room:GetFrameCount()
19092
+ return thisRoomFrameCount - roomFrameCount
19093
+ end
19094
+ function ____exports.isPastGameFrame(self, gameFrameCount)
19095
+ if gameFrameCount == nil or gameFrameCount == nil then
19096
+ return false
19097
+ end
19098
+ local thisGameFrameCount = game:GetFrameCount()
19099
+ return thisGameFrameCount > gameFrameCount
19100
+ end
19101
+ function ____exports.isPastRenderFrame(self, renderFrameCount)
19102
+ if renderFrameCount == nil or renderFrameCount == nil then
19103
+ return false
19104
+ end
19105
+ local thisRenderFrameCount = Isaac.GetFrameCount()
19106
+ return thisRenderFrameCount >= renderFrameCount
19107
+ end
19108
+ function ____exports.isPastRoomFrame(self, roomFrameCount)
19109
+ if roomFrameCount == nil or roomFrameCount == nil then
19110
+ return false
19111
+ end
19112
+ local room = game:GetRoom()
19113
+ local thisGameFrameCount = room:GetFrameCount()
19114
+ return thisGameFrameCount > roomFrameCount
19115
+ end
19116
+ function ____exports.onGameFrame(self, gameFrameCount)
19117
+ if gameFrameCount == nil or gameFrameCount == nil then
19118
+ return false
19119
+ end
19120
+ local thisGameFrameCount = game:GetFrameCount()
19121
+ return thisGameFrameCount == gameFrameCount
19122
+ end
19123
+ function ____exports.onOrPastGameFrame(self, gameFrameCount)
19124
+ if gameFrameCount == nil or gameFrameCount == nil then
19125
+ return false
19126
+ end
19127
+ local thisGameFrameCount = game:GetFrameCount()
19128
+ return thisGameFrameCount >= gameFrameCount
19129
+ end
19130
+ function ____exports.onOrPastRenderFrame(self, renderFrameCount)
19131
+ if renderFrameCount == nil or renderFrameCount == nil then
19132
+ return false
19133
+ end
19134
+ local thisRenderFrameCount = Isaac.GetFrameCount()
19135
+ return thisRenderFrameCount >= renderFrameCount
19136
+ end
19137
+ function ____exports.onOrPastRoomFrame(self, roomFrameCount)
19138
+ if roomFrameCount == nil or roomFrameCount == nil then
19139
+ return false
19140
+ end
19141
+ local room = game:GetRoom()
19142
+ local thisGameFrameCount = room:GetFrameCount()
19143
+ return thisGameFrameCount >= roomFrameCount
19144
+ end
19145
+ function ____exports.onRenderFrame(self, renderFrameCount)
19146
+ if renderFrameCount == nil or renderFrameCount == nil then
19147
+ return false
19148
+ end
19149
+ local thisRenderFrameCount = Isaac.GetFrameCount()
19150
+ return thisRenderFrameCount >= renderFrameCount
19151
+ end
19152
+ function ____exports.onRoomFrame(self, roomFrameCount)
19153
+ if roomFrameCount == nil or roomFrameCount == nil then
19154
+ return false
19155
+ end
19156
+ local room = game:GetRoom()
19157
+ local thisGameFrameCount = room:GetFrameCount()
19158
+ return thisGameFrameCount == roomFrameCount
19159
+ end
19075
19160
  return ____exports
19076
19161
  end,
19077
19162
  ["src.functions.playerDataStructures"] = function(...)
@@ -19951,6 +20036,8 @@ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
19951
20036
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
19952
20037
  local ____flag = require("src.functions.flag")
19953
20038
  local hasFlag = ____flag.hasFlag
20039
+ local ____frames = require("src.functions.frames")
20040
+ local onGameFrame = ____frames.onGameFrame
19954
20041
  local ____playerDataStructures = require("src.functions.playerDataStructures")
19955
20042
  local mapGetPlayer = ____playerDataStructures.mapGetPlayer
19956
20043
  local mapSetPlayer = ____playerDataStructures.mapSetPlayer
@@ -20027,8 +20114,7 @@ function PostCursedTeleport.prototype.isPotentialNaturalTeleportFromSacrificeRoo
20027
20114
  return roomType == RoomType.SACRIFICE and isSpikeDamage and (v.level.numSacrifices == 6 or v.level.numSacrifices >= 12)
20028
20115
  end
20029
20116
  function PostCursedTeleport.prototype.playerIsTeleportingFromCursedTeleport(self, player, lastDamageFrame)
20030
- local gameFrameCount = game:GetFrameCount()
20031
- if gameFrameCount ~= lastDamageFrame then
20117
+ if not onGameFrame(nil, lastDamageFrame) then
20032
20118
  return false
20033
20119
  end
20034
20120
  local sprite = player:GetSprite()
@@ -22689,7 +22775,9 @@ function ____exports.restart(self, character)
22689
22775
  end
22690
22776
  function ____exports.setRunSeed(self, startSeedOrStartSeedString)
22691
22777
  local startSeedString = isString(nil, startSeedOrStartSeedString) and startSeedOrStartSeedString or Seeds.Seed2String(startSeedOrStartSeedString)
22692
- Isaac.ExecuteCommand("seed " .. startSeedString)
22778
+ local command = "seed " .. startSeedString
22779
+ log("Restarting the run to set a seed with a console command of: " .. command)
22780
+ Isaac.ExecuteCommand(command)
22693
22781
  end
22694
22782
  function ____exports.setUnseeded(self)
22695
22783
  local seeds = game:GetSeeds()
@@ -29450,8 +29538,8 @@ local __TS__New = ____lualib.__TS__New
29450
29538
  local ____exports = {}
29451
29539
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
29452
29540
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
29453
- local ____cachedClasses = require("src.core.cachedClasses")
29454
- local game = ____cachedClasses.game
29541
+ local ____frames = require("src.functions.frames")
29542
+ local isPastRoomFrame = ____frames.isPastRoomFrame
29455
29543
  local ____roomData = require("src.functions.roomData")
29456
29544
  local getRoomVisitedCount = ____roomData.getRoomVisitedCount
29457
29545
  local ____shouldFire = require("src.shouldFire")
@@ -29467,10 +29555,8 @@ function PostPickupInitFirst.prototype.____constructor(self)
29467
29555
  self.v = {room = {firedSet = __TS__New(Set)}}
29468
29556
  self.shouldFire = shouldFirePickup
29469
29557
  self.postPickupInit = function(____, pickup)
29470
- local room = game:GetRoom()
29471
- local roomFrameCount = room:GetFrameCount()
29472
29558
  local roomVisitedCount = getRoomVisitedCount(nil)
29473
- if roomFrameCount > 0 or roomVisitedCount == 0 then
29559
+ if isPastRoomFrame(nil, 0) or roomVisitedCount == 0 then
29474
29560
  self:fire(pickup)
29475
29561
  end
29476
29562
  end
@@ -31568,8 +31654,6 @@ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
31568
31654
  local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
31569
31655
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
31570
31656
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
31571
- local ____cachedClasses = require("src.core.cachedClasses")
31572
- local game = ____cachedClasses.game
31573
31657
  local ____constants = require("src.core.constants")
31574
31658
  local MAX_TAINTED_SAMSON_BERSERK_CHARGE = ____constants.MAX_TAINTED_SAMSON_BERSERK_CHARGE
31575
31659
  local TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = ____constants.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE
@@ -31577,6 +31661,8 @@ local ____MysteriousPaperEffect = require("src.enums.MysteriousPaperEffect")
31577
31661
  local MysteriousPaperEffect = ____MysteriousPaperEffect.MysteriousPaperEffect
31578
31662
  local ____characters = require("src.functions.characters")
31579
31663
  local getCharacterDeathAnimationName = ____characters.getCharacterDeathAnimationName
31664
+ local ____frames = require("src.functions.frames")
31665
+ local onGameFrame = ____frames.onGameFrame
31580
31666
  local ____playerHealth = require("src.functions.playerHealth")
31581
31667
  local getPlayerMaxHeartContainers = ____playerHealth.getPlayerMaxHeartContainers
31582
31668
  local ____players = require("src.functions.players")
@@ -31610,7 +31696,6 @@ function ____exports.willReviveFromSpiritShackles(self, player)
31610
31696
  return spiritShacklesEnabled and not playerInSoulForm
31611
31697
  end
31612
31698
  function ____exports.isDamageToPlayerFatal(self, player, amount, source, lastDamageGameFrame)
31613
- local gameFrameCount = game:GetFrameCount()
31614
31699
  local character = player:GetPlayerType()
31615
31700
  local effects = player:GetEffects()
31616
31701
  local isBerserk = effects:HasCollectibleEffect(CollectibleType.BERSERK)
@@ -31640,7 +31725,7 @@ function ____exports.isDamageToPlayerFatal(self, player, amount, source, lastDam
31640
31725
  if ____exports.willReviveFromHeartbreak(nil, player) then
31641
31726
  return false
31642
31727
  end
31643
- if player:HasCollectible(CollectibleType.BROKEN_GLASS_CANNON) and gameFrameCount == lastDamageGameFrame then
31728
+ if player:HasCollectible(CollectibleType.BROKEN_GLASS_CANNON) and onGameFrame(nil, lastDamageGameFrame) then
31644
31729
  return false
31645
31730
  end
31646
31731
  local hearts = player:GetHearts()
@@ -35690,6 +35775,9 @@ local ____cachedClasses = require("src.core.cachedClasses")
35690
35775
  local game = ____cachedClasses.game
35691
35776
  local ____decorators = require("src.decorators")
35692
35777
  local Exported = ____decorators.Exported
35778
+ local ____frames = require("src.functions.frames")
35779
+ local onGameFrame = ____frames.onGameFrame
35780
+ local onRenderFrame = ____frames.onRenderFrame
35693
35781
  local ____Feature = require("src.classes.private.Feature")
35694
35782
  local Feature = ____Feature.Feature
35695
35783
  ____exports.GameReorderedCallbacks = __TS__Class()
@@ -35731,13 +35819,12 @@ function GameReorderedCallbacks.prototype.____constructor(self, postGameStartedR
35731
35819
  self.renderFrameRunStarted = nil
35732
35820
  end
35733
35821
  self.postNewLevel = function()
35734
- local gameFrameCount = game:GetFrameCount()
35735
35822
  local level = game:GetLevel()
35736
35823
  local stage = level:GetStage()
35737
35824
  local stageType = level:GetStageType()
35738
35825
  local room = game:GetRoom()
35739
35826
  local roomType = room:GetType()
35740
- if gameFrameCount == 0 and not self.forceNewLevel then
35827
+ if onGameFrame(nil, 0) and not self.forceNewLevel then
35741
35828
  return
35742
35829
  end
35743
35830
  self.forceNewLevel = false
@@ -35746,13 +35833,11 @@ function GameReorderedCallbacks.prototype.____constructor(self, postGameStartedR
35746
35833
  self.postNewRoomReordered:fire(roomType)
35747
35834
  end
35748
35835
  self.postNewRoom = function()
35749
- local gameFrameCount = game:GetFrameCount()
35750
35836
  local level = game:GetLevel()
35751
35837
  local stage = level:GetStage()
35752
35838
  local stageType = level:GetStageType()
35753
35839
  local room = game:GetRoom()
35754
35840
  local roomType = room:GetType()
35755
- local renderFrameCount = Isaac.GetFrameCount()
35756
35841
  if self.usedGlowingHourGlass then
35757
35842
  self.usedGlowingHourGlass = false
35758
35843
  if self.currentStage ~= stage or self.currentStageType ~= stageType then
@@ -35762,7 +35847,7 @@ function GameReorderedCallbacks.prototype.____constructor(self, postGameStartedR
35762
35847
  return
35763
35848
  end
35764
35849
  end
35765
- if (gameFrameCount == 0 or renderFrameCount == self.renderFrameRunStarted or self.currentStage ~= stage or self.currentStageType ~= stageType) and not self.forceNewRoom then
35850
+ if (onGameFrame(nil, 0) or onRenderFrame(nil, self.renderFrameRunStarted) or self.currentStage ~= stage or self.currentStageType ~= stageType) and not self.forceNewRoom then
35766
35851
  return
35767
35852
  end
35768
35853
  self.forceNewRoom = false
@@ -37747,8 +37832,6 @@ local ____exports = {}
37747
37832
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
37748
37833
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
37749
37834
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
37750
- local ____cachedClasses = require("src.core.cachedClasses")
37751
- local game = ____cachedClasses.game
37752
37835
  local ____decorators = require("src.decorators")
37753
37836
  local Exported = ____decorators.Exported
37754
37837
  local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
@@ -37759,6 +37842,8 @@ local ____SerializationType = require("src.enums.SerializationType")
37759
37842
  local SerializationType = ____SerializationType.SerializationType
37760
37843
  local ____deepCopy = require("src.functions.deepCopy")
37761
37844
  local deepCopy = ____deepCopy.deepCopy
37845
+ local ____frames = require("src.functions.frames")
37846
+ local isPastGameFrame = ____frames.isPastGameFrame
37762
37847
  local ____log = require("src.functions.log")
37763
37848
  local log = ____log.log
37764
37849
  local ____stage = require("src.functions.stage")
@@ -37811,8 +37896,7 @@ function SaveDataManager.prototype.____constructor(self, mod)
37811
37896
  self.inARun = true
37812
37897
  self.restoreGlowingHourGlassDataOnNextRoom = false
37813
37898
  loadFromDisk(nil, self.mod, self.saveDataMap, self.classConstructors)
37814
- local gameFrameCount = game:GetFrameCount()
37815
- local isContinued = gameFrameCount ~= 0
37899
+ local isContinued = isPastGameFrame(nil, 0)
37816
37900
  if not isContinued then
37817
37901
  restoreDefaultsForAllFeaturesAndKeys(nil, self.saveDataMap, self.saveDataDefaultsMap)
37818
37902
  end
@@ -37971,6 +38055,8 @@ local ____ISCFeature = require("src.enums.ISCFeature")
37971
38055
  local ISCFeature = ____ISCFeature.ISCFeature
37972
38056
  local ____entities = require("src.functions.entities")
37973
38057
  local getEntityID = ____entities.getEntityID
38058
+ local ____frames = require("src.functions.frames")
38059
+ local isPastRoomFrame = ____frames.isPastRoomFrame
37974
38060
  local ____roomData = require("src.functions.roomData")
37975
38061
  local getRoomListIndex = ____roomData.getRoomListIndex
37976
38062
  local ____stage = require("src.functions.stage")
@@ -38029,8 +38115,7 @@ function PickupIndexCreation.prototype.setPickupIndex(self, pickup)
38029
38115
  local pickupIndexFromLevelData = self:getPickupIndexFromPreviousData(pickup)
38030
38116
  local room = game:GetRoom()
38031
38117
  local isFirstVisit = room:IsFirstVisit()
38032
- local roomFrameCount = room:GetFrameCount()
38033
- if pickupIndexFromLevelData ~= nil and not isFirstVisit and roomFrameCount <= 0 then
38118
+ if pickupIndexFromLevelData ~= nil and not isFirstVisit and not isPastRoomFrame(nil, 0) then
38034
38119
  v.room.pickupIndexes:set(ptrHash, pickupIndexFromLevelData)
38035
38120
  return
38036
38121
  end
@@ -42343,6 +42428,9 @@ local ____TrapdoorAnimation = require("src.enums.private.TrapdoorAnimation")
42343
42428
  local TrapdoorAnimation = ____TrapdoorAnimation.TrapdoorAnimation
42344
42429
  local ____easing = require("src.functions.easing")
42345
42430
  local easeOutSine = ____easing.easeOutSine
42431
+ local ____frames = require("src.functions.frames")
42432
+ local isPastRoomFrame = ____frames.isPastRoomFrame
42433
+ local onOrPastRenderFrame = ____frames.onOrPastRenderFrame
42346
42434
  local ____log = require("src.functions.log")
42347
42435
  local log = ____log.log
42348
42436
  local ____playerCenter = require("src.functions.playerCenter")
@@ -42500,14 +42588,13 @@ function CustomTrapdoors.prototype.checkPixelationToBlackComplete(self)
42500
42588
  if v.run.state ~= StageTravelState.PIXELATION_TO_BLACK or v.run.stateRenderFrame == nil then
42501
42589
  return
42502
42590
  end
42503
- local hud = game:GetHUD()
42504
- local renderFrameCount = Isaac.GetFrameCount()
42505
42591
  local renderFrameScreenBlack = v.run.stateRenderFrame + PIXELATION_TO_BLACK_FRAMES
42506
- if renderFrameCount < renderFrameScreenBlack then
42592
+ if not onOrPastRenderFrame(nil, renderFrameScreenBlack) then
42507
42593
  return
42508
42594
  end
42509
42595
  v.run.state = StageTravelState.WAITING_FOR_FIRST_PIXELATION_TO_END
42510
42596
  self:logStateChanged()
42597
+ local hud = game:GetHUD()
42511
42598
  hud:SetVisible(false)
42512
42599
  self.runInNFrames:runNextGameFrame(function()
42513
42600
  local level = game:GetLevel()
@@ -42546,14 +42633,13 @@ function CustomTrapdoors.prototype.checkSecondPixelationHalfWay(self)
42546
42633
  if v.run.state ~= StageTravelState.WAITING_FOR_SECOND_PIXELATION_TO_GET_HALF_WAY or v.run.stateRenderFrame == nil then
42547
42634
  return
42548
42635
  end
42549
- local hud = game:GetHUD()
42550
- local renderFrameCount = Isaac.GetFrameCount()
42551
42636
  local renderFrameScreenBlack = v.run.stateRenderFrame + PIXELATION_TO_BLACK_FRAMES
42552
- if renderFrameCount < renderFrameScreenBlack then
42637
+ if not onOrPastRenderFrame(nil, renderFrameScreenBlack) then
42553
42638
  return
42554
42639
  end
42555
42640
  v.run.state = StageTravelState.PIXELATION_TO_ROOM
42556
42641
  self:logStateChanged()
42642
+ local hud = game:GetHUD()
42557
42643
  hud:SetVisible(true)
42558
42644
  self.runNextRoom:runNextRoom(function()
42559
42645
  v.run.state = StageTravelState.PLAYERS_LAYING_DOWN
@@ -42609,11 +42695,10 @@ function CustomTrapdoors.prototype.shouldTrapdoorOpen(self, gridEntity, firstSpa
42609
42695
  return not anyPlayerCloserThan(nil, gridEntity.Position, TRAPDOOR_OPEN_DISTANCE) and not self:isPlayerCloseAfterBoss(gridEntity.Position) and not shouldBeClosedFromStartingInRoomWithEnemies(nil, firstSpawn, roomClear)
42610
42696
  end
42611
42697
  function CustomTrapdoors.prototype.isPlayerCloseAfterBoss(self, position)
42612
- local gameFrameCount = game:GetFrameCount()
42613
42698
  local room = game:GetRoom()
42614
42699
  local roomType = room:GetType()
42615
42700
  local roomClearGameFrame = self.roomClearFrame:getRoomClearGameFrame()
42616
- if roomType ~= RoomType.BOSS or roomClearGameFrame == nil or gameFrameCount >= roomClearGameFrame + TRAPDOOR_BOSS_REACTION_FRAMES then
42701
+ if roomType ~= RoomType.BOSS or roomClearGameFrame == nil or onOrPastRenderFrame(nil, roomClearGameFrame + TRAPDOOR_BOSS_REACTION_FRAMES) then
42617
42702
  return false
42618
42703
  end
42619
42704
  return anyPlayerCloserThan(nil, position, TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS)
@@ -42723,9 +42808,8 @@ function CustomTrapdoors.prototype.checkJumpComplete(self, player)
42723
42808
  end
42724
42809
  function CustomTrapdoors.prototype.shouldTrapdoorSpawnOpen(self, gridEntity, firstSpawn)
42725
42810
  local room = game:GetRoom()
42726
- local roomFrameCount = room:GetFrameCount()
42727
42811
  local roomClear = room:IsClear()
42728
- if roomFrameCount > 0 then
42812
+ if isPastRoomFrame(nil, 0) then
42729
42813
  return false
42730
42814
  end
42731
42815
  if not roomClear then
@@ -42759,7 +42843,6 @@ function CustomTrapdoors.prototype.spawnCustomTrapdoor(self, gridIndexOrPosition
42759
42843
  destinationStageType = self.stageHistory:getNextStageTypeWithHistory()
42760
42844
  end
42761
42845
  local room = game:GetRoom()
42762
- local roomFrameCount = room:GetFrameCount()
42763
42846
  local roomListIndex = getRoomListIndex(nil)
42764
42847
  local gridIndex = isVector(nil, gridIndexOrPosition) and room:GetGridIndex(gridIndexOrPosition) or gridIndexOrPosition
42765
42848
  local gridEntity = self.customGridEntities:spawnCustomGridEntity(
@@ -42769,7 +42852,7 @@ function CustomTrapdoors.prototype.spawnCustomTrapdoor(self, gridIndexOrPosition
42769
42852
  anm2Path,
42770
42853
  TrapdoorAnimation.OPENED
42771
42854
  )
42772
- local firstSpawn = roomFrameCount ~= 0
42855
+ local firstSpawn = isPastRoomFrame(nil, 0)
42773
42856
  local ____spawnOpen_0 = spawnOpen
42774
42857
  if ____spawnOpen_0 == nil then
42775
42858
  ____spawnOpen_0 = self:shouldTrapdoorSpawnOpen(gridEntity, firstSpawn)
@@ -43646,6 +43729,9 @@ local KColorDefault = ____constants.KColorDefault
43646
43729
  local VectorOne = ____constants.VectorOne
43647
43730
  local ____UIStreakAnimation = require("src.enums.private.UIStreakAnimation")
43648
43731
  local UIStreakAnimation = ____UIStreakAnimation.UIStreakAnimation
43732
+ local ____frames = require("src.functions.frames")
43733
+ local getElapsedGameFramesSince = ____frames.getElapsedGameFramesSince
43734
+ local getElapsedRenderFramesSince = ____frames.getElapsedRenderFramesSince
43649
43735
  local ____ui = require("src.functions.ui")
43650
43736
  local getScreenBottomCenterPos = ____ui.getScreenBottomCenterPos
43651
43737
  local getScreenTopCenterPos = ____ui.getScreenTopCenterPos
@@ -43655,16 +43741,15 @@ function checkEndTopStreakText(self)
43655
43741
  if v.run.topStreakTextStartedRenderFrame == nil or v.run.topStreakText.animation ~= UIStreakAnimation.TEXT_STAY then
43656
43742
  return
43657
43743
  end
43658
- local renderFrameCount = Isaac.GetFrameCount()
43659
- local elapsedFrames = renderFrameCount - v.run.topStreakTextStartedRenderFrame
43744
+ local elapsedFrames = getElapsedRenderFramesSince(nil, v.run.topStreakTextStartedRenderFrame)
43660
43745
  if elapsedFrames >= 115 then
43661
43746
  v.run.topStreakText.animation = UIStreakAnimation.TEXT
43662
43747
  v.run.topStreakText.frame = TEXT_OUT_FRAME - 2
43663
43748
  end
43664
43749
  end
43665
43750
  function trackMapInputPressed(self)
43751
+ local gameFrameCount = game:GetFrameCount()
43666
43752
  for ____, controllerIndex in ipairs(CONTROLLER_INDEX_VALUES) do
43667
- local gameFrameCount = game:GetFrameCount()
43668
43753
  local oldPushedMapFrame = v.run.controllerIndexPushingMapRenderFrame:get(controllerIndex)
43669
43754
  local isPushingMap = Input.IsActionPressed(ButtonAction.MAP, controllerIndex)
43670
43755
  if isPushingMap then
@@ -43685,8 +43770,7 @@ function checkStartBottomStreakText(self)
43685
43770
  return
43686
43771
  end
43687
43772
  local earliestFrame = math.min(table.unpack(pushedMapFrames))
43688
- local gameFrameCount = game:GetFrameCount()
43689
- local elapsedFrames = gameFrameCount - earliestFrame
43773
+ local elapsedFrames = getElapsedGameFramesSince(nil, earliestFrame)
43690
43774
  if elapsedFrames >= NUM_RENDER_FRAMES_MAP_HELD_BEFORE_STREAK_TEXT then
43691
43775
  v.run.bottomStreakText.animation = UIStreakAnimation.TEXT
43692
43776
  v.run.bottomStreakText.frame = 0
@@ -47817,6 +47901,8 @@ local ____collectibles = require("src.functions.collectibles")
47817
47901
  local setCollectibleSubType = ____collectibles.setCollectibleSubType
47818
47902
  local ____entities = require("src.functions.entities")
47819
47903
  local getEntityID = ____entities.getEntityID
47904
+ local ____frames = require("src.functions.frames")
47905
+ local onGameFrame = ____frames.onGameFrame
47820
47906
  local ____pickupVariants = require("src.functions.pickupVariants")
47821
47907
  local isCollectible = ____pickupVariants.isCollectible
47822
47908
  local ____pickupsSpecific = require("src.functions.pickupsSpecific")
@@ -47870,8 +47956,7 @@ function PreventCollectibleRotation.prototype.____constructor(self, pickupIndexC
47870
47956
  if trackedCollectibleType == nil then
47871
47957
  return
47872
47958
  end
47873
- local gameFrameCount = game:GetFrameCount()
47874
- if v.run.rollGameFrame ~= nil and (gameFrameCount == v.run.rollGameFrame or gameFrameCount == v.run.rollGameFrame + 1) then
47959
+ if v.run.rollGameFrame ~= nil and (onGameFrame(nil, v.run.rollGameFrame) or onGameFrame(nil, v.run.rollGameFrame + 1)) then
47875
47960
  v.run.trackedCollectibles:delete(pickupIndex)
47876
47961
  return
47877
47962
  end
@@ -53729,9 +53814,6 @@ return ____exports
53729
53814
  local ____exports = {}
53730
53815
  local ____log = require("src.functions.log")
53731
53816
  local log = ____log.log
53732
- function ____exports.isLuaDebugEnabled(self)
53733
- return _G.package ~= nil
53734
- end
53735
53817
  function ____exports.getTime(self, useSocketIfAvailable)
53736
53818
  if useSocketIfAvailable == nil then
53737
53819
  useSocketIfAvailable = true
@@ -53750,6 +53832,12 @@ function ____exports.getTime(self, useSocketIfAvailable)
53750
53832
  end
53751
53833
  return Isaac.GetTime()
53752
53834
  end
53835
+ function ____exports.isLuaDebugEnabled(self)
53836
+ return _G.package ~= nil
53837
+ end
53838
+ function ____exports.getElapsedTimeSince(self, time)
53839
+ return ____exports.getTime(nil) - time
53840
+ end
53753
53841
  function ____exports.getTraceback()
53754
53842
  if SandboxGetTraceback ~= nil then
53755
53843
  return SandboxGetTraceback()
@@ -53794,6 +53882,7 @@ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
53794
53882
  local ____features = require("src.features")
53795
53883
  local getFeatures = ____features.getFeatures
53796
53884
  local ____debugFunctions = require("src.functions.debugFunctions")
53885
+ local getElapsedTimeSince = ____debugFunctions.getElapsedTimeSince
53797
53886
  local getTime = ____debugFunctions.getTime
53798
53887
  local ____log = require("src.functions.log")
53799
53888
  local getParentFunctionDescription = ____log.getParentFunctionDescription
@@ -53850,8 +53939,7 @@ function ModUpgraded.prototype.AddPriorityCallback(self, modCallback, priority,
53850
53939
  local startTime = getTime(nil)
53851
53940
  Isaac.DebugString(signature .. " - START")
53852
53941
  local returnValue = callback(nil, ...)
53853
- local endTime = getTime(nil)
53854
- local elapsedTime = endTime - startTime
53942
+ local elapsedTime = getElapsedTimeSince(nil, startTime)
53855
53943
  if self.timeThreshold == nil or self.timeThreshold <= elapsedTime then
53856
53944
  Isaac.DebugString((signature .. " - END - time: ") .. tostring(elapsedTime))
53857
53945
  else
@@ -54634,13 +54722,17 @@ local DEFAULT_CHALLENGE_CHARACTER = ____challengeCharacters.DEFAULT_CHALLENGE_CH
54634
54722
  local ____challengeNames = require("src.objects.challengeNames")
54635
54723
  local CHALLENGE_NAMES = ____challengeNames.CHALLENGE_NAMES
54636
54724
  local DEFAULT_CHALLENGE_NAME = ____challengeNames.DEFAULT_CHALLENGE_NAME
54725
+ local ____log = require("src.functions.log")
54726
+ local log = ____log.log
54637
54727
  function ____exports.onAnyChallenge(self)
54638
54728
  local challenge = Isaac.GetChallenge()
54639
54729
  return challenge ~= Challenge.NULL
54640
54730
  end
54641
54731
  function ____exports.clearChallenge(self)
54642
54732
  if ____exports.onAnyChallenge(nil) then
54643
- Isaac.ExecuteCommand("challenge " .. tostring(Challenge.NULL))
54733
+ local command = "challenge " .. tostring(Challenge.NULL)
54734
+ log("Restarting the run to clear the current challenge with a console command of: " .. command)
54735
+ Isaac.ExecuteCommand(command)
54644
54736
  end
54645
54737
  end
54646
54738
  function ____exports.getChallengeBoss(self, challenge)
@@ -54662,7 +54754,9 @@ function ____exports.onChallenge(self, ...)
54662
54754
  end
54663
54755
  function ____exports.setChallenge(self, challenge)
54664
54756
  if not ____exports.onChallenge(nil, challenge) then
54665
- Isaac.ExecuteCommand("challenge " .. tostring(challenge))
54757
+ local command = "challenge " .. tostring(challenge)
54758
+ log("Restarting the run to set a challenge with a console command of: " .. command)
54759
+ Isaac.ExecuteCommand(command)
54666
54760
  end
54667
54761
  end
54668
54762
  return ____exports
@@ -56366,6 +56460,14 @@ do
56366
56460
  end
56367
56461
  end
56368
56462
  end
56463
+ do
56464
+ local ____export = require("src.functions.frames")
56465
+ for ____exportKey, ____exportValue in pairs(____export) do
56466
+ if ____exportKey ~= "default" then
56467
+ ____exports[____exportKey] = ____exportValue
56468
+ end
56469
+ end
56470
+ end
56369
56471
  do
56370
56472
  local ____export = require("src.functions.globals")
56371
56473
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -57538,6 +57640,14 @@ do
57538
57640
  end
57539
57641
  end
57540
57642
  end
57643
+ do
57644
+ local ____export = require("src.functions.frames")
57645
+ for ____exportKey, ____exportValue in pairs(____export) do
57646
+ if ____exportKey ~= "default" then
57647
+ ____exports[____exportKey] = ____exportValue
57648
+ end
57649
+ end
57650
+ end
57541
57651
  do
57542
57652
  local ____export = require("src.functions.globals")
57543
57653
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -1 +1 @@
1
- {"version":3,"file":"ModUpgraded.d.ts","sourceRoot":"","sources":["../../../src/classes/ModUpgraded.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAIhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAS/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAMrG;;;;;;;;;;GAUG;AACH,qBAAa,WAAY,YAAW,GAAG;IAK9B,IAAI,EAAE,MAAM,CAAC;IAMpB,4FAA4F;IAC5F,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAE1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;IAChC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAElD,OAAO,CAAC,QA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GAAG,MAAM,EACvE,WAAW,EAAE,CAAC,EACd,QAAQ,EAAE,gBAAgB,GAAG,GAAG,EAChC,GAAG,IAAI,EAAE,CAAC,SAAS,MAAM,qBAAqB,GAC1C,qBAAqB,CAAC,CAAC,CAAC,GACxB,OAAO,EAAE,GACZ,IAAI;IAuDA,OAAO,IAAI,OAAO;IAIlB,QAAQ,IAAI,MAAM;IAIlB,cAAc,CAAC,CAAC,SAAS,WAAW,EACzC,WAAW,EAAE,CAAC,EACd,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACpC,IAAI;IAIA,UAAU,IAAI,IAAI;IAIlB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQnC;;;;;;OAMG;IACI,iBAAiB,CAAC,CAAC,SAAS,iBAAiB,EAClD,iBAAiB,EAAE,CAAC,EACpB,GAAG,IAAI,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,IAAI;IAQP;;;;OAIG;IACI,yBAAyB,CAAC,CAAC,SAAS,iBAAiB,EAC1D,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,gBAAgB,GAAG,GAAG,EAChC,GAAG,IAAI,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,IAAI;IAQP;;;;;;;;;OASG;IACI,oBAAoB,CAAC,CAAC,SAAS,iBAAiB,EACrD,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1C,IAAI;IAOP;;;OAGG;IACI,eAAe,IAAI,IAAI;IA0C9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAgEnB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAqDrB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;CAM5B"}
@@ -22,6 +22,7 @@ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
22
22
  local ____features = require("src.features")
23
23
  local getFeatures = ____features.getFeatures
24
24
  local ____debugFunctions = require("src.functions.debugFunctions")
25
+ local getElapsedTimeSince = ____debugFunctions.getElapsedTimeSince
25
26
  local getTime = ____debugFunctions.getTime
26
27
  local ____log = require("src.functions.log")
27
28
  local getParentFunctionDescription = ____log.getParentFunctionDescription
@@ -89,8 +90,7 @@ function ModUpgraded.prototype.AddPriorityCallback(self, modCallback, priority,
89
90
  local startTime = getTime(nil)
90
91
  Isaac.DebugString(signature .. " - START")
91
92
  local returnValue = callback(nil, ...)
92
- local endTime = getTime(nil)
93
- local elapsedTime = endTime - startTime
93
+ local elapsedTime = getElapsedTimeSince(nil, startTime)
94
94
  if self.timeThreshold == nil or self.timeThreshold <= elapsedTime then
95
95
  Isaac.DebugString((signature .. " - END - time: ") .. tostring(elapsedTime))
96
96
  else
@@ -1 +1 @@
1
- {"version":3,"file":"PostCursedTeleport.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCursedTeleport.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAOlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAe3D,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,oBAAoB,CAAC;IAC5E,CAAC;;;;;;;MAAK;IAEtB,UAAmB,UAAU,0BAAoB;;IAgBjD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAWlC;IAEF,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,cAAc;IAwBtB,OAAO,CAAC,2CAA2C;IAkBnD,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAyB9C;IAEF,OAAO,CAAC,qCAAqC;CA8B9C"}
1
+ {"version":3,"file":"PostCursedTeleport.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCursedTeleport.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