isaacscript-common 35.0.1 → 35.1.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.
@@ -15160,8 +15160,11 @@ export declare function removeCollectibleFromAllPlayers(...collectibleTypes: Col
15160
15160
  * this function is not necessary when removing items from players. For example, when you remove a
15161
15161
  * collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
15162
15162
  * the item tracker will automatically remove it.
15163
+ *
15164
+ * This function is variadic, meaning that you can pass as many collectible types as you want to
15165
+ * remove.
15163
15166
  */
15164
- export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
15167
+ export declare function removeCollectibleFromItemTracker(...collectibleTypes: CollectibleType[]): void;
15165
15168
 
15166
15169
  /**
15167
15170
  * Helper function to remove one or more collectibles from all item pools.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 35.0.1
3
+ isaacscript-common 35.1.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -35182,9 +35182,12 @@ local REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND = "REBIRTH_ITEM_TRACKER_WRITE_T
35182
35182
  function ____exports.rebirthItemTrackerWriteToFile(self, msg)
35183
35183
  Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
35184
35184
  end
35185
- function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
35186
- local collectibleName = getCollectibleName(nil, collectibleType)
35187
- Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
35185
+ function ____exports.removeCollectibleFromItemTracker(self, ...)
35186
+ local collectibleTypes = {...}
35187
+ for ____, collectibleType in ipairs(collectibleTypes) do
35188
+ local collectibleName = getCollectibleName(nil, collectibleType)
35189
+ Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
35190
+ end
35188
35191
  end
35189
35192
  return ____exports
35190
35193
  end,
@@ -24,6 +24,9 @@ export declare function rebirthItemTrackerWriteToFile(msg: string): void;
24
24
  * this function is not necessary when removing items from players. For example, when you remove a
25
25
  * collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
26
26
  * the item tracker will automatically remove it.
27
+ *
28
+ * This function is variadic, meaning that you can pass as many collectible types as you want to
29
+ * remove.
27
30
  */
28
- export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
31
+ export declare function removeCollectibleFromItemTracker(...collectibleTypes: CollectibleType[]): void;
29
32
  //# sourceMappingURL=external.d.ts.map
@@ -1 +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"}
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;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gCAAgC,CAC9C,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAUN"}
@@ -21,8 +21,14 @@ end
21
21
  -- this function is not necessary when removing items from players. For example, when you remove a
22
22
  -- collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
23
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)")
24
+ --
25
+ -- This function is variadic, meaning that you can pass as many collectible types as you want to
26
+ -- remove.
27
+ function ____exports.removeCollectibleFromItemTracker(self, ...)
28
+ local collectibleTypes = {...}
29
+ for ____, collectibleType in ipairs(collectibleTypes) do
30
+ local collectibleName = getCollectibleName(nil, collectibleType)
31
+ Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
32
+ end
27
33
  end
28
34
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "35.0.1",
3
+ "version": "35.1.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -35,15 +35,20 @@ export function rebirthItemTrackerWriteToFile(msg: string): void {
35
35
  * this function is not necessary when removing items from players. For example, when you remove a
36
36
  * collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
37
37
  * the item tracker will automatically remove it.
38
+ *
39
+ * This function is variadic, meaning that you can pass as many collectible types as you want to
40
+ * remove.
38
41
  */
39
42
  export function removeCollectibleFromItemTracker(
40
- collectibleType: CollectibleType,
43
+ ...collectibleTypes: CollectibleType[]
41
44
  ): void {
42
- const collectibleName = getCollectibleName(collectibleType);
45
+ for (const collectibleType of collectibleTypes) {
46
+ const collectibleName = getCollectibleName(collectibleType);
43
47
 
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
- );
48
+ // This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker
49
+ // from recognizing the message.
50
+ Isaac.DebugString(
51
+ `Removing collectible ${collectibleType} (${collectibleName}) on player 0 (Player)`,
52
+ );
53
+ }
49
54
  }