Skip to content

Commit 50131a0

Browse files
committed
feat: Sprite.ReplaceSpritesheet return value is boolean
1 parent da1fbfc commit 50131a0

File tree

1 file changed

+3
-1
lines changed
  • packages/isaac-typescript-definitions/src/types/classes

1 file changed

+3
-1
lines changed

packages/isaac-typescript-definitions/src/types/classes/Sprite.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ declare interface Sprite extends IsaacAPIClass {
187187
* @param layerID
188188
* @param pngPath The full path to the PNG file. For example:
189189
* "gfx/items/collectibles/questionmark.png"
190+
* @returns `true` if the spritesheet at the given layer ID was successfully replaced and if the
191+
* new spritesheet is not the same as the old one, otherwise `false`.
190192
*/
191-
ReplaceSpritesheet: (layerID: int, pngPath: string) => void;
193+
ReplaceSpritesheet: (layerID: int, pngPath: string) => boolean;
192194

193195
/**
194196
* Resets the sprite such that it will be equivalent to a new sprite created with the `Sprite`

0 commit comments

Comments
 (0)