isaacscript-common 11.2.3 → 12.0.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 (71) hide show
  1. package/dist/index.d.ts +18 -3
  2. package/dist/isaacscript-common.lua +161 -96
  3. package/dist/package.lua +1 -1
  4. package/dist/src/features/customStage/backdrop.lua +2 -2
  5. package/dist/src/features/customStage/{customStageConstants.d.ts → constants.d.ts} +1 -1
  6. package/dist/src/features/customStage/constants.d.ts.map +1 -0
  7. package/dist/src/features/customStage/{customStageConstants.lua → constants.lua} +0 -0
  8. package/dist/src/features/customStage/init.lua +2 -2
  9. package/dist/src/features/customStage/shadows.lua +2 -2
  10. package/dist/src/features/customStage/streakText.d.ts.map +1 -1
  11. package/dist/src/features/customStage/streakText.lua +3 -3
  12. package/dist/src/features/customStage/v.d.ts +1 -1
  13. package/dist/src/features/customStage/v.d.ts.map +1 -1
  14. package/dist/src/features/customStage/v.lua +2 -2
  15. package/dist/src/features/customStage/versusScreen.lua +3 -3
  16. package/dist/src/features/customTrapdoor/{customTrapdoorConstants.d.ts → constants.d.ts} +1 -1
  17. package/dist/src/features/customTrapdoor/constants.d.ts.map +1 -0
  18. package/dist/src/features/customTrapdoor/{customTrapdoorConstants.lua → constants.lua} +0 -0
  19. package/dist/src/features/customTrapdoor/exports.lua +2 -2
  20. package/dist/src/features/customTrapdoor/init.lua +4 -4
  21. package/dist/src/features/customTrapdoor/openClose.lua +4 -4
  22. package/dist/src/features/customTrapdoor/spawn.lua +2 -2
  23. package/dist/src/features/customTrapdoor/touched.lua +6 -6
  24. package/dist/src/features/saveDataManager/constants.d.ts +10 -0
  25. package/dist/src/features/saveDataManager/constants.d.ts.map +1 -0
  26. package/dist/src/features/saveDataManager/constants.lua +10 -0
  27. package/dist/src/features/saveDataManager/exports.d.ts +8 -3
  28. package/dist/src/features/saveDataManager/exports.d.ts.map +1 -1
  29. package/dist/src/features/saveDataManager/exports.lua +10 -5
  30. package/dist/src/features/saveDataManager/load.d.ts.map +1 -1
  31. package/dist/src/features/saveDataManager/load.lua +9 -9
  32. package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
  33. package/dist/src/features/saveDataManager/main.lua +67 -4
  34. package/dist/src/features/saveDataManager/maps.d.ts +5 -0
  35. package/dist/src/features/saveDataManager/maps.d.ts.map +1 -1
  36. package/dist/src/features/saveDataManager/maps.lua +3 -0
  37. package/dist/src/features/saveDataManager/merge.lua +2 -2
  38. package/dist/src/features/saveDataManager/save.lua +3 -3
  39. package/dist/src/functions/charge.d.ts +9 -0
  40. package/dist/src/functions/charge.d.ts.map +1 -1
  41. package/dist/src/functions/charge.lua +23 -34
  42. package/dist/src/functions/deepCopy.lua +2 -2
  43. package/package.json +1 -1
  44. package/src/features/customStage/backdrop.ts +1 -1
  45. package/src/features/customStage/{customStageConstants.ts → constants.ts} +0 -0
  46. package/src/features/customStage/init.ts +1 -1
  47. package/src/features/customStage/shadows.ts +1 -1
  48. package/src/features/customStage/streakText.ts +1 -4
  49. package/src/features/customStage/v.ts +1 -1
  50. package/src/features/customStage/versusScreen.ts +1 -1
  51. package/src/features/customTrapdoor/{customTrapdoorConstants.ts → constants.ts} +0 -0
  52. package/src/features/customTrapdoor/exports.ts +1 -1
  53. package/src/features/customTrapdoor/init.ts +1 -1
  54. package/src/features/customTrapdoor/openClose.ts +1 -1
  55. package/src/features/customTrapdoor/spawn.ts +1 -1
  56. package/src/features/customTrapdoor/touched.ts +1 -1
  57. package/src/features/saveDataManager/constants.ts +15 -0
  58. package/src/features/saveDataManager/exports.ts +9 -4
  59. package/src/features/saveDataManager/load.ts +13 -9
  60. package/src/features/saveDataManager/main.ts +78 -4
  61. package/src/features/saveDataManager/maps.ts +6 -0
  62. package/src/features/saveDataManager/merge.ts +1 -1
  63. package/src/features/saveDataManager/save.ts +1 -1
  64. package/src/functions/charge.ts +39 -54
  65. package/src/functions/deepCopy.ts +1 -1
  66. package/dist/src/features/customStage/customStageConstants.d.ts.map +0 -1
  67. package/dist/src/features/customTrapdoor/customTrapdoorConstants.d.ts.map +0 -1
  68. package/dist/src/features/saveDataManager/saveDataManagerConstants.d.ts +0 -4
  69. package/dist/src/features/saveDataManager/saveDataManagerConstants.d.ts.map +0 -1
  70. package/dist/src/features/saveDataManager/saveDataManagerConstants.lua +0 -5
  71. package/src/features/saveDataManager/saveDataManagerConstants.ts +0 -4
package/dist/index.d.ts CHANGED
@@ -2627,6 +2627,16 @@ export declare function getCharacterName(character: PlayerType): string;
2627
2627
  /** Helper function to get an array containing the characters of all of the current players. */
2628
2628
  export declare function getCharacters(): PlayerType[];
2629
2629
 
2630
+ /**
2631
+ * Helper function to get the amount of charges away from the maximum charge that a particular
2632
+ * player is.
2633
+ *
2634
+ * This function accounts for The Battery. For example, if the player has 2/6 charges on a D6, this
2635
+ * function will return 10 (because there are 4 charges remaining on the base charge and 6 charges
2636
+ * remaining on The Battery charge).
2637
+ */
2638
+ export declare function getChargesAwayFromMax(player: EntityPlayer, activeSlot: ActiveSlot): int;
2639
+
2630
2640
  /**
2631
2641
  * Helper function to get an array of equidistant points on the circumference around a circle.
2632
2642
  * Useful for equally distributing things in a circle pattern.
@@ -10404,9 +10414,14 @@ export declare enum SaveDataKey {
10404
10414
  * data manager cannot do this on its own because it cannot know when your mod features are finished
10405
10415
  * initializing.)
10406
10416
  *
10407
- * Finally, some features may have variables that need to be automatically reset per run/level, but
10408
- * not saved to disk on game exit. (For example, if they contain functions or other non-serializable
10409
- * data.) For these cases, set the second argument to `() => false`.
10417
+ * Some features may have variables that need to be automatically reset per run/level, but not saved
10418
+ * to disk on game exit. (For example, if they contain functions or other non-serializable data.)
10419
+ * For these cases, set the second argument to `() => false`.
10420
+ *
10421
+ * Note that when the player uses Glowing Hour Glass, the save data manager will automatically
10422
+ * restore any variables on a "run" or "level" object with a backup that was created when the room
10423
+ * was entered. Thus, you should not have to explicitly program support for Glowing Hour Glass into
10424
+ * your mod features that use the save data manager.
10410
10425
  *
10411
10426
  * @param key The name of the file or feature that is submitting data to be managed by the save data
10412
10427
  * manager. The save data manager will throw an error if the key is already registered.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 11.2.3
3
+ isaacscript-common 12.0.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -26923,11 +26923,16 @@ ____exports.SerializationType.DESERIALIZE = 2
26923
26923
  ____exports.SerializationType[____exports.SerializationType.DESERIALIZE] = "DESERIALIZE"
26924
26924
  return ____exports
26925
26925
  end,
26926
- ["src.features.saveDataManager.saveDataManagerConstants"] = function(...)
26926
+ ["src.features.saveDataManager.constants"] = function(...)
26927
26927
  local ____exports = {}
26928
+ local ____SaveDataKey = require("src.enums.SaveDataKey")
26929
+ local SaveDataKey = ____SaveDataKey.SaveDataKey
26928
26930
  --- Set this to true to enable more verbosity in the save data manger.
26929
26931
  ____exports.SAVE_DATA_MANAGER_DEBUG = false
26930
26932
  ____exports.SAVE_DATA_MANAGER_FEATURE_NAME = "save data manager"
26933
+ --- When the Glowing Hour Glass is used, certain save data keys will automatically be restored to a
26934
+ -- backup.
26935
+ ____exports.SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_BACKUP_KEYS = {SaveDataKey.RUN, SaveDataKey.LEVEL}
26931
26936
  return ____exports
26932
26937
  end,
26933
26938
  ["src.features.saveDataManager.serializationBrands"] = function(...)
@@ -27608,7 +27613,7 @@ return ____exports
27608
27613
  end,
27609
27614
  ["src.functions.charge"] = function(...)
27610
27615
  local ____exports = {}
27611
- local getClampedChargesToAdd, getChargesToAddWithAAAModifier, shouldPlayFullRechargeSound
27616
+ local getChargesToAddWithAAAModifier, shouldPlayFullRechargeSound
27612
27617
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
27613
27618
  local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
27614
27619
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
@@ -27650,7 +27655,8 @@ function ____exports.addCharge(self, player, activeSlot, numCharges, playSoundEf
27650
27655
  playSoundEffect = true
27651
27656
  end
27652
27657
  local hud = game:GetHUD()
27653
- local chargesToAdd = getClampedChargesToAdd(nil, player, activeSlot, numCharges)
27658
+ local chargesAwayFromMax = ____exports.getChargesAwayFromMax(nil, player, activeSlot)
27659
+ local chargesToAdd = numCharges > chargesAwayFromMax and chargesAwayFromMax or numCharges
27654
27660
  local modifiedChargesToAdd = getChargesToAddWithAAAModifier(nil, player, activeSlot, chargesToAdd)
27655
27661
  local totalCharge = ____exports.getTotalCharge(nil, player, activeSlot)
27656
27662
  local newCharge = totalCharge + modifiedChargesToAdd
@@ -27697,6 +27703,9 @@ function ____exports.addRoomClearChargeToSlot(self, player, activeSlot, bigRoomD
27697
27703
  local room = game:GetRoom()
27698
27704
  local roomShape = room:GetRoomShape()
27699
27705
  local numCharges = bigRoomDoubleCharge and getRoomShapeCharges(nil, roomShape) or 1
27706
+ if chargeType == ItemConfigChargeType.TIMED then
27707
+ numCharges = getCollectibleMaxCharges(nil, activeItem)
27708
+ end
27700
27709
  ____exports.addCharge(
27701
27710
  nil,
27702
27711
  player,
@@ -27705,43 +27714,28 @@ function ____exports.addRoomClearChargeToSlot(self, player, activeSlot, bigRoomD
27705
27714
  playSoundEffect
27706
27715
  )
27707
27716
  end
27708
- function getClampedChargesToAdd(self, player, activeSlot, numCharges)
27709
- local activeItem = player:GetActiveItem(activeSlot)
27710
- local activeCharge = player:GetActiveCharge(activeSlot)
27711
- local batteryCharge = player:GetBatteryCharge(activeSlot)
27712
- local hasBattery = player:HasCollectible(CollectibleType.BATTERY)
27713
- local maxCharges = getCollectibleMaxCharges(nil, activeItem)
27714
- if not hasBattery and activeCharge == maxCharges then
27715
- return 0
27716
- end
27717
- if hasBattery and batteryCharge == maxCharges then
27718
- return 0
27719
- end
27720
- if not hasBattery and activeCharge + 1 == maxCharges then
27721
- return 1
27722
- end
27723
- if hasBattery and batteryCharge + 1 == maxCharges then
27724
- return 1
27725
- end
27726
- return numCharges
27727
- end
27728
27717
  function getChargesToAddWithAAAModifier(self, player, activeSlot, chargesToAdd)
27729
- local activeItem = player:GetActiveItem(activeSlot)
27730
- local activeCharge = player:GetActiveCharge(activeSlot)
27731
- local batteryCharge = player:GetBatteryCharge(activeSlot)
27732
- local hasBattery = player:HasCollectible(CollectibleType.BATTERY)
27733
27718
  local hasAAABattery = player:HasTrinket(TrinketType.AAA_BATTERY)
27734
- local maxCharges = getCollectibleMaxCharges(nil, activeItem)
27735
27719
  if not hasAAABattery then
27736
27720
  return chargesToAdd
27737
27721
  end
27738
- if not hasBattery and activeCharge + chargesToAdd == maxCharges - 1 then
27739
- return chargesToAdd + 1
27740
- end
27741
- if hasBattery and batteryCharge + chargesToAdd == maxCharges - 1 then
27742
- return chargesToAdd + 1
27743
- end
27744
- return chargesToAdd
27722
+ local chargesAwayFromMax = ____exports.getChargesAwayFromMax(nil, player, activeSlot)
27723
+ local AAABatteryShouldApply = chargesToAdd == chargesAwayFromMax - 1
27724
+ return AAABatteryShouldApply and chargesToAdd + 1 or chargesToAdd
27725
+ end
27726
+ --- Helper function to get the amount of charges away from the maximum charge that a particular
27727
+ -- player is.
27728
+ --
27729
+ -- This function accounts for The Battery. For example, if the player has 2/6 charges on a D6, this
27730
+ -- function will return 10 (because there are 4 charges remaining on the base charge and 6 charges
27731
+ -- remaining on The Battery charge).
27732
+ function ____exports.getChargesAwayFromMax(self, player, activeSlot)
27733
+ local totalCharge = ____exports.getTotalCharge(nil, player, activeSlot)
27734
+ local activeItem = player:GetActiveItem(activeSlot)
27735
+ local hasBattery = player:HasCollectible(CollectibleType.BATTERY)
27736
+ local maxCharges = getCollectibleMaxCharges(nil, activeItem)
27737
+ local effectiveMaxCharges = hasBattery and maxCharges * 2 or maxCharges
27738
+ return effectiveMaxCharges - totalCharge
27745
27739
  end
27746
27740
  --- Helper function to get the combined normal charge and the battery charge for the player's active
27747
27741
  -- item. This is useful because you have to add these two values together when setting the active
@@ -30062,8 +30056,8 @@ local ____SerializationBrand = require("src.enums.private.SerializationBrand")
30062
30056
  local SerializationBrand = ____SerializationBrand.SerializationBrand
30063
30057
  local ____SerializationType = require("src.enums.SerializationType")
30064
30058
  local SerializationType = ____SerializationType.SerializationType
30065
- local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
30066
- local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
30059
+ local ____constants = require("src.features.saveDataManager.constants")
30060
+ local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
30067
30061
  local ____serializationBrands = require("src.features.saveDataManager.serializationBrands")
30068
30062
  local isSerializationBrand = ____serializationBrands.isSerializationBrand
30069
30063
  local ____array = require("src.functions.array")
@@ -31366,8 +31360,8 @@ local ____types = require("src.functions.types")
31366
31360
  local isTable = ____types.isTable
31367
31361
  local ____utils = require("src.functions.utils")
31368
31362
  local getTraversalDescription = ____utils.getTraversalDescription
31369
- local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
31370
- local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
31363
+ local ____constants = require("src.features.saveDataManager.constants")
31364
+ local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
31371
31365
  local ____serializationBrands = require("src.features.saveDataManager.serializationBrands")
31372
31366
  local isSerializationBrand = ____serializationBrands.isSerializationBrand
31373
31367
  --- `merge` takes the values from a new table and recursively merges them into an old object (while
@@ -31507,11 +31501,11 @@ local iterateTableInOrder = ____table.iterateTableInOrder
31507
31501
  local ____types = require("src.functions.types")
31508
31502
  local isString = ____types.isString
31509
31503
  local isTable = ____types.isTable
31504
+ local ____constants = require("src.features.saveDataManager.constants")
31505
+ local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
31506
+ local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
31510
31507
  local ____merge = require("src.features.saveDataManager.merge")
31511
31508
  local merge = ____merge.merge
31512
- local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
31513
- local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
31514
- local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
31515
31509
  function readSaveDatFile(self, mod)
31516
31510
  local renderFrameCount = Isaac.GetFrameCount()
31517
31511
  local ok, jsonStringOrErrMsg = pcall(tryLoadModData, mod)
@@ -31547,21 +31541,21 @@ function ____exports.loadFromDisk(self, mod, oldSaveData)
31547
31541
  iterateTableInOrder(
31548
31542
  nil,
31549
31543
  newSaveData,
31550
- function(____, key, value)
31551
- if not isString(nil, key) then
31544
+ function(____, subscriberName, saveData)
31545
+ if not isString(nil, subscriberName) then
31552
31546
  return
31553
31547
  end
31554
- if not isTable(nil, value) then
31548
+ if not isTable(nil, saveData) then
31555
31549
  return
31556
31550
  end
31557
- local oldSaveDataForSubscriber = oldSaveData[key]
31551
+ local oldSaveDataForSubscriber = oldSaveData[subscriberName]
31558
31552
  if oldSaveDataForSubscriber == nil then
31559
31553
  return
31560
31554
  end
31561
31555
  if SAVE_DATA_MANAGER_DEBUG then
31562
- log(nil, "Merging in stored data for feature: " .. key)
31556
+ log(nil, "Merging in stored data for feature: " .. subscriberName)
31563
31557
  end
31564
- merge(nil, oldSaveDataForSubscriber, value, key)
31558
+ merge(nil, oldSaveDataForSubscriber, saveData, subscriberName)
31565
31559
  end,
31566
31560
  SAVE_DATA_MANAGER_DEBUG
31567
31561
  )
@@ -31577,6 +31571,9 @@ local ____exports = {}
31577
31571
  ____exports.saveDataMap = {}
31578
31572
  ____exports.saveDataDefaultsMap = {}
31579
31573
  ____exports.saveDataConditionalFuncMap = {}
31574
+ --- We backup some save data keys on every new room for the purposes of restoring it when Glowing
31575
+ -- Hour Glass is used.
31576
+ ____exports.saveDataGlowingHourGlassMap = {}
31580
31577
  return ____exports
31581
31578
  end,
31582
31579
  ["src.features.saveDataManager.save"] = function(...)
@@ -31594,9 +31591,9 @@ local ____log = require("src.functions.log")
31594
31591
  local log = ____log.log
31595
31592
  local ____table = require("src.functions.table")
31596
31593
  local iterateTableInOrder = ____table.iterateTableInOrder
31597
- local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
31598
- local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
31599
- local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
31594
+ local ____constants = require("src.features.saveDataManager.constants")
31595
+ local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
31596
+ local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
31600
31597
  function getAllSaveDataToWriteToDisk(self, saveDataMap, saveDataConditionalFuncMap)
31601
31598
  local allSaveData = {}
31602
31599
  iterateTableInOrder(
@@ -31634,7 +31631,7 @@ local ____lualib = require("lualib_bundle")
31634
31631
  local Set = ____lualib.Set
31635
31632
  local __TS__New = ____lualib.__TS__New
31636
31633
  local ____exports = {}
31637
- local postUseItemGlowingHourGlass, postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
31634
+ local postUseItemGlowingHourGlass, postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, makeGlowingHourGlassBackup, restoreGlowingHourGlassBackup, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun, restoreGlowingHourGlassDataOnNextRoom
31638
31635
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
31639
31636
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
31640
31637
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
@@ -31655,18 +31652,23 @@ local onFirstFloor = ____stage.onFirstFloor
31655
31652
  local ____table = require("src.functions.table")
31656
31653
  local clearTable = ____table.clearTable
31657
31654
  local iterateTableInOrder = ____table.iterateTableInOrder
31655
+ local ____constants = require("src.features.saveDataManager.constants")
31656
+ local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
31657
+ local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
31658
+ local SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_BACKUP_KEYS = ____constants.SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_BACKUP_KEYS
31658
31659
  local ____load = require("src.features.saveDataManager.load")
31659
31660
  local loadFromDisk = ____load.loadFromDisk
31660
31661
  local ____maps = require("src.features.saveDataManager.maps")
31661
31662
  local saveDataConditionalFuncMap = ____maps.saveDataConditionalFuncMap
31662
31663
  local saveDataDefaultsMap = ____maps.saveDataDefaultsMap
31664
+ local saveDataGlowingHourGlassMap = ____maps.saveDataGlowingHourGlassMap
31663
31665
  local saveDataMap = ____maps.saveDataMap
31666
+ local ____merge = require("src.features.saveDataManager.merge")
31667
+ local merge = ____merge.merge
31664
31668
  local ____save = require("src.features.saveDataManager.save")
31665
31669
  local saveToDisk = ____save.saveToDisk
31666
- local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
31667
- local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
31668
- local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
31669
31670
  function postUseItemGlowingHourGlass(self)
31671
+ restoreGlowingHourGlassDataOnNextRoom = true
31670
31672
  return nil
31671
31673
  end
31672
31674
  function postPlayerInit(self)
@@ -31703,6 +31705,63 @@ function postNewLevel(self)
31703
31705
  end
31704
31706
  function postNewRoomEarly(self)
31705
31707
  restoreDefaults(nil, SaveDataKey.ROOM)
31708
+ if restoreGlowingHourGlassDataOnNextRoom then
31709
+ restoreGlowingHourGlassDataOnNextRoom = false
31710
+ restoreGlowingHourGlassBackup(nil)
31711
+ else
31712
+ makeGlowingHourGlassBackup(nil)
31713
+ end
31714
+ end
31715
+ function makeGlowingHourGlassBackup(self)
31716
+ iterateTableInOrder(
31717
+ nil,
31718
+ saveDataMap,
31719
+ function(____, subscriberName, saveData)
31720
+ for ____, saveDataKey in ipairs(SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_BACKUP_KEYS) do
31721
+ do
31722
+ local childTable = saveData[saveDataKey]
31723
+ if childTable == nil then
31724
+ goto __continue18
31725
+ end
31726
+ local saveDataGlowingHourGlass = saveDataGlowingHourGlassMap[subscriberName]
31727
+ if saveDataGlowingHourGlass == nil then
31728
+ saveDataGlowingHourGlass = {}
31729
+ end
31730
+ local copiedChildTable = deepCopy(nil, childTable)
31731
+ saveDataGlowingHourGlass[saveDataKey] = copiedChildTable
31732
+ end
31733
+ ::__continue18::
31734
+ end
31735
+ end,
31736
+ SAVE_DATA_MANAGER_DEBUG
31737
+ )
31738
+ end
31739
+ function restoreGlowingHourGlassBackup(self)
31740
+ iterateTableInOrder(
31741
+ nil,
31742
+ saveDataMap,
31743
+ function(____, subscriberName, saveData)
31744
+ for ____, saveDataKey in ipairs(SAVE_DATA_MANAGER_GLOWING_HOUR_GLASS_BACKUP_KEYS) do
31745
+ do
31746
+ local childTable = saveData[saveDataKey]
31747
+ if childTable == nil then
31748
+ goto __continue24
31749
+ end
31750
+ local saveDataGlowingHourGlass = saveDataGlowingHourGlassMap[subscriberName]
31751
+ if saveDataGlowingHourGlass == nil then
31752
+ goto __continue24
31753
+ end
31754
+ local childTableBackup = saveDataGlowingHourGlass[saveDataKey]
31755
+ if childTableBackup == nil then
31756
+ goto __continue24
31757
+ end
31758
+ merge(nil, childTable, childTableBackup, subscriberName .. "__glowingHourGlass")
31759
+ end
31760
+ ::__continue24::
31761
+ end
31762
+ end,
31763
+ SAVE_DATA_MANAGER_DEBUG
31764
+ )
31706
31765
  end
31707
31766
  function restoreDefaultsAll(self)
31708
31767
  restoreDefaults(nil, SaveDataKey.RUN)
@@ -31749,6 +31808,7 @@ end
31749
31808
  RESETTABLE_SAVE_DATA_KEYS = __TS__New(Set, {SaveDataKey.RUN, SaveDataKey.LEVEL, SaveDataKey.ROOM})
31750
31809
  mod = nil
31751
31810
  loadedDataOnThisRun = false
31811
+ restoreGlowingHourGlassDataOnNextRoom = false
31752
31812
  function ____exports.saveDataManagerInit(self, incomingMod)
31753
31813
  mod = incomingMod
31754
31814
  mod:AddCallback(ModCallback.POST_USE_ITEM, postUseItemGlowingHourGlass, CollectibleType.GLOWING_HOUR_GLASS)
@@ -31784,6 +31844,8 @@ local ____deepCopy = require("src.functions.deepCopy")
31784
31844
  local deepCopy = ____deepCopy.deepCopy
31785
31845
  local ____types = require("src.functions.types")
31786
31846
  local isString = ____types.isString
31847
+ local ____constants = require("src.features.saveDataManager.constants")
31848
+ local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
31787
31849
  local ____main = require("src.features.saveDataManager.main")
31788
31850
  local forceSaveDataManagerLoad = ____main.forceSaveDataManagerLoad
31789
31851
  local forceSaveDataManagerSave = ____main.forceSaveDataManagerSave
@@ -31792,8 +31854,6 @@ local ____maps = require("src.features.saveDataManager.maps")
31792
31854
  local saveDataConditionalFuncMap = ____maps.saveDataConditionalFuncMap
31793
31855
  local saveDataDefaultsMap = ____maps.saveDataDefaultsMap
31794
31856
  local saveDataMap = ____maps.saveDataMap
31795
- local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
31796
- local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
31797
31857
  --- This is the entry point to the save data manager, a system which provides two major features:
31798
31858
  --
31799
31859
  -- 1. automatic resetting of variables on a new run, on a new level, or on a new room (as desired)
@@ -31865,9 +31925,14 @@ local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MA
31865
31925
  -- data manager cannot do this on its own because it cannot know when your mod features are finished
31866
31926
  -- initializing.)
31867
31927
  --
31868
- -- Finally, some features may have variables that need to be automatically reset per run/level, but
31869
- -- not saved to disk on game exit. (For example, if they contain functions or other non-serializable
31870
- -- data.) For these cases, set the second argument to `() => false`.
31928
+ -- Some features may have variables that need to be automatically reset per run/level, but not saved
31929
+ -- to disk on game exit. (For example, if they contain functions or other non-serializable data.)
31930
+ -- For these cases, set the second argument to `() => false`.
31931
+ --
31932
+ -- Note that when the player uses Glowing Hour Glass, the save data manager will automatically
31933
+ -- restore any variables on a "run" or "level" object with a backup that was created when the room
31934
+ -- was entered. Thus, you should not have to explicitly program support for Glowing Hour Glass into
31935
+ -- your mod features that use the save data manager.
31871
31936
  --
31872
31937
  -- @param key The name of the file or feature that is submitting data to be managed by the save data
31873
31938
  -- manager. The save data manager will throw an error if the key is already registered.
@@ -39636,7 +39701,7 @@ return ____exports
39636
39701
  local ____exports = {}
39637
39702
  return ____exports
39638
39703
  end,
39639
- ["src.features.customStage.customStageConstants"] = function(...)
39704
+ ["src.features.customStage.constants"] = function(...)
39640
39705
  local ____exports = {}
39641
39706
  ____exports.CUSTOM_STAGE_FEATURE_NAME = "customStage"
39642
39707
  ____exports.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = "gfx/isaacscript-custom-stage"
@@ -39682,8 +39747,8 @@ local trimPrefix = ____string.trimPrefix
39682
39747
  local ____utils = require("src.functions.utils")
39683
39748
  local erange = ____utils.erange
39684
39749
  local irange = ____utils.irange
39685
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
39686
- local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
39750
+ local ____constants = require("src.features.customStage.constants")
39751
+ local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____constants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
39687
39752
  function getBackdropPNGPath(self, customStage, backdropKind, rng)
39688
39753
  local backdrop = customStage.backdropPNGPaths == nil and DEFAULT_BACKDROP or customStage.backdropPNGPaths
39689
39754
  local pathArray = backdrop[backdropKind]
@@ -40175,7 +40240,7 @@ return ____exports
40175
40240
  local ____exports = {}
40176
40241
  return ____exports
40177
40242
  end,
40178
- ["src.features.customTrapdoor.customTrapdoorConstants"] = function(...)
40243
+ ["src.features.customTrapdoor.constants"] = function(...)
40179
40244
  local ____lualib = require("lualib_bundle")
40180
40245
  local Set = ____lualib.Set
40181
40246
  local __TS__New = ____lualib.__TS__New
@@ -40258,10 +40323,10 @@ local ____positionVelocity = require("src.functions.positionVelocity")
40258
40323
  local anyPlayerCloserThan = ____positionVelocity.anyPlayerCloserThan
40259
40324
  local ____roomClearFrame = require("src.features.roomClearFrame")
40260
40325
  local getRoomClearGameFrame = ____roomClearFrame.getRoomClearGameFrame
40261
- local ____customTrapdoorConstants = require("src.features.customTrapdoor.customTrapdoorConstants")
40262
- local TRAPDOOR_BOSS_REACTION_FRAMES = ____customTrapdoorConstants.TRAPDOOR_BOSS_REACTION_FRAMES
40263
- local TRAPDOOR_OPEN_DISTANCE = ____customTrapdoorConstants.TRAPDOOR_OPEN_DISTANCE
40264
- local TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS = ____customTrapdoorConstants.TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS
40326
+ local ____constants = require("src.features.customTrapdoor.constants")
40327
+ local TRAPDOOR_BOSS_REACTION_FRAMES = ____constants.TRAPDOOR_BOSS_REACTION_FRAMES
40328
+ local TRAPDOOR_OPEN_DISTANCE = ____constants.TRAPDOOR_OPEN_DISTANCE
40329
+ local TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS = ____constants.TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS
40265
40330
  function shouldTrapdoorOpen(self, gridEntity, firstSpawn)
40266
40331
  local room = game:GetRoom()
40267
40332
  local roomClear = room:IsClear()
@@ -40361,8 +40426,8 @@ local ____vector = require("src.functions.vector")
40361
40426
  local isVector = ____vector.isVector
40362
40427
  local ____customGridEntity = require("src.features.customGridEntity")
40363
40428
  local spawnCustomGridEntity = ____customGridEntity.spawnCustomGridEntity
40364
- local ____customTrapdoorConstants = require("src.features.customTrapdoor.customTrapdoorConstants")
40365
- local GridEntityTypeCustom = ____customTrapdoorConstants.GridEntityTypeCustom
40429
+ local ____constants = require("src.features.customTrapdoor.constants")
40430
+ local GridEntityTypeCustom = ____constants.GridEntityTypeCustom
40366
40431
  local ____openClose = require("src.features.customTrapdoor.openClose")
40367
40432
  local shouldTrapdoorSpawnOpen = ____openClose.shouldTrapdoorSpawnOpen
40368
40433
  local ____v = require("src.features.customTrapdoor.v")
@@ -40405,8 +40470,8 @@ local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNot
40405
40470
  local ____nextStage = require("src.functions.nextStage")
40406
40471
  local getNextStage = ____nextStage.getNextStage
40407
40472
  local getNextStageType = ____nextStage.getNextStageType
40408
- local ____customTrapdoorConstants = require("src.features.customTrapdoor.customTrapdoorConstants")
40409
- local CUSTOM_TRAPDOOR_FEATURE_NAME = ____customTrapdoorConstants.CUSTOM_TRAPDOOR_FEATURE_NAME
40473
+ local ____constants = require("src.features.customTrapdoor.constants")
40474
+ local CUSTOM_TRAPDOOR_FEATURE_NAME = ____constants.CUSTOM_TRAPDOOR_FEATURE_NAME
40410
40475
  local ____spawn = require("src.features.customTrapdoor.spawn")
40411
40476
  local spawnCustomTrapdoorToDestination = ____spawn.spawnCustomTrapdoorToDestination
40412
40477
  --- Helper function to spawn a trapdoor grid entity that will take a player to a custom stage. If you
@@ -40581,8 +40646,8 @@ local ____lualib = require("lualib_bundle")
40581
40646
  local Map = ____lualib.Map
40582
40647
  local __TS__New = ____lualib.__TS__New
40583
40648
  local ____exports = {}
40584
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
40585
- local UIStreakAnimation = ____customStageConstants.UIStreakAnimation
40649
+ local ____constants = require("src.features.customStage.constants")
40650
+ local UIStreakAnimation = ____constants.UIStreakAnimation
40586
40651
  local v = {
40587
40652
  run = {
40588
40653
  currentCustomStage = nil,
@@ -41098,8 +41163,8 @@ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
41098
41163
  local spawnEffectWithSeed = ____entitiesSpecific.spawnEffectWithSeed
41099
41164
  local ____string = require("src.functions.string")
41100
41165
  local removeCharactersBefore = ____string.removeCharactersBefore
41101
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
41102
- local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
41166
+ local ____constants = require("src.features.customStage.constants")
41167
+ local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____constants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
41103
41168
  local ____v = require("src.features.customStage.v")
41104
41169
  local v = ____v.default
41105
41170
  --- Normally, we would make a custom entity to represent a shadow effect, but we don't want to
@@ -41299,9 +41364,9 @@ local getEnumValues = ____enums.getEnumValues
41299
41364
  local ____ui = require("src.functions.ui")
41300
41365
  local getScreenBottomCenterPos = ____ui.getScreenBottomCenterPos
41301
41366
  local getScreenTopCenterPos = ____ui.getScreenTopCenterPos
41302
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
41303
- local UIStreakAnimation = ____customStageConstants.UIStreakAnimation
41304
- local UI_STREAK_ANIMATION_END_FRAMES = ____customStageConstants.UI_STREAK_ANIMATION_END_FRAMES
41367
+ local ____constants = require("src.features.customStage.constants")
41368
+ local UIStreakAnimation = ____constants.UIStreakAnimation
41369
+ local UI_STREAK_ANIMATION_END_FRAMES = ____constants.UI_STREAK_ANIMATION_END_FRAMES
41305
41370
  local ____v = require("src.features.customStage.v")
41306
41371
  local v = ____v.default
41307
41372
  function checkEndTopStreakText(self)
@@ -43533,9 +43598,9 @@ local pause = ____pause.pause
43533
43598
  local unpause = ____pause.unpause
43534
43599
  local ____runInNFrames = require("src.features.runInNFrames")
43535
43600
  local runNextGameFrame = ____runInNFrames.runNextGameFrame
43536
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
43537
- local CUSTOM_STAGE_FEATURE_NAME = ____customStageConstants.CUSTOM_STAGE_FEATURE_NAME
43538
- local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
43601
+ local ____constants = require("src.features.customStage.constants")
43602
+ local CUSTOM_STAGE_FEATURE_NAME = ____constants.CUSTOM_STAGE_FEATURE_NAME
43603
+ local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____constants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
43539
43604
  local ____exports = require("src.features.customStage.exports")
43540
43605
  local CUSTOM_FLOOR_STAGE = ____exports.CUSTOM_FLOOR_STAGE
43541
43606
  local CUSTOM_FLOOR_STAGE_TYPE = ____exports.CUSTOM_FLOOR_STAGE_TYPE
@@ -43775,8 +43840,8 @@ local ____exports = require("src.features.saveDataManager.exports")
43775
43840
  local saveDataManager = ____exports.saveDataManager
43776
43841
  local ____backdrop = require("src.features.customStage.backdrop")
43777
43842
  local setCustomStageBackdrop = ____backdrop.setCustomStageBackdrop
43778
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
43779
- local CUSTOM_STAGE_FEATURE_NAME = ____customStageConstants.CUSTOM_STAGE_FEATURE_NAME
43843
+ local ____constants = require("src.features.customStage.constants")
43844
+ local CUSTOM_STAGE_FEATURE_NAME = ____constants.CUSTOM_STAGE_FEATURE_NAME
43780
43845
  local ____customStageGridEntities = require("src.features.customStage.customStageGridEntities")
43781
43846
  local convertVanillaTrapdoors = ____customStageGridEntities.convertVanillaTrapdoors
43782
43847
  local removeUrnRewards = ____customStageGridEntities.removeUrnRewards
@@ -44329,12 +44394,12 @@ local isPlayerUsingPony = ____ponyDetection.isPlayerUsingPony
44329
44394
  local ____runInNFrames = require("src.features.runInNFrames")
44330
44395
  local runInNGameFrames = ____runInNFrames.runInNGameFrames
44331
44396
  local runNextRenderFrame = ____runInNFrames.runNextRenderFrame
44332
- local ____customTrapdoorConstants = require("src.features.customTrapdoor.customTrapdoorConstants")
44333
- local ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL = ____customTrapdoorConstants.ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL
44334
- local CUSTOM_TRAPDOOR_FEATURE_NAME = ____customTrapdoorConstants.CUSTOM_TRAPDOOR_FEATURE_NAME
44335
- local OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES = ____customTrapdoorConstants.OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES
44336
- local OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES = ____customTrapdoorConstants.OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES
44337
- local TRAPDOOR_TOUCH_DISTANCE = ____customTrapdoorConstants.TRAPDOOR_TOUCH_DISTANCE
44397
+ local ____constants = require("src.features.customTrapdoor.constants")
44398
+ local ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL = ____constants.ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL
44399
+ local CUSTOM_TRAPDOOR_FEATURE_NAME = ____constants.CUSTOM_TRAPDOOR_FEATURE_NAME
44400
+ local OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES = ____constants.OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES
44401
+ local OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES = ____constants.OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES
44402
+ local TRAPDOOR_TOUCH_DISTANCE = ____constants.TRAPDOOR_TOUCH_DISTANCE
44338
44403
  local ____v = require("src.features.customTrapdoor.v")
44339
44404
  local v = ____v.default
44340
44405
  function canPlayerInteractWithTrapdoor(self, player)
@@ -44502,10 +44567,10 @@ local ____exports = require("src.features.saveDataManager.exports")
44502
44567
  local saveDataManager = ____exports.saveDataManager
44503
44568
  local ____blackSprite = require("src.features.customTrapdoor.blackSprite")
44504
44569
  local drawBlackSprite = ____blackSprite.drawBlackSprite
44505
- local ____customTrapdoorConstants = require("src.features.customTrapdoor.customTrapdoorConstants")
44506
- local CUSTOM_TRAPDOOR_FEATURE_NAME = ____customTrapdoorConstants.CUSTOM_TRAPDOOR_FEATURE_NAME
44507
- local GridEntityTypeCustom = ____customTrapdoorConstants.GridEntityTypeCustom
44508
- local PIXELATION_TO_BLACK_FRAMES = ____customTrapdoorConstants.PIXELATION_TO_BLACK_FRAMES
44570
+ local ____constants = require("src.features.customTrapdoor.constants")
44571
+ local CUSTOM_TRAPDOOR_FEATURE_NAME = ____constants.CUSTOM_TRAPDOOR_FEATURE_NAME
44572
+ local GridEntityTypeCustom = ____constants.GridEntityTypeCustom
44573
+ local PIXELATION_TO_BLACK_FRAMES = ____constants.PIXELATION_TO_BLACK_FRAMES
44509
44574
  local ____openClose = require("src.features.customTrapdoor.openClose")
44510
44575
  local checkCustomTrapdoorOpenClose = ____openClose.checkCustomTrapdoorOpenClose
44511
44576
  local ____touched = require("src.features.customTrapdoor.touched")
@@ -46970,7 +47035,7 @@ return ____exports
46970
47035
  ["package"] = function(...)
46971
47036
  return {
46972
47037
  name = "isaacscript-common",
46973
- version = "11.2.3",
47038
+ version = "12.0.0",
46974
47039
  description = "Helper functions and features for IsaacScript mods.",
46975
47040
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
46976
47041
  homepage = "https://isaacscript.github.io/",
package/dist/package.lua CHANGED
@@ -1,6 +1,6 @@
1
1
  return {
2
2
  name = "isaacscript-common",
3
- version = "11.2.3",
3
+ version = "12.0.0",
4
4
  description = "Helper functions and features for IsaacScript mods.",
5
5
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
6
6
  homepage = "https://isaacscript.github.io/",
@@ -27,8 +27,8 @@ local trimPrefix = ____string.trimPrefix
27
27
  local ____utils = require("src.functions.utils")
28
28
  local erange = ____utils.erange
29
29
  local irange = ____utils.irange
30
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
31
- local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
30
+ local ____constants = require("src.features.customStage.constants")
31
+ local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____constants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
32
32
  function getBackdropPNGPath(self, customStage, backdropKind, rng)
33
33
  local backdrop = customStage.backdropPNGPaths == nil and DEFAULT_BACKDROP or customStage.backdropPNGPaths
34
34
  local pathArray = backdrop[backdropKind]
@@ -11,4 +11,4 @@ export declare enum UIStreakAnimation {
11
11
  export declare const UI_STREAK_ANIMATION_END_FRAMES: {
12
12
  readonly [key in UIStreakAnimation]: int;
13
13
  };
14
- //# sourceMappingURL=customStageConstants.d.ts.map
14
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/customStage/constants.ts"],"names":[],"mappings":";AAAA,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AAEvD,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAEhF,uCAAuC;AACvC,oBAAY,iBAAiB;IAC3B,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED,uCAAuC;AACvC,eAAO,MAAM,8BAA8B,EAAE;IAC3C,QAAQ,EAAE,GAAG,IAAI,iBAAiB,GAAG,GAAG;CAKhC,CAAC"}
@@ -19,8 +19,8 @@ local ____exports = require("src.features.saveDataManager.exports")
19
19
  local saveDataManager = ____exports.saveDataManager
20
20
  local ____backdrop = require("src.features.customStage.backdrop")
21
21
  local setCustomStageBackdrop = ____backdrop.setCustomStageBackdrop
22
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
23
- local CUSTOM_STAGE_FEATURE_NAME = ____customStageConstants.CUSTOM_STAGE_FEATURE_NAME
22
+ local ____constants = require("src.features.customStage.constants")
23
+ local CUSTOM_STAGE_FEATURE_NAME = ____constants.CUSTOM_STAGE_FEATURE_NAME
24
24
  local ____customStageGridEntities = require("src.features.customStage.customStageGridEntities")
25
25
  local convertVanillaTrapdoors = ____customStageGridEntities.convertVanillaTrapdoors
26
26
  local removeUrnRewards = ____customStageGridEntities.removeUrnRewards
@@ -10,8 +10,8 @@ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
10
10
  local spawnEffectWithSeed = ____entitiesSpecific.spawnEffectWithSeed
11
11
  local ____string = require("src.functions.string")
12
12
  local removeCharactersBefore = ____string.removeCharactersBefore
13
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
14
- local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
13
+ local ____constants = require("src.features.customStage.constants")
14
+ local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____constants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
15
15
  local ____v = require("src.features.customStage.v")
16
16
  local v = ____v.default
17
17
  --- Normally, we would make a custom entity to represent a shadow effect, but we don't want to
@@ -1 +1 @@
1
- {"version":3,"file":"streakText.d.ts","sourceRoot":"","sources":["../../../../src/features/customStage/streakText.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAuEnE,wBAAgB,oBAAoB,IAAI,IAAI,CAS3C;AA0FD,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,GACjB,IAAI,CAYN;AA0ED,wBAAgB,kBAAkB,IAAI,IAAI,CAWzC"}
1
+ {"version":3,"file":"streakText.d.ts","sourceRoot":"","sources":["../../../../src/features/customStage/streakText.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAoEnE,wBAAgB,oBAAoB,IAAI,IAAI,CAS3C;AA0FD,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,GACjB,IAAI,CAYN;AA0ED,wBAAgB,kBAAkB,IAAI,IAAI,CAWzC"}
@@ -16,9 +16,9 @@ local getEnumValues = ____enums.getEnumValues
16
16
  local ____ui = require("src.functions.ui")
17
17
  local getScreenBottomCenterPos = ____ui.getScreenBottomCenterPos
18
18
  local getScreenTopCenterPos = ____ui.getScreenTopCenterPos
19
- local ____customStageConstants = require("src.features.customStage.customStageConstants")
20
- local UIStreakAnimation = ____customStageConstants.UIStreakAnimation
21
- local UI_STREAK_ANIMATION_END_FRAMES = ____customStageConstants.UI_STREAK_ANIMATION_END_FRAMES
19
+ local ____constants = require("src.features.customStage.constants")
20
+ local UIStreakAnimation = ____constants.UIStreakAnimation
21
+ local UI_STREAK_ANIMATION_END_FRAMES = ____constants.UI_STREAK_ANIMATION_END_FRAMES
22
22
  local ____v = require("src.features.customStage.v")
23
23
  local v = ____v.default
24
24
  function checkEndTopStreakText(self)
@@ -1,6 +1,6 @@
1
1
  import { ControllerIndex } from "isaac-typescript-definitions";
2
2
  import { CustomStage } from "../../interfaces/private/CustomStage";
3
- import { UIStreakAnimation } from "./customStageConstants";
3
+ import { UIStreakAnimation } from "./constants";
4
4
  declare const v: {
5
5
  run: {
6
6
  currentCustomStage: CustomStage | null;
@@ -1 +1 @@
1
- {"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../../src/features/customStage/v.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,QAAA,MAAM,CAAC;;;QAIH,iDAAiD;;;QAKjD,oFAAoF;;;;;;;;;;;;;;;;;CAqBvF,CAAC;AACF,eAAe,CAAC,CAAC;AAEjB,oCAAoC;AACpC,eAAO,MAAM,eAAe,0BAAiC,CAAC;AAE9D,+BAA+B;AAC/B,eAAO,MAAM,yBAAyB,mCAAuC,CAAC"}
1
+ {"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../../src/features/customStage/v.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,QAAA,MAAM,CAAC;;;QAIH,iDAAiD;;;QAKjD,oFAAoF;;;;;;;;;;;;;;;;;CAqBvF,CAAC;AACF,eAAe,CAAC,CAAC;AAEjB,oCAAoC;AACpC,eAAO,MAAM,eAAe,0BAAiC,CAAC;AAE9D,+BAA+B;AAC/B,eAAO,MAAM,yBAAyB,mCAAuC,CAAC"}