isaacscript-common 51.9.0 → 51.9.1

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.
@@ -16740,6 +16740,8 @@ export declare function setGridEntityInvisible(gridEntity: GridEntity): void;
16740
16740
  * Helper function to change the type of a grid entity to another type. Use this instead of the
16741
16741
  * `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
16742
16742
  * entity after the type is changed.
16743
+ *
16744
+ * Setting the new type to `GridEntityType.NULL` (0) will have no effect.
16743
16745
  */
16744
16746
  export declare function setGridEntityType(gridEntity: GridEntity, gridEntityType: GridEntityType): void;
16745
16747
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 51.9.0
3
+ isaacscript-common 51.9.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -28748,6 +28748,8 @@ function ____exports.setGridEntityType(self, gridEntity, gridEntityType)
28748
28748
  local anm2Path = GRID_ENTITY_TYPE_TO_ANM2_PATH[gridEntityType]
28749
28749
  if anm2Path ~= nil then
28750
28750
  sprite:Load(anm2Path, true)
28751
+ local defaultAnimation = sprite:GetDefaultAnimation()
28752
+ sprite:Play(defaultAnimation, true)
28751
28753
  end
28752
28754
  end
28753
28755
  function ____exports.spawnGiantPoop(self, topLeftGridIndex)
@@ -238,6 +238,8 @@ export declare function setGridEntityInvisible(gridEntity: GridEntity): void;
238
238
  * Helper function to change the type of a grid entity to another type. Use this instead of the
239
239
  * `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
240
240
  * entity after the type is changed.
241
+ *
242
+ * Setting the new type to `GridEntityType.NULL` (0) will have no effect.
241
243
  */
242
244
  export declare function setGridEntityType(gridEntity: GridEntity, gridEntityType: GridEntityType): void;
243
245
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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B,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAAE,EAClB,UAAU,EAAE,UAAU,GACrB,IAAI,CAON;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,aAAa,EACxD,YAAY,EAAE,CAAC,EAAE,EACjB,UAAU,EAAE,OAAO,EACnB,GAAG,CAAC,EAAE,GAAG,GACR,CAAC,EAAE,CAoBL;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,qBAAqB,EAAE,UAAU,GAAG,GAAG,EACvC,UAAU,EAAE,OAAO,GAClB,IAAI,CAqCN;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAGnE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,GAC7B,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAwD7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAgCxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAkBtE"}
@@ -587,12 +587,16 @@ end
587
587
  --- Helper function to change the type of a grid entity to another type. Use this instead of the
588
588
  -- `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
589
589
  -- entity after the type is changed.
590
+ --
591
+ -- Setting the new type to `GridEntityType.NULL` (0) will have no effect.
590
592
  function ____exports.setGridEntityType(self, gridEntity, gridEntityType)
591
593
  gridEntity:SetType(gridEntityType)
592
594
  local sprite = gridEntity:GetSprite()
593
595
  local anm2Path = GRID_ENTITY_TYPE_TO_ANM2_PATH[gridEntityType]
594
596
  if anm2Path ~= nil then
595
597
  sprite:Load(anm2Path, true)
598
+ local defaultAnimation = sprite:GetDefaultAnimation()
599
+ sprite:Play(defaultAnimation, true)
596
600
  end
597
601
  end
598
602
  --- Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "51.9.0",
3
+ "version": "51.9.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -721,6 +721,8 @@ export function setGridEntityInvisible(gridEntity: GridEntity): void {
721
721
  * Helper function to change the type of a grid entity to another type. Use this instead of the
722
722
  * `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
723
723
  * entity after the type is changed.
724
+ *
725
+ * Setting the new type to `GridEntityType.NULL` (0) will have no effect.
724
726
  */
725
727
  export function setGridEntityType(
726
728
  gridEntity: GridEntity,
@@ -732,6 +734,8 @@ export function setGridEntityType(
732
734
  const anm2Path = GRID_ENTITY_TYPE_TO_ANM2_PATH[gridEntityType];
733
735
  if (anm2Path !== undefined) {
734
736
  sprite.Load(anm2Path, true);
737
+ const defaultAnimation = sprite.GetDefaultAnimation();
738
+ sprite.Play(defaultAnimation, true);
735
739
  }
736
740
  }
737
741