isaacscript-common 1.0.499 → 1.0.500

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.
@@ -89,14 +89,14 @@ export declare function setCollectibleBlind(collectible: EntityPickup): void;
89
89
  * player has already taken the item. This is accomplished by setting its sprite to an empty/missing
90
90
  * PNG file.
91
91
  *
92
- * For more information, see the documentation for the "EMPTY_PNG_FILENAME" constant.
92
+ * For more information, see the documentation for the "emptySprite" helper function.
93
93
  */
94
94
  export declare function setCollectibleEmpty(collectible: EntityPickup): void;
95
95
  /**
96
96
  * Helper function to change the sprite of a collectible pedestal entity.
97
97
  *
98
98
  * For more information about removing the collectible sprite, see the documentation for the
99
- * "EMPTY_PNG_FILENAME" constant.
99
+ * "emptySprite" helper function.
100
100
  *
101
101
  * @param collectible The collectible whose sprite you want to modify.
102
102
  * @param pngPath Optional. Equal to the spritesheet path to load (e.g.
@@ -178,6 +178,10 @@ function ____exports.setCollectibleSubType(self, collectible, newCollectibleType
178
178
  if collectible.Variant ~= PickupVariant.PICKUP_COLLECTIBLE then
179
179
  error("You cannot set a collectible sub type for pickups of variant: " .. tostring(collectible.Variant))
180
180
  end
181
+ if newCollectibleType == CollectibleType.COLLECTIBLE_NULL then
182
+ ____exports.setCollectibleEmpty(nil, collectible)
183
+ return
184
+ end
181
185
  collectible:Morph(
182
186
  EntityType.ENTITY_PICKUP,
183
187
  PickupVariant.PICKUP_COLLECTIBLE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.499",
3
+ "version": "1.0.500",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",