isaacscript-common 32.1.1 → 33.0.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.
@@ -16566,8 +16566,10 @@ export declare function spawnFamiliarWithSeed(familiarVariant: FamiliarVariant,
16566
16566
  /**
16567
16567
  * Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
16568
16568
  * grid entities in the appropriate positions.
16569
+ *
16570
+ * @returns Whether spawning the four quadrants was successful.
16569
16571
  */
16570
- export declare function spawnGiantPoop(topLeftGridIndex: int): void;
16572
+ export declare function spawnGiantPoop(topLeftGridIndex: int): boolean;
16571
16573
 
16572
16574
  /**
16573
16575
  * Helper function to spawn a grid entity.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 32.1.1
3
+ isaacscript-common 33.0.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -3151,6 +3151,14 @@ do
3151
3151
  end
3152
3152
  end
3153
3153
  end
3154
+ do
3155
+ local ____export = require("lua_modules.isaac-typescript-definitions.dist.src.enums.DebugCommand")
3156
+ for ____exportKey, ____exportValue in pairs(____export) do
3157
+ if ____exportKey ~= "default" then
3158
+ ____exports[____exportKey] = ____exportValue
3159
+ end
3160
+ end
3161
+ end
3154
3162
  do
3155
3163
  local ____export = require("lua_modules.isaac-typescript-definitions.dist.src.enums.Difficulty")
3156
3164
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -10073,14 +10081,14 @@ ____exports.PoopGridEntityVariant.BLACK = 5
10073
10081
  ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.BLACK] = "BLACK"
10074
10082
  ____exports.PoopGridEntityVariant.WHITE = 6
10075
10083
  ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.WHITE] = "WHITE"
10076
- ____exports.PoopGridEntityVariant.GIGA_TOP_LEFT = 7
10077
- ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIGA_TOP_LEFT] = "GIGA_TOP_LEFT"
10078
- ____exports.PoopGridEntityVariant.GIGA_TOP_RIGHT = 8
10079
- ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIGA_TOP_RIGHT] = "GIGA_TOP_RIGHT"
10080
- ____exports.PoopGridEntityVariant.GIGA_BOTTOM_LEFT = 9
10081
- ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIGA_BOTTOM_LEFT] = "GIGA_BOTTOM_LEFT"
10082
- ____exports.PoopGridEntityVariant.GIGA_BOTTOM_RIGHT = 10
10083
- ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIGA_BOTTOM_RIGHT] = "GIGA_BOTTOM_RIGHT"
10084
+ ____exports.PoopGridEntityVariant.GIANT_TOP_LEFT = 7
10085
+ ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIANT_TOP_LEFT] = "GIANT_TOP_LEFT"
10086
+ ____exports.PoopGridEntityVariant.GIANT_TOP_RIGHT = 8
10087
+ ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIANT_TOP_RIGHT] = "GIANT_TOP_RIGHT"
10088
+ ____exports.PoopGridEntityVariant.GIANT_BOTTOM_LEFT = 9
10089
+ ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIANT_BOTTOM_LEFT] = "GIANT_BOTTOM_LEFT"
10090
+ ____exports.PoopGridEntityVariant.GIANT_BOTTOM_RIGHT = 10
10091
+ ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.GIANT_BOTTOM_RIGHT] = "GIANT_BOTTOM_RIGHT"
10084
10092
  ____exports.PoopGridEntityVariant.CHARMING = 11
10085
10093
  ____exports.PoopGridEntityVariant[____exports.PoopGridEntityVariant.CHARMING] = "CHARMING"
10086
10094
  --- For `GridEntityType.DOOR` (16).
@@ -15010,6 +15018,38 @@ ____exports.Difficulty.GREED = 2
15010
15018
  ____exports.Difficulty[____exports.Difficulty.GREED] = "GREED"
15011
15019
  ____exports.Difficulty.GREEDIER = 3
15012
15020
  ____exports.Difficulty[____exports.Difficulty.GREEDIER] = "GREEDIER"
15021
+ return ____exports
15022
+ end,
15023
+ ["lua_modules.isaac-typescript-definitions.dist.src.enums.DebugCommand"] = function(...)
15024
+ local ____exports = {}
15025
+ --- The values accepted by the `debug` console command.
15026
+ ____exports.DebugCommand = {}
15027
+ ____exports.DebugCommand.ENTITY_POSITIONS = 1
15028
+ ____exports.DebugCommand[____exports.DebugCommand.ENTITY_POSITIONS] = "ENTITY_POSITIONS"
15029
+ ____exports.DebugCommand.GRID_COST = 2
15030
+ ____exports.DebugCommand[____exports.DebugCommand.GRID_COST] = "GRID_COST"
15031
+ ____exports.DebugCommand.INFINITE_HP = 3
15032
+ ____exports.DebugCommand[____exports.DebugCommand.INFINITE_HP] = "INFINITE_HP"
15033
+ ____exports.DebugCommand.HIGH_DAMAGE = 4
15034
+ ____exports.DebugCommand[____exports.DebugCommand.HIGH_DAMAGE] = "HIGH_DAMAGE"
15035
+ ____exports.DebugCommand.SHOW_ROOM_INFO = 5
15036
+ ____exports.DebugCommand[____exports.DebugCommand.SHOW_ROOM_INFO] = "SHOW_ROOM_INFO"
15037
+ ____exports.DebugCommand.SHOW_HITSPHERES = 6
15038
+ ____exports.DebugCommand[____exports.DebugCommand.SHOW_HITSPHERES] = "SHOW_HITSPHERES"
15039
+ ____exports.DebugCommand.SHOW_DAMAGE_VALUES = 7
15040
+ ____exports.DebugCommand[____exports.DebugCommand.SHOW_DAMAGE_VALUES] = "SHOW_DAMAGE_VALUES"
15041
+ ____exports.DebugCommand.INFINITE_ITEM_CHARGES = 8
15042
+ ____exports.DebugCommand[____exports.DebugCommand.INFINITE_ITEM_CHARGES] = "INFINITE_ITEM_CHARGES"
15043
+ ____exports.DebugCommand.HIGH_LUCK = 9
15044
+ ____exports.DebugCommand[____exports.DebugCommand.HIGH_LUCK] = "HIGH_LUCK"
15045
+ ____exports.DebugCommand.QUICK_KILL = 10
15046
+ ____exports.DebugCommand[____exports.DebugCommand.QUICK_KILL] = "QUICK_KILL"
15047
+ ____exports.DebugCommand.GRID_INFO = 11
15048
+ ____exports.DebugCommand[____exports.DebugCommand.GRID_INFO] = "GRID_INFO"
15049
+ ____exports.DebugCommand.PLAYER_ITEM_INFO = 12
15050
+ ____exports.DebugCommand[____exports.DebugCommand.PLAYER_ITEM_INFO] = "PLAYER_ITEM_INFO"
15051
+ ____exports.DebugCommand.SHOW_GRID_COLLISION_POINTS = 13
15052
+ ____exports.DebugCommand[____exports.DebugCommand.SHOW_GRID_COLLISION_POINTS] = "SHOW_GRID_COLLISION_POINTS"
15013
15053
  return ____exports
15014
15054
  end,
15015
15055
  ["lua_modules.isaac-typescript-definitions.dist.src.enums.CopyableIsaacAPIClassType"] = function(...)
@@ -28286,10 +28326,11 @@ function ____exports.spawnGiantPoop(self, topLeftGridIndex)
28286
28326
  local topRightGridIndex = topLeftGridIndex + 1
28287
28327
  local bottomLeftGridIndex = topLeftGridIndex + gridWidth
28288
28328
  local bottomRightGridIndex = bottomLeftGridIndex + 1
28289
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_TOP_LEFT, topLeftGridIndex)
28290
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_TOP_RIGHT, topRightGridIndex)
28291
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_BOTTOM_LEFT, bottomLeftGridIndex)
28292
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_BOTTOM_RIGHT, bottomRightGridIndex)
28329
+ local topLeft = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_TOP_LEFT, topLeftGridIndex)
28330
+ local topRight = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_TOP_RIGHT, topRightGridIndex)
28331
+ local bottomLeft = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_BOTTOM_LEFT, bottomLeftGridIndex)
28332
+ local bottomRight = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_BOTTOM_RIGHT, bottomRightGridIndex)
28333
+ return topLeft ~= nil and topLeft:GetType() == GridEntityType.POOP and topLeft:GetVariant() == PoopGridEntityVariant.GIANT_TOP_LEFT and topRight ~= nil and topRight:GetType() == GridEntityType.POOP and topRight:GetVariant() == PoopGridEntityVariant.GIANT_TOP_RIGHT and bottomLeft ~= nil and bottomLeft:GetType() == GridEntityType.POOP and bottomLeft:GetVariant() == PoopGridEntityVariant.GIANT_BOTTOM_LEFT and bottomRight ~= nil and bottomRight:GetType() == GridEntityType.POOP and bottomRight:GetVariant() == PoopGridEntityVariant.GIANT_BOTTOM_RIGHT
28293
28334
  end
28294
28335
  function ____exports.spawnGridEntity(self, gridEntityType, gridIndexOrPosition)
28295
28336
  return ____exports.spawnGridEntityWithVariant(nil, gridEntityType, 0, gridIndexOrPosition)
@@ -208,8 +208,10 @@ export declare function setGridEntityInvisible(gridEntity: GridEntity): void;
208
208
  /**
209
209
  * Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
210
210
  * grid entities in the appropriate positions.
211
+ *
212
+ * @returns Whether spawning the four quadrants was successful.
211
213
  */
212
- export declare function spawnGiantPoop(topLeftGridIndex: int): void;
214
+ export declare function spawnGiantPoop(topLeftGridIndex: int): boolean;
213
215
  /**
214
216
  * Helper function to spawn a grid entity.
215
217
  *
@@ -1 +1 @@
1
- {"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAGL,cAAc,EAIf,MAAM,8BAA8B,CAAC;AAUtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CA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G,GAAG,OAAO,CA2C7D;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"}
@@ -555,16 +555,19 @@ function ____exports.setGridEntityInvisible(self, gridEntity)
555
555
  end
556
556
  --- Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
557
557
  -- grid entities in the appropriate positions.
558
+ --
559
+ -- @returns Whether spawning the four quadrants was successful.
558
560
  function ____exports.spawnGiantPoop(self, topLeftGridIndex)
559
561
  local room = game:GetRoom()
560
562
  local gridWidth = room:GetGridWidth()
561
563
  local topRightGridIndex = topLeftGridIndex + 1
562
564
  local bottomLeftGridIndex = topLeftGridIndex + gridWidth
563
565
  local bottomRightGridIndex = bottomLeftGridIndex + 1
564
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_TOP_LEFT, topLeftGridIndex)
565
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_TOP_RIGHT, topRightGridIndex)
566
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_BOTTOM_LEFT, bottomLeftGridIndex)
567
- ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIGA_BOTTOM_RIGHT, bottomRightGridIndex)
566
+ local topLeft = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_TOP_LEFT, topLeftGridIndex)
567
+ local topRight = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_TOP_RIGHT, topRightGridIndex)
568
+ local bottomLeft = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_BOTTOM_LEFT, bottomLeftGridIndex)
569
+ local bottomRight = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.POOP, PoopGridEntityVariant.GIANT_BOTTOM_RIGHT, bottomRightGridIndex)
570
+ return topLeft ~= nil and topLeft:GetType() == GridEntityType.POOP and topLeft:GetVariant() == PoopGridEntityVariant.GIANT_TOP_LEFT and topRight ~= nil and topRight:GetType() == GridEntityType.POOP and topRight:GetVariant() == PoopGridEntityVariant.GIANT_TOP_RIGHT and bottomLeft ~= nil and bottomLeft:GetType() == GridEntityType.POOP and bottomLeft:GetVariant() == PoopGridEntityVariant.GIANT_BOTTOM_LEFT and bottomRight ~= nil and bottomRight:GetType() == GridEntityType.POOP and bottomRight:GetVariant() == PoopGridEntityVariant.GIANT_BOTTOM_RIGHT
568
571
  end
569
572
  --- Helper function to spawn a grid entity.
570
573
  --
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "32.1.1",
3
+ "version": "33.0.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -25,6 +25,6 @@
25
25
  "main": "dist/src/index",
26
26
  "types": "dist/index.rollup.d.ts",
27
27
  "dependencies": {
28
- "isaac-typescript-definitions": "^15.1.0"
28
+ "isaac-typescript-definitions": "^16.0.0"
29
29
  }
30
30
  }
@@ -681,8 +681,10 @@ export function setGridEntityInvisible(gridEntity: GridEntity): void {
681
681
  /**
682
682
  * Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
683
683
  * grid entities in the appropriate positions.
684
+ *
685
+ * @returns Whether spawning the four quadrants was successful.
684
686
  */
685
- export function spawnGiantPoop(topLeftGridIndex: int): void {
687
+ export function spawnGiantPoop(topLeftGridIndex: int): boolean {
686
688
  const room = game.GetRoom();
687
689
  const gridWidth = room.GetGridWidth();
688
690
 
@@ -690,26 +692,41 @@ export function spawnGiantPoop(topLeftGridIndex: int): void {
690
692
  const bottomLeftGridIndex = topLeftGridIndex + gridWidth;
691
693
  const bottomRightGridIndex = bottomLeftGridIndex + 1;
692
694
 
693
- spawnGridEntityWithVariant(
695
+ const topLeft = spawnGridEntityWithVariant(
694
696
  GridEntityType.POOP,
695
- PoopGridEntityVariant.GIGA_TOP_LEFT,
697
+ PoopGridEntityVariant.GIANT_TOP_LEFT,
696
698
  topLeftGridIndex,
697
699
  );
698
- spawnGridEntityWithVariant(
700
+ const topRight = spawnGridEntityWithVariant(
699
701
  GridEntityType.POOP,
700
- PoopGridEntityVariant.GIGA_TOP_RIGHT,
702
+ PoopGridEntityVariant.GIANT_TOP_RIGHT,
701
703
  topRightGridIndex,
702
704
  );
703
- spawnGridEntityWithVariant(
705
+ const bottomLeft = spawnGridEntityWithVariant(
704
706
  GridEntityType.POOP,
705
- PoopGridEntityVariant.GIGA_BOTTOM_LEFT,
707
+ PoopGridEntityVariant.GIANT_BOTTOM_LEFT,
706
708
  bottomLeftGridIndex,
707
709
  );
708
- spawnGridEntityWithVariant(
710
+ const bottomRight = spawnGridEntityWithVariant(
709
711
  GridEntityType.POOP,
710
- PoopGridEntityVariant.GIGA_BOTTOM_RIGHT,
712
+ PoopGridEntityVariant.GIANT_BOTTOM_RIGHT,
711
713
  bottomRightGridIndex,
712
714
  );
715
+
716
+ return (
717
+ topLeft !== undefined &&
718
+ topLeft.GetType() === GridEntityType.POOP &&
719
+ topLeft.GetVariant() === PoopGridEntityVariant.GIANT_TOP_LEFT &&
720
+ topRight !== undefined &&
721
+ topRight.GetType() === GridEntityType.POOP &&
722
+ topRight.GetVariant() === PoopGridEntityVariant.GIANT_TOP_RIGHT &&
723
+ bottomLeft !== undefined &&
724
+ bottomLeft.GetType() === GridEntityType.POOP &&
725
+ bottomLeft.GetVariant() === PoopGridEntityVariant.GIANT_BOTTOM_LEFT &&
726
+ bottomRight !== undefined &&
727
+ bottomRight.GetType() === GridEntityType.POOP &&
728
+ bottomRight.GetVariant() === PoopGridEntityVariant.GIANT_BOTTOM_RIGHT
729
+ );
713
730
  }
714
731
 
715
732
  /**
@@ -761,14 +778,14 @@ export function spawnGridEntityWithVariant(
761
778
  }
762
779
 
763
780
  if (gridEntityType === GridEntityType.PIT) {
764
- // For some reason, spawned pits start with a collision class of NONE, so we have to manually
781
+ // For some reason, spawned pits start with a collision class of `NONE`, so we have to manually
765
782
  // set it.
766
783
  const pit = gridEntity.ToPit();
767
784
  if (pit !== undefined) {
768
785
  pit.UpdateCollision();
769
786
  }
770
787
  } else if (gridEntityType === GridEntityType.WALL) {
771
- // For some reason, spawned walls start with a collision class of NONE, so we have to manually
788
+ // For some reason, spawned walls start with a collision class of `NONE`, so we have to manually
772
789
  // set it.
773
790
  gridEntity.CollisionClass = GridCollisionClass.WALL;
774
791
  }