isaacscript-common 1.0.585 → 1.0.586

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.
@@ -93,6 +93,25 @@ export declare function removeGridEntity(gridEntity: GridEntity, updateRoom?: bo
93
93
  * For more information, see the documentation for the `clearSprite()` helper function.
94
94
  */
95
95
  export declare function setGridEntityInvisible(gridEntity: GridEntity): void;
96
+ /**
97
+ * Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
98
+ * grid entities in the appropriate positions.
99
+ */
96
100
  export declare function spawnGiantPoop(topLeftGridIndex: int): void;
101
+ /**
102
+ * Helper function to spawn a grid entity. This function assumes you want to give the grid entity a
103
+ * variant of 0. Use this instead of the `Isaac.GridSpawn()` method since it handles giving pits
104
+ * collision and it allows you to specify the grid index instead of the position.
105
+ */
97
106
  export declare function spawnGridEntity(gridEntityType: GridEntityType, gridIndex: int): GridEntity;
107
+ /**
108
+ * Helper function to spawn a grid entity with a specific variant. Use this instead of the
109
+ * `Isaac.GridSpawn()` method since it handles giving pits collision and it allows you to specify
110
+ * the grid index instead of the position.
111
+ */
98
112
  export declare function spawnGridEntityWithVariant(gridEntityType: GridEntityType, variant: int, gridIndex: int): GridEntity;
113
+ /**
114
+ * Helper function to spawn a Void Portal. This is more complicated than simply spawning a trapdoor
115
+ * with the appropriate variant, as the game does not give it the correct sprite automatically.
116
+ */
117
+ export declare function spawnVoidPortal(gridIndex: int): void;
@@ -183,4 +183,9 @@ end
183
183
  function ____exports.spawnGridEntity(self, gridEntityType, gridIndex)
184
184
  return ____exports.spawnGridEntityWithVariant(nil, gridEntityType, 0, gridIndex)
185
185
  end
186
+ function ____exports.spawnVoidPortal(self, gridIndex)
187
+ local voidPortal = ____exports.spawnGridEntityWithVariant(nil, GridEntityType.GRID_TRAPDOOR, 1, gridIndex)
188
+ local sprite = voidPortal:GetSprite()
189
+ sprite:Load("gfx/grid/voidtrapdoor.anm2", true)
190
+ end
186
191
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.585",
3
+ "version": "1.0.586",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -25,7 +25,7 @@
25
25
  "dist/**/*.d.ts"
26
26
  ],
27
27
  "devDependencies": {
28
- "isaac-typescript-definitions": "^1.0.327",
28
+ "isaac-typescript-definitions": "^1.0.329",
29
29
  "isaacscript-lint": "^1.0.77",
30
30
  "typedoc": "^0.22.10",
31
31
  "typescript": "^4.5.4",