isaacscript-common 1.0.531 → 1.0.535

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.
@@ -37,9 +37,12 @@ function queueEmpty(self, player, pickingUpItem)
37
37
  end
38
38
  function queueNotEmpty(self, player, pickingUpItem)
39
39
  local queuedItem = player.QueuedItem.Item
40
- if (queuedItem ~= nil) and (queuedItem.ID ~= pickingUpItem.id) then
41
- pickingUpItem.id = queuedItem.ID
40
+ if queuedItem == nil then
41
+ return
42
+ end
43
+ if (queuedItem.Type ~= pickingUpItem.type) or (queuedItem.ID ~= pickingUpItem.id) then
42
44
  pickingUpItem.type = queuedItem.Type
45
+ pickingUpItem.id = queuedItem.ID
43
46
  preItemPickupFire(nil, player, pickingUpItem)
44
47
  end
45
48
  end
@@ -5,6 +5,7 @@ local ____player = require("functions.player")
5
5
  local getPlayerAvailableHeartSlots = ____player.getPlayerAvailableHeartSlots
6
6
  local getPlayerNumAllHearts = ____player.getPlayerNumAllHearts
7
7
  local hasLostCurse = ____player.hasLostCurse
8
+ local isChildPlayer = ____player.isChildPlayer
8
9
  local ____revive = require("functions.revive")
9
10
  local willPlayerRevive = ____revive.willPlayerRevive
10
11
  local ____postPlayerFatalDamage = require("callbacks.subscriptions.postPlayerFatalDamage")
@@ -21,6 +22,12 @@ function entityTakeDmgPlayer(self, tookDamage, damageAmount, _damageFlags, _dama
21
22
  if player == nil then
22
23
  return nil
23
24
  end
25
+ if player.Variant ~= 0 then
26
+ return nil
27
+ end
28
+ if isChildPlayer(nil, player) then
29
+ return nil
30
+ end
24
31
  if willPlayerRevive(nil, player) then
25
32
  return nil
26
33
  end
@@ -311,7 +311,8 @@ function ____exports.getPlayerNumAllHearts(self, player)
311
311
  local soulHearts = player:GetSoulHearts()
312
312
  local boneHearts = player:GetBoneHearts()
313
313
  local eternalHearts = player:GetEternalHearts()
314
- return ((hearts + soulHearts) + boneHearts) + eternalHearts
314
+ local rottenHearts = player:GetRottenHearts()
315
+ return (((hearts + soulHearts) + boneHearts) + eternalHearts) - rottenHearts
315
316
  end
316
317
  function ____exports.getPlayersOfType(self, playerType)
317
318
  local players = {}
@@ -81,8 +81,6 @@ local areFeaturesInitialized = ____initialized.areFeaturesInitialized
81
81
  local setFeaturesInitialized = ____initialized.setFeaturesInitialized
82
82
  local ____patchErrorFunctions = require("patchErrorFunctions")
83
83
  local patchErrorFunction = ____patchErrorFunctions.patchErrorFunction
84
- local ____patchPrintFunction = require("patchPrintFunction")
85
- local patchPrintFunction = ____patchPrintFunction.patchPrintFunction
86
84
  local ____ModUpgraded = require("types.ModUpgraded")
87
85
  local ModUpgraded = ____ModUpgraded.ModUpgraded
88
86
  function initCustomCallbacks(self, mod)
@@ -129,7 +127,6 @@ function ____exports.upgradeMod(self, modVanilla, verbose)
129
127
  verbose = false
130
128
  end
131
129
  patchErrorFunction(nil)
132
- patchPrintFunction(nil)
133
130
  local mod = __TS__New(ModUpgraded, modVanilla, verbose)
134
131
  if not areFeaturesInitialized(nil) then
135
132
  setFeaturesInitialized(nil)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.531",
3
+ "version": "1.0.535",
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.297",
28
+ "isaac-typescript-definitions": "^1.0.300",
29
29
  "isaacscript-lint": "^1.0.72",
30
30
  "typedoc": "^0.22.10",
31
31
  "typescript": "4.4.4",