isaacscript-common 1.0.358 → 1.0.359

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.
@@ -21,3 +21,6 @@
21
21
  */
22
22
  export declare function getGridEntities(...gridEntityTypes: GridEntityType[]): GridEntity[];
23
23
  export declare function getSurroundingGridEntities(gridEntity: GridEntity): GridEntity[];
24
+ export declare function spawnGiantPoop(topLeftGridIndex: int): void;
25
+ export declare function spawnGridEntity(gridEntityType: GridEntityType, gridIndex: int): GridEntity;
26
+ export declare function spawnGridEntityWithVariant(gridEntityType: GridEntityType, variant: int, gridIndex: int): GridEntity;
@@ -1,6 +1,12 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  require("lualib_bundle");
3
3
  local ____exports = {}
4
+ function ____exports.spawnGridEntityWithVariant(self, gridEntityType, variant, gridIndex)
5
+ local game = Game()
6
+ local room = game:GetRoom()
7
+ local position = room:GetGridPosition(gridIndex)
8
+ return Isaac.GridSpawn(gridEntityType, variant, position, true)
9
+ end
4
10
  function ____exports.getGridEntities(self, ...)
5
11
  local gridEntityTypes = {...}
6
12
  local game = Game()
@@ -46,4 +52,19 @@ function ____exports.getSurroundingGridEntities(self, gridEntity)
46
52
  end
47
53
  return surroundingGridEntities
48
54
  end
55
+ function ____exports.spawnGiantPoop(self, topLeftGridIndex)
56
+ local game = Game()
57
+ local room = game:GetRoom()
58
+ local gridWidth = room:GetGridWidth()
59
+ local topRightGridIndex = topLeftGridIndex + 1
60
+ local bottomLeftGridIndex = topLeftGridIndex + gridWidth
61
+ local bottomRightGridIndex = bottomLeftGridIndex + 1
62
+ ____exports.spawnGridEntityWithVariant(nil, GridEntityType.GRID_POOP, 7, topLeftGridIndex)
63
+ ____exports.spawnGridEntityWithVariant(nil, GridEntityType.GRID_POOP, 8, topRightGridIndex)
64
+ ____exports.spawnGridEntityWithVariant(nil, GridEntityType.GRID_POOP, 9, bottomLeftGridIndex)
65
+ ____exports.spawnGridEntityWithVariant(nil, GridEntityType.GRID_POOP, 10, bottomRightGridIndex)
66
+ end
67
+ function ____exports.spawnGridEntity(self, gridEntityType, gridIndex)
68
+ return ____exports.spawnGridEntityWithVariant(nil, gridEntityType, 0, gridIndex)
69
+ end
49
70
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.358",
3
+ "version": "1.0.359",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",