isaacscript-common 1.0.496 → 1.0.497

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.
@@ -17,6 +17,10 @@ export declare const CHARACTERS_WITH_NO_RED_HEARTS: Set<PlayerType>;
17
17
  * includes The Lost and Tainted Lost.
18
18
  */
19
19
  export declare const CHARACTERS_WITH_NO_SOUL_HEARTS: Set<PlayerType>;
20
+ /**
21
+ * A collection of common colors that can be reused. Note that if you want to further modify these
22
+ * colors, you should copy them first with the `copyColor` function.
23
+ */
20
24
  export declare const COLORS: {
21
25
  BLACK: Color;
22
26
  RED: Color;
@@ -24,9 +24,9 @@ export declare function getRoomData(): RoomConfig | undefined;
24
24
  export declare function getRoomDataType(): int;
25
25
  /**
26
26
  * Helper function to get the room index of the current room. Use this instead of calling
27
- * `Game().GetLevel().GetCurrentRoomIndex()` directly to avoid bugs with big rooms.
28
- * (Big rooms will return the specific 1x1 quadrant that the player entered the room at,
29
- * which can break data structures that use the room index as an index.)
27
+ * `Level.GetCurrentRoomIndex()` directly to avoid bugs with big rooms. (Big rooms will return the
28
+ * specific 1x1 quadrant that the player entered the room at, which can break data structures that
29
+ * use the room index as an index.)
30
30
  */
31
31
  export declare function getRoomIndex(): int;
32
32
  /**
@@ -23,10 +23,6 @@ local hasFlag = ____flag.hasFlag
23
23
  function ____exports.getRoomIndex(self)
24
24
  local game = Game()
25
25
  local level = game:GetLevel()
26
- local roomIndex = level:GetCurrentRoomIndex()
27
- if roomIndex < 0 then
28
- return roomIndex
29
- end
30
26
  local roomDesc = level:GetCurrentRoomDesc()
31
27
  return roomDesc.SafeGridIndex
32
28
  end
@@ -223,14 +219,14 @@ function ____exports.setRoomCleared(self)
223
219
  for ____, door in ipairs(getDoors(nil)) do
224
220
  do
225
221
  if isHiddenSecretRoomDoor(nil, door) then
226
- goto __continue39
222
+ goto __continue38
227
223
  end
228
224
  door.State = DoorState.STATE_OPEN
229
225
  local sprite = door:GetSprite()
230
226
  sprite:Play("Opened", true)
231
227
  door.ExtraVisible = false
232
228
  end
233
- ::__continue39::
229
+ ::__continue38::
234
230
  end
235
231
  sfx:Stop(SoundEffect.SOUND_DOOR_HEAVY_OPEN)
236
232
  game:ShakeScreen(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.496",
3
+ "version": "1.0.497",
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.285",
28
+ "isaac-typescript-definitions": "^1.0.286",
29
29
  "isaacscript-lint": "^1.0.68",
30
30
  "typedoc": "^0.22.10",
31
31
  "typescript": "4.5.2",