isaacscript-common 33.6.0 → 33.8.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.
@@ -14478,6 +14478,16 @@ declare interface ReadonlySetConstructor {
14478
14478
  readonly prototype: ReadonlySet<any>;
14479
14479
  }
14480
14480
 
14481
+ /**
14482
+ * Helper function to let the Rebirth Item Tracker know that it should write the submitted text
14483
+ * string to a file. This is useful for capturing text in programs like Open Broadcaster Software
14484
+ * (OBS).
14485
+ *
14486
+ * The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
14487
+ * Python program located at: https://github.com/Rchardon/RebirthItemTracker
14488
+ */
14489
+ export declare function rebirthItemTrackerWriteToFile(msg: string): void;
14490
+
14481
14491
  /**
14482
14492
  * Helper function to reload the current room using `Game.StartRoomTransition`.
14483
14493
  *
@@ -15656,6 +15666,9 @@ declare class SaveDataManager extends Feature {
15656
15666
  * your mod features that use the save data manager. If this is undesired for your specific
15657
15667
  * use-case, then add a key of `__ignoreGlowingHourGlass: true` to your "run" or "level" object.
15658
15668
  *
15669
+ * If you want the automatic variable restoring with Glowing Hour Glass functionality to apply to
15670
+ * a "persistent" object, you can add a key of `rewindWithGlowingHourGlass: true` to the object.
15671
+ *
15659
15672
  * @param key The name of the file or feature that is submitting data to be managed by the save
15660
15673
  * data manager. The save data manager will throw an error if the key is already
15661
15674
  * registered. Note that you can also pass a TSTL class instead of a string and the
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 33.6.0
3
+ isaacscript-common 33.8.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -21745,10 +21745,6 @@ function ____exports.newCollectibleSprite(self, collectibleType)
21745
21745
  sprite:Play(defaultAnimation, true)
21746
21746
  return sprite
21747
21747
  end
21748
- function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
21749
- local collectibleName = ____exports.getCollectibleName(nil, collectibleType)
21750
- Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
21751
- end
21752
21748
  function ____exports.removeCollectiblePickupDelay(self, collectible)
21753
21749
  if not isCollectible(nil, collectible) then
21754
21750
  local entityID = getEntityID(nil, collectible)
@@ -35098,6 +35094,20 @@ function CustomGridEntities.prototype.isCustomGridEntity(self, gridEntityOrGridI
35098
35094
  return gridEntityTypeCustom ~= nil
35099
35095
  end
35100
35096
  __TS__DecorateLegacy({Exported}, CustomGridEntities.prototype, "isCustomGridEntity", true)
35097
+ return ____exports
35098
+ end,
35099
+ ["src.functions.external"] = function(...)
35100
+ local ____exports = {}
35101
+ local ____collectibles = require("src.functions.collectibles")
35102
+ local getCollectibleName = ____collectibles.getCollectibleName
35103
+ local REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND = "REBIRTH_ITEM_TRACKER_WRITE_TO_FILE"
35104
+ function ____exports.rebirthItemTrackerWriteToFile(self, msg)
35105
+ Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
35106
+ end
35107
+ function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
35108
+ local collectibleName = getCollectibleName(nil, collectibleType)
35109
+ Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
35110
+ end
35101
35111
  return ____exports
35102
35112
  end,
35103
35113
  ["src.classes.features.callbackLogic.CustomRevive"] = function(...)
@@ -35117,8 +35127,8 @@ local ____ISCFeature = require("src.enums.ISCFeature")
35117
35127
  local ISCFeature = ____ISCFeature.ISCFeature
35118
35128
  local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
35119
35129
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
35120
- local ____collectibles = require("src.functions.collectibles")
35121
- local removeCollectibleFromItemTracker = ____collectibles.removeCollectibleFromItemTracker
35130
+ local ____external = require("src.functions.external")
35131
+ local removeCollectibleFromItemTracker = ____external.removeCollectibleFromItemTracker
35122
35132
  local ____log = require("src.functions.log")
35123
35133
  local log = ____log.log
35124
35134
  local ____logMisc = require("src.functions.logMisc")
@@ -36673,7 +36683,12 @@ end
36673
36683
  return ____exports
36674
36684
  end,
36675
36685
  ["src.classes.features.other.saveDataManager.glowingHourGlass"] = function(...)
36686
+ local ____lualib = require("lualib_bundle")
36687
+ local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
36688
+ local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
36689
+ local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
36676
36690
  local ____exports = {}
36691
+ local getKeysToBackup, GLOWING_HOUR_GLASS_BACKUP_KEYS, REWIND_WITH_GLOWING_HOUR_GLASS_KEY
36677
36692
  local ____SaveDataKey = require("src.enums.SaveDataKey")
36678
36693
  local SaveDataKey = ____SaveDataKey.SaveDataKey
36679
36694
  local ____SerializationType = require("src.enums.SerializationType")
@@ -36686,8 +36701,21 @@ local ____table = require("src.functions.table")
36686
36701
  local iterateTableInOrder = ____table.iterateTableInOrder
36687
36702
  local ____constants = require("src.classes.features.other.saveDataManager.constants")
36688
36703
  local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
36689
- local GLOWING_HOUR_GLASS_BACKUP_KEYS = {SaveDataKey.RUN, SaveDataKey.LEVEL}
36704
+ function getKeysToBackup(self, saveData)
36705
+ local shouldBackupPersistentObject = saveData.persistent ~= nil and saveData.persistent[REWIND_WITH_GLOWING_HOUR_GLASS_KEY] ~= nil
36706
+ local ____shouldBackupPersistentObject_1
36707
+ if shouldBackupPersistentObject then
36708
+ local ____array_0 = __TS__SparseArrayNew(table.unpack(GLOWING_HOUR_GLASS_BACKUP_KEYS))
36709
+ __TS__SparseArrayPush(____array_0, SaveDataKey.PERSISTENT)
36710
+ ____shouldBackupPersistentObject_1 = {__TS__SparseArraySpread(____array_0)}
36711
+ else
36712
+ ____shouldBackupPersistentObject_1 = GLOWING_HOUR_GLASS_BACKUP_KEYS
36713
+ end
36714
+ return ____shouldBackupPersistentObject_1
36715
+ end
36716
+ GLOWING_HOUR_GLASS_BACKUP_KEYS = {SaveDataKey.RUN, SaveDataKey.LEVEL}
36690
36717
  local IGNORE_GLOWING_HOUR_GLASS_KEY = "__ignoreGlowingHourGlass"
36718
+ REWIND_WITH_GLOWING_HOUR_GLASS_KEY = "__rewindWithGlowingHourGlass"
36691
36719
  function ____exports.makeGlowingHourGlassBackup(self, saveDataMap, saveDataConditionalFuncMap, saveDataGlowingHourGlassMap)
36692
36720
  iterateTableInOrder(
36693
36721
  nil,
@@ -36700,7 +36728,7 @@ function ____exports.makeGlowingHourGlassBackup(self, saveDataMap, saveDataCondi
36700
36728
  return
36701
36729
  end
36702
36730
  end
36703
- for ____, saveDataKey in ipairs(GLOWING_HOUR_GLASS_BACKUP_KEYS) do
36731
+ for ____, saveDataKey in ipairs(getKeysToBackup(nil, saveData)) do
36704
36732
  do
36705
36733
  local childTable = saveData[saveDataKey]
36706
36734
  if childTable == nil then
@@ -36736,7 +36764,7 @@ function ____exports.restoreGlowingHourGlassBackup(self, saveDataMap, saveDataCo
36736
36764
  return
36737
36765
  end
36738
36766
  end
36739
- for ____, saveDataKey in ipairs(GLOWING_HOUR_GLASS_BACKUP_KEYS) do
36767
+ for ____, saveDataKey in ipairs(getKeysToBackup(nil, saveData)) do
36740
36768
  do
36741
36769
  local childTable = saveData[saveDataKey]
36742
36770
  if childTable == nil then
@@ -54643,6 +54671,14 @@ do
54643
54671
  end
54644
54672
  end
54645
54673
  end
54674
+ do
54675
+ local ____export = require("src.functions.external")
54676
+ for ____exportKey, ____exportValue in pairs(____export) do
54677
+ if ____exportKey ~= "default" then
54678
+ ____exports[____exportKey] = ____exportValue
54679
+ end
54680
+ end
54681
+ end
54646
54682
  do
54647
54683
  local ____export = require("src.functions.familiars")
54648
54684
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -55759,6 +55795,14 @@ do
55759
55795
  end
55760
55796
  end
55761
55797
  end
55798
+ do
55799
+ local ____export = require("src.functions.external")
55800
+ for ____exportKey, ____exportValue in pairs(____export) do
55801
+ if ____exportKey ~= "default" then
55802
+ ____exports[____exportKey] = ____exportValue
55803
+ end
55804
+ end
55805
+ end
55762
55806
  do
55763
55807
  local ____export = require("src.functions.familiars")
55764
55808
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -14,8 +14,8 @@ local ____ISCFeature = require("src.enums.ISCFeature")
14
14
  local ISCFeature = ____ISCFeature.ISCFeature
15
15
  local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
16
16
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
17
- local ____collectibles = require("src.functions.collectibles")
18
- local removeCollectibleFromItemTracker = ____collectibles.removeCollectibleFromItemTracker
17
+ local ____external = require("src.functions.external")
18
+ local removeCollectibleFromItemTracker = ____external.removeCollectibleFromItemTracker
19
19
  local ____log = require("src.functions.log")
20
20
  local log = ____log.log
21
21
  local ____logMisc = require("src.functions.logMisc")
@@ -126,6 +126,9 @@ export declare class SaveDataManager extends Feature {
126
126
  * your mod features that use the save data manager. If this is undesired for your specific
127
127
  * use-case, then add a key of `__ignoreGlowingHourGlass: true` to your "run" or "level" object.
128
128
  *
129
+ * If you want the automatic variable restoring with Glowing Hour Glass functionality to apply to
130
+ * a "persistent" object, you can add a key of `rewindWithGlowingHourGlass: true` to the object.
131
+ *
129
132
  * @param key The name of the file or feature that is submitting data to be managed by the save
130
133
  * data manager. The save data manager will throw an error if the key is already
131
134
  * registered. Note that you can also pass a TSTL class instead of a string and the
@@ -1 +1 @@
1
- {"version":3,"file":"SaveDataManager.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/SaveDataManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAQzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,M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AqB,IAAI,OAAO;IAKhC,6BAA6B,IAAI,IAAI;CAQ7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"glowingHourGlass.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/saveDataManager/glowingHourGlass.ts"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAc3D,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,EACzD,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GACpD,IAAI,CAkDN;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,EACzD,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrD,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAC1C,IAAI,CAqDN"}
1
+ {"version":3,"file":"glowingHourGlass.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/saveDataManager/glowingHourGlass.ts"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAe3D,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,EACzD,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GACpD,IAAI,CAkDN;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrC,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,EACzD,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrD,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAC1C,IAAI,CAqDN"}
@@ -1,4 +1,9 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
3
+ local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
4
+ local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
1
5
  local ____exports = {}
6
+ local getKeysToBackup, GLOWING_HOUR_GLASS_BACKUP_KEYS, REWIND_WITH_GLOWING_HOUR_GLASS_KEY
2
7
  local ____SaveDataKey = require("src.enums.SaveDataKey")
3
8
  local SaveDataKey = ____SaveDataKey.SaveDataKey
4
9
  local ____SerializationType = require("src.enums.SerializationType")
@@ -11,10 +16,21 @@ local ____table = require("src.functions.table")
11
16
  local iterateTableInOrder = ____table.iterateTableInOrder
12
17
  local ____constants = require("src.classes.features.other.saveDataManager.constants")
13
18
  local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
14
- --- When the Glowing Hourglass is used, certain save data keys will automatically be restored to a
15
- -- backup.
16
- local GLOWING_HOUR_GLASS_BACKUP_KEYS = {SaveDataKey.RUN, SaveDataKey.LEVEL}
19
+ function getKeysToBackup(self, saveData)
20
+ local shouldBackupPersistentObject = saveData.persistent ~= nil and saveData.persistent[REWIND_WITH_GLOWING_HOUR_GLASS_KEY] ~= nil
21
+ local ____shouldBackupPersistentObject_1
22
+ if shouldBackupPersistentObject then
23
+ local ____array_0 = __TS__SparseArrayNew(table.unpack(GLOWING_HOUR_GLASS_BACKUP_KEYS))
24
+ __TS__SparseArrayPush(____array_0, SaveDataKey.PERSISTENT)
25
+ ____shouldBackupPersistentObject_1 = {__TS__SparseArraySpread(____array_0)}
26
+ else
27
+ ____shouldBackupPersistentObject_1 = GLOWING_HOUR_GLASS_BACKUP_KEYS
28
+ end
29
+ return ____shouldBackupPersistentObject_1
30
+ end
31
+ GLOWING_HOUR_GLASS_BACKUP_KEYS = {SaveDataKey.RUN, SaveDataKey.LEVEL}
17
32
  local IGNORE_GLOWING_HOUR_GLASS_KEY = "__ignoreGlowingHourGlass"
33
+ REWIND_WITH_GLOWING_HOUR_GLASS_KEY = "__rewindWithGlowingHourGlass"
18
34
  function ____exports.makeGlowingHourGlassBackup(self, saveDataMap, saveDataConditionalFuncMap, saveDataGlowingHourGlassMap)
19
35
  iterateTableInOrder(
20
36
  nil,
@@ -27,7 +43,7 @@ function ____exports.makeGlowingHourGlassBackup(self, saveDataMap, saveDataCondi
27
43
  return
28
44
  end
29
45
  end
30
- for ____, saveDataKey in ipairs(GLOWING_HOUR_GLASS_BACKUP_KEYS) do
46
+ for ____, saveDataKey in ipairs(getKeysToBackup(nil, saveData)) do
31
47
  do
32
48
  local childTable = saveData[saveDataKey]
33
49
  if childTable == nil then
@@ -63,7 +79,7 @@ function ____exports.restoreGlowingHourGlassBackup(self, saveDataMap, saveDataCo
63
79
  return
64
80
  end
65
81
  end
66
- for ____, saveDataKey in ipairs(GLOWING_HOUR_GLASS_BACKUP_KEYS) do
82
+ for ____, saveDataKey in ipairs(getKeysToBackup(nil, saveData)) do
67
83
  do
68
84
  local childTable = saveData[saveDataKey]
69
85
  if childTable == nil then
@@ -138,19 +138,6 @@ export declare function isVanillaCollectibleType(collectibleType: CollectibleTyp
138
138
  * If you intentionally want a question mark sprite, pass -1 as the collectible type.
139
139
  */
140
140
  export declare function newCollectibleSprite(collectibleType: CollectibleType | -1): Sprite;
141
- /**
142
- * Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
143
- * should remove an item.
144
- *
145
- * The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
146
- * Python program located at: https://github.com/Rchardon/RebirthItemTracker
147
- *
148
- * This function is useful when you need to add a "fake" collectible to a player. Note that calling
149
- * this function is not necessary when removing items from players. For example, when you remove a
150
- * collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
151
- * the item tracker will automatically remove it.
152
- */
153
- export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
154
141
  /**
155
142
  * Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20
156
143
  * frame delay before they can be picked up by a player.
@@ -1 +1 @@
1
- {"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AA0CtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,oBAAoB,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAoBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAgBL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,4BAA4B,EAAE,YAAY,GAAG,eAAe,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;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
1
+ {"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AA0CtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,oBAAoB,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAoBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAgBL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,MAAM,EAAE,YAAY,GACnB,WAAW,CA6Bb;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC,GAChE,MAAM,CAgBR;AAED;;;GAGG;AACH,wBA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AgB,SAAS,CACvB,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,OAAO,EAAE,GAAG,GACX,OAAO,CAGT;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAET;AAED,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,eAAe,GAAG,CAAC,CAAC,GACpC,MAAM,CAiBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAS5E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CASnE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAUnE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAuBtE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,YAAY,EACzB,uBAAuB,EAAE,uBAAuB,GAC/C,IAAI,CAWN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAqBN;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
@@ -407,20 +407,6 @@ function ____exports.newCollectibleSprite(self, collectibleType)
407
407
  sprite:Play(defaultAnimation, true)
408
408
  return sprite
409
409
  end
410
- --- Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
411
- -- should remove an item.
412
- --
413
- -- The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
414
- -- Python program located at: https://github.com/Rchardon/RebirthItemTracker
415
- --
416
- -- This function is useful when you need to add a "fake" collectible to a player. Note that calling
417
- -- this function is not necessary when removing items from players. For example, when you remove a
418
- -- collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
419
- -- the item tracker will automatically remove it.
420
- function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
421
- local collectibleName = ____exports.getCollectibleName(nil, collectibleType)
422
- Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
423
- end
424
410
  --- Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20
425
411
  -- frame delay before they can be picked up by a player.
426
412
  function ____exports.removeCollectiblePickupDelay(self, collectible)
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Helper functions that have to do with external programs.
3
+ *
4
+ * @module
5
+ */
6
+ import type { CollectibleType } from "isaac-typescript-definitions";
7
+ /**
8
+ * Helper function to let the Rebirth Item Tracker know that it should write the submitted text
9
+ * string to a file. This is useful for capturing text in programs like Open Broadcaster Software
10
+ * (OBS).
11
+ *
12
+ * The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
13
+ * Python program located at: https://github.com/Rchardon/RebirthItemTracker
14
+ */
15
+ export declare function rebirthItemTrackerWriteToFile(msg: string): void;
16
+ /**
17
+ * Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
18
+ * should remove an item.
19
+ *
20
+ * The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
21
+ * Python program located at: https://github.com/Rchardon/RebirthItemTracker
22
+ *
23
+ * This function is useful when you need to add a "fake" collectible to a player. Note that calling
24
+ * this function is not necessary when removing items from players. For example, when you remove a
25
+ * collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
26
+ * the item tracker will automatically remove it.
27
+ */
28
+ export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
29
+ //# sourceMappingURL=external.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/functions/external.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAMpE;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gCAAgC,CAC9C,eAAe,EAAE,eAAe,GAC/B,IAAI,CAQN"}
@@ -0,0 +1,28 @@
1
+ local ____exports = {}
2
+ local ____collectibles = require("src.functions.collectibles")
3
+ local getCollectibleName = ____collectibles.getCollectibleName
4
+ local REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND = "REBIRTH_ITEM_TRACKER_WRITE_TO_FILE"
5
+ --- Helper function to let the Rebirth Item Tracker know that it should write the submitted text
6
+ -- string to a file. This is useful for capturing text in programs like Open Broadcaster Software
7
+ -- (OBS).
8
+ --
9
+ -- The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
10
+ -- Python program located at: https://github.com/Rchardon/RebirthItemTracker
11
+ function ____exports.rebirthItemTrackerWriteToFile(self, msg)
12
+ Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
13
+ end
14
+ --- Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
15
+ -- should remove an item.
16
+ --
17
+ -- The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
18
+ -- Python program located at: https://github.com/Rchardon/RebirthItemTracker
19
+ --
20
+ -- This function is useful when you need to add a "fake" collectible to a player. Note that calling
21
+ -- this function is not necessary when removing items from players. For example, when you remove a
22
+ -- collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
23
+ -- the item tracker will automatically remove it.
24
+ function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
25
+ local collectibleName = getCollectibleName(nil, collectibleType)
26
+ Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
27
+ end
28
+ return ____exports
@@ -50,6 +50,7 @@ export * from "./functions/entities";
50
50
  export * from "./functions/entitiesSpecific";
51
51
  export * from "./functions/entityTypes";
52
52
  export * from "./functions/enums";
53
+ export * from "./functions/external";
53
54
  export * from "./functions/familiars";
54
55
  export * from "./functions/flag";
55
56
  export * from "./functions/globals";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CA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cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -415,6 +415,14 @@ do
415
415
  end
416
416
  end
417
417
  end
418
+ do
419
+ local ____export = require("src.functions.external")
420
+ for ____exportKey, ____exportValue in pairs(____export) do
421
+ if ____exportKey ~= "default" then
422
+ ____exports[____exportKey] = ____exportValue
423
+ end
424
+ end
425
+ end
418
426
  do
419
427
  local ____export = require("src.functions.familiars")
420
428
  for ____exportKey, ____exportValue in pairs(____export) do
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "33.6.0",
3
+ "version": "33.8.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -8,7 +8,7 @@ import {
8
8
  import { sfxManager } from "../../../core/cachedClasses";
9
9
  import { ISCFeature } from "../../../enums/ISCFeature";
10
10
  import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
11
- import { removeCollectibleFromItemTracker } from "../../../functions/collectibles";
11
+ import { removeCollectibleFromItemTracker } from "../../../functions/external";
12
12
  import { log } from "../../../functions/log";
13
13
  import { logError } from "../../../functions/logMisc";
14
14
  import {
@@ -297,6 +297,9 @@ export class SaveDataManager extends Feature {
297
297
  * your mod features that use the save data manager. If this is undesired for your specific
298
298
  * use-case, then add a key of `__ignoreGlowingHourGlass: true` to your "run" or "level" object.
299
299
  *
300
+ * If you want the automatic variable restoring with Glowing Hour Glass functionality to apply to
301
+ * a "persistent" object, you can add a key of `rewindWithGlowingHourGlass: true` to the object.
302
+ *
300
303
  * @param key The name of the file or feature that is submitting data to be managed by the save
301
304
  * data manager. The save data manager will throw an error if the key is already
302
305
  * registered. Note that you can also pass a TSTL class instead of a string and the
@@ -20,6 +20,7 @@ const GLOWING_HOUR_GLASS_BACKUP_KEYS = [
20
20
  ] as const;
21
21
 
22
22
  const IGNORE_GLOWING_HOUR_GLASS_KEY = "__ignoreGlowingHourGlass";
23
+ const REWIND_WITH_GLOWING_HOUR_GLASS_KEY = "__rewindWithGlowingHourGlass";
23
24
 
24
25
  export function makeGlowingHourGlassBackup(
25
26
  saveDataMap: LuaMap<string, SaveData>,
@@ -41,7 +42,7 @@ export function makeGlowingHourGlassBackup(
41
42
  }
42
43
  }
43
44
 
44
- for (const saveDataKey of GLOWING_HOUR_GLASS_BACKUP_KEYS) {
45
+ for (const saveDataKey of getKeysToBackup(saveData)) {
45
46
  const childTable = saveData[saveDataKey];
46
47
  if (childTable === undefined) {
47
48
  // This feature does not happen to store any variables on this particular child table.
@@ -98,7 +99,7 @@ export function restoreGlowingHourGlassBackup(
98
99
  }
99
100
  }
100
101
 
101
- for (const saveDataKey of GLOWING_HOUR_GLASS_BACKUP_KEYS) {
102
+ for (const saveDataKey of getKeysToBackup(saveData)) {
102
103
  const childTable = saveData[saveDataKey];
103
104
  if (childTable === undefined) {
104
105
  // This feature does not happen to store any variables on this particular child table.
@@ -136,3 +137,13 @@ export function restoreGlowingHourGlassBackup(
136
137
  SAVE_DATA_MANAGER_DEBUG,
137
138
  );
138
139
  }
140
+
141
+ function getKeysToBackup(saveData: SaveData) {
142
+ const shouldBackupPersistentObject =
143
+ saveData.persistent !== undefined &&
144
+ (saveData.persistent as LuaTable).has(REWIND_WITH_GLOWING_HOUR_GLASS_KEY);
145
+
146
+ return shouldBackupPersistentObject
147
+ ? ([...GLOWING_HOUR_GLASS_BACKUP_KEYS, SaveDataKey.PERSISTENT] as const)
148
+ : GLOWING_HOUR_GLASS_BACKUP_KEYS;
149
+ }
@@ -566,30 +566,6 @@ export function newCollectibleSprite(
566
566
  return sprite;
567
567
  }
568
568
 
569
- /**
570
- * Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
571
- * should remove an item.
572
- *
573
- * The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
574
- * Python program located at: https://github.com/Rchardon/RebirthItemTracker
575
- *
576
- * This function is useful when you need to add a "fake" collectible to a player. Note that calling
577
- * this function is not necessary when removing items from players. For example, when you remove a
578
- * collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
579
- * the item tracker will automatically remove it.
580
- */
581
- export function removeCollectibleFromItemTracker(
582
- collectibleType: CollectibleType,
583
- ): void {
584
- const collectibleName = getCollectibleName(collectibleType);
585
-
586
- // This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker from
587
- // recognizing the message.
588
- Isaac.DebugString(
589
- `Removing collectible ${collectibleType} (${collectibleName}) on player 0 (Player)`,
590
- );
591
- }
592
-
593
569
  /**
594
570
  * Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20
595
571
  * frame delay before they can be picked up by a player.
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Helper functions that have to do with external programs.
3
+ *
4
+ * @module
5
+ */
6
+
7
+ import type { CollectibleType } from "isaac-typescript-definitions";
8
+ import { getCollectibleName } from "./collectibles";
9
+
10
+ const REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND =
11
+ "REBIRTH_ITEM_TRACKER_WRITE_TO_FILE";
12
+
13
+ /**
14
+ * Helper function to let the Rebirth Item Tracker know that it should write the submitted text
15
+ * string to a file. This is useful for capturing text in programs like Open Broadcaster Software
16
+ * (OBS).
17
+ *
18
+ * The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
19
+ * Python program located at: https://github.com/Rchardon/RebirthItemTracker
20
+ */
21
+ export function rebirthItemTrackerWriteToFile(msg: string): void {
22
+ // This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker from
23
+ // recognizing the message.
24
+ Isaac.DebugString(`${REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND} ${msg}`);
25
+ }
26
+
27
+ /**
28
+ * Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
29
+ * should remove an item.
30
+ *
31
+ * The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
32
+ * Python program located at: https://github.com/Rchardon/RebirthItemTracker
33
+ *
34
+ * This function is useful when you need to add a "fake" collectible to a player. Note that calling
35
+ * this function is not necessary when removing items from players. For example, when you remove a
36
+ * collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
37
+ * the item tracker will automatically remove it.
38
+ */
39
+ export function removeCollectibleFromItemTracker(
40
+ collectibleType: CollectibleType,
41
+ ): void {
42
+ const collectibleName = getCollectibleName(collectibleType);
43
+
44
+ // This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker from
45
+ // recognizing the message.
46
+ Isaac.DebugString(
47
+ `Removing collectible ${collectibleType} (${collectibleName}) on player 0 (Player)`,
48
+ );
49
+ }
package/src/index.ts CHANGED
@@ -50,6 +50,7 @@ export * from "./functions/entities";
50
50
  export * from "./functions/entitiesSpecific";
51
51
  export * from "./functions/entityTypes";
52
52
  export * from "./functions/enums";
53
+ export * from "./functions/external";
53
54
  export * from "./functions/familiars";
54
55
  export * from "./functions/flag";
55
56
  export * from "./functions/globals";