isaacscript-common 3.5.1 → 3.6.0
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.
- package/callbacks/postCollectibleInitFirst.lua +2 -1
- package/callbacks/postPlayerChangeHealth.lua +2 -2
- package/callbacks/subscriptions/postPickupCollect.d.ts +5 -5
- package/callbacks/subscriptions/postPickupInitFirst.d.ts +5 -3
- package/callbacks/subscriptions/postPickupInitLate.d.ts +5 -3
- package/callbacks/subscriptions/postPickupStateChanged.d.ts +5 -6
- package/callbacks/subscriptions/postPlayerChangeHealth.d.ts +1 -1
- package/callbacks/subscriptions/postPlayerChangeHealth.lua +2 -2
- package/enums/ModCallbackCustom.d.ts +1 -1
- package/features/preventCollectibleRotation.lua +2 -1
- package/package.json +2 -2
|
@@ -16,7 +16,8 @@ local postCollectibleInitFirstHasSubscriptions = ____postCollectibleInitFirst.po
|
|
|
16
16
|
function hasSubscriptions(self)
|
|
17
17
|
return postCollectibleInitFirstHasSubscriptions(nil)
|
|
18
18
|
end
|
|
19
|
-
function postPickupInitCollectible(self,
|
|
19
|
+
function postPickupInitCollectible(self, pickup)
|
|
20
|
+
local collectible = pickup
|
|
20
21
|
local collectibleIndex = getCollectibleIndex(nil, collectible)
|
|
21
22
|
if v.run.seenCollectibles:has(collectibleIndex) then
|
|
22
23
|
return
|
|
@@ -34,8 +34,8 @@ function postPEffectUpdateReordered(self, player)
|
|
|
34
34
|
local currentHealthValue = getPlayerHealthType(nil, player, healthType)
|
|
35
35
|
playerHealthMap:set(healthType, currentHealthValue)
|
|
36
36
|
if storedHealthValue ~= nil and storedHealthValue ~= currentHealthValue then
|
|
37
|
-
local
|
|
38
|
-
postPlayerChangeHealthFire(nil, player, healthType,
|
|
37
|
+
local difference = currentHealthValue - storedHealthValue
|
|
38
|
+
postPlayerChangeHealthFire(nil, player, healthType, difference)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
]
|
|
1
|
+
import { PickupVariant } from "isaac-typescript-definitions";
|
|
2
|
+
export declare type PostPickupCollectRegisterParameters = [
|
|
3
|
+
callback: (pickup: EntityPickup, player: EntityPlayer) => void,
|
|
4
|
+
pickupVariant?: PickupVariant
|
|
5
|
+
];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare type PostPickupInitFirstRegisterParameters =
|
|
3
|
-
|
|
1
|
+
import { PickupVariant } from "isaac-typescript-definitions";
|
|
2
|
+
export declare type PostPickupInitFirstRegisterParameters = [
|
|
3
|
+
callback: (pickup: EntityPickup) => void,
|
|
4
|
+
pickupVariant?: PickupVariant
|
|
5
|
+
];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare type PostPickupInitLateRegisterParameters =
|
|
3
|
-
|
|
1
|
+
import { PickupVariant } from "isaac-typescript-definitions";
|
|
2
|
+
export declare type PostPickupInitLateRegisterParameters = [
|
|
3
|
+
callback: (pickup: EntityPickup) => void,
|
|
4
|
+
pickupVariant?: PickupVariant
|
|
5
|
+
];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
], void>;
|
|
1
|
+
import { PickupVariant } from "isaac-typescript-definitions";
|
|
2
|
+
export declare type PostPickupStateChangedRegisterParameters = [
|
|
3
|
+
callback: (pickup: EntityPickup, previousState: int, currentState: int) => void,
|
|
4
|
+
pickupVariant?: PickupVariant
|
|
5
|
+
];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
import { HealthType } from "../../enums/HealthType";
|
|
3
3
|
export declare type PostPlayerChangeHealthRegisterParameters = [
|
|
4
|
-
callback: (player: EntityPlayer, healthType: HealthType,
|
|
4
|
+
callback: (player: EntityPlayer, healthType: HealthType, difference: int) => void,
|
|
5
5
|
playerVariant?: PlayerVariant,
|
|
6
6
|
character?: PlayerType
|
|
7
7
|
];
|
|
@@ -13,7 +13,7 @@ function ____exports.postPlayerChangeHealthRegister(self, ...)
|
|
|
13
13
|
end
|
|
14
14
|
---
|
|
15
15
|
-- @internal
|
|
16
|
-
function ____exports.postPlayerChangeHealthFire(self, player, healthType,
|
|
16
|
+
function ____exports.postPlayerChangeHealthFire(self, player, healthType, difference)
|
|
17
17
|
local character = player:GetPlayerType()
|
|
18
18
|
for ____, ____value in ipairs(subscriptions) do
|
|
19
19
|
local callback = ____value[1]
|
|
@@ -26,7 +26,7 @@ function ____exports.postPlayerChangeHealthFire(self, player, healthType, amount
|
|
|
26
26
|
if callbackCharacter ~= nil and callbackCharacter ~= character then
|
|
27
27
|
goto __continue5
|
|
28
28
|
end
|
|
29
|
-
callback(nil, player, healthType,
|
|
29
|
+
callback(nil, player, healthType, difference)
|
|
30
30
|
end
|
|
31
31
|
::__continue5::
|
|
32
32
|
end
|
|
@@ -23,7 +23,8 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
23
23
|
function useCardSoulOfIsaac(self)
|
|
24
24
|
v.room.trackedCollectibles:clear()
|
|
25
25
|
end
|
|
26
|
-
function postPickupUpdateCollectible(self,
|
|
26
|
+
function postPickupUpdateCollectible(self, pickup)
|
|
27
|
+
local collectible = pickup
|
|
27
28
|
if collectible.SubType == CollectibleType.NULL then
|
|
28
29
|
return
|
|
29
30
|
end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"main": "index",
|
|
23
23
|
"types": "index.d.ts",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"isaac-typescript-definitions": "^2.
|
|
25
|
+
"isaac-typescript-definitions": "^2.1.1"
|
|
26
26
|
}
|
|
27
27
|
}
|