isaacscript-common 37.0.0 → 37.0.1

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.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 37.0.0
3
+ isaacscript-common 37.0.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -43103,7 +43103,8 @@ function ____exports.getHeartRowLength(self, player)
43103
43103
  local maxHearts = player:GetMaxHearts()
43104
43104
  local soulHearts = player:GetSoulHearts()
43105
43105
  local boneHearts = player:GetBoneHearts()
43106
- local combinedHearts = maxHearts + soulHearts + boneHearts * 2
43106
+ local brokenHearts = player:GetBrokenHearts()
43107
+ local combinedHearts = maxHearts + soulHearts + boneHearts * 2 + brokenHearts * 2
43107
43108
  local heartRowLength = combinedHearts / 2
43108
43109
  return math.min(heartRowLength, 6)
43109
43110
  end
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAmBrD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGzD;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAK1D;AAED,wBAAgB,gBAAgB,IAAI,KAAK,CAGxC;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGrD;AAED,wBAAgB,eAAe,IAAI,KAAK,CAGvC;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAmBrD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGzD;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAK1D;AAED,wBAAgB,gBAAgB,IAAI,KAAK,CAGxC;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGrD;AAED,wBAAgB,eAAe,IAAI,KAAK,CAGvC;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
@@ -43,7 +43,8 @@ function ____exports.getHeartRowLength(self, player)
43
43
  local maxHearts = player:GetMaxHearts()
44
44
  local soulHearts = player:GetSoulHearts()
45
45
  local boneHearts = player:GetBoneHearts()
46
- local combinedHearts = maxHearts + soulHearts + boneHearts * 2
46
+ local brokenHearts = player:GetBrokenHearts()
47
+ local combinedHearts = maxHearts + soulHearts + boneHearts * 2 + brokenHearts * 2
47
48
  local heartRowLength = combinedHearts / 2
48
49
  return math.min(heartRowLength, 6)
49
50
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "37.0.0",
3
+ "version": "37.0.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -42,8 +42,11 @@ export function getHeartRowLength(player: EntityPlayer): int {
42
42
  const maxHearts = player.GetMaxHearts();
43
43
  const soulHearts = player.GetSoulHearts();
44
44
  const boneHearts = player.GetBoneHearts();
45
+ const brokenHearts = player.GetBrokenHearts();
45
46
 
46
- const combinedHearts = maxHearts + soulHearts + boneHearts * 2; // There are no half bone hearts
47
+ // There are no half bone hearts or half broken hearts.
48
+ const combinedHearts =
49
+ maxHearts + soulHearts + boneHearts * 2 + brokenHearts * 2;
47
50
  const heartRowLength = combinedHearts / 2;
48
51
 
49
52
  // After 6 hearts, the hearts wrap to a second row.