isaacscript-common 1.0.470 → 1.0.471

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.
@@ -29,7 +29,7 @@ export declare function deployRandomJSONRoom(jsonRooms: JSONRoom[], seed?: numbe
29
29
  * Helper function to remove all naturally spawning entities and grid entities from a room. Notably,
30
30
  * this will not remove players (1), tears (2), familiars (3), lasers (7), knives (8),
31
31
  * projectiles (9), blacklisted NPCs such as Dark Esau, charmed NPCs, friendly NPCs, persistent
32
- * NPCs, doors, and walls.
32
+ * NPCs, most effects (1000), doors, and walls.
33
33
  *
34
34
  * @param fillWithDecorations Optional. Set to true to fill every grid tile with an invisible
35
35
  * decoration, which prevents vanilla entities in the room from respawning the next time that the
@@ -75,6 +75,8 @@ function ____exports.emptyRoom(self, fillWithDecorations)
75
75
  removeAllPickups(nil)
76
76
  removeAllMatchingEntities(nil, EntityType.ENTITY_SLOT)
77
77
  removeSpecificNPCs(nil)
78
+ removeAllMatchingEntities(nil, EntityType.ENTITY_EFFECT, EffectVariant.DEVIL)
79
+ removeAllMatchingEntities(nil, EntityType.ENTITY_EFFECT, EffectVariant.ANGEL)
78
80
  removeAllGridEntitiesExceptFor(nil, GridEntityType.GRID_WALL, GridEntityType.GRID_DOOR)
79
81
  setRoomCleared(nil)
80
82
  if fillWithDecorations then
@@ -8,14 +8,8 @@ function ____exports.removeGridEntity(self, gridEntity)
8
8
  local room = game:GetRoom()
9
9
  local gridIndex = gridEntity:GetGridIndex()
10
10
  room:RemoveGridEntity(gridIndex, 0, false)
11
- ____exports.setGridEntityInvisible(nil, gridEntity)
12
11
  room:Update()
13
12
  end
14
- function ____exports.setGridEntityInvisible(self, gridEntity)
15
- local sprite = gridEntity:GetSprite()
16
- sprite:ReplaceSpritesheet(0, "gfx/none.png")
17
- sprite:LoadGraphics()
18
- end
19
13
  function ____exports.spawnGridEntityWithVariant(self, gridEntityType, variant, gridIndex)
20
14
  local game = Game()
21
15
  local room = game:GetRoom()
@@ -129,6 +123,11 @@ function ____exports.removeAllMatchingGridEntities(self, gridEntityType)
129
123
  ____exports.removeGridEntity(nil, gridEntity)
130
124
  end
131
125
  end
126
+ function ____exports.setGridEntityInvisible(self, gridEntity)
127
+ local sprite = gridEntity:GetSprite()
128
+ sprite:ReplaceSpritesheet(0, "gfx/none.png")
129
+ sprite:LoadGraphics()
130
+ end
132
131
  function ____exports.spawnGiantPoop(self, topLeftGridIndex)
133
132
  local game = Game()
134
133
  local room = game:GetRoom()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.470",
3
+ "version": "1.0.471",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",