isaacscript-common 1.2.150 → 1.2.151
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.
|
@@ -3,7 +3,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
5
5
|
local ____exports = {}
|
|
6
|
-
local hasSubscriptions,
|
|
6
|
+
local hasSubscriptions, postPEffectUpdateReordered, playerPickedUpNewItem, v
|
|
7
7
|
local ____exports = require("features.saveDataManager.exports")
|
|
8
8
|
local saveDataManager = ____exports.saveDataManager
|
|
9
9
|
local ____pickups = require("functions.pickups")
|
|
@@ -13,13 +13,15 @@ local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
|
|
|
13
13
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
14
14
|
local ____DefaultMap = require("types.DefaultMap")
|
|
15
15
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
16
|
+
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
17
|
+
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
16
18
|
local ____postPurchase = require("callbacks.subscriptions.postPurchase")
|
|
17
19
|
local postPurchaseFire = ____postPurchase.postPurchaseFire
|
|
18
20
|
local postPurchaseHasSubscriptions = ____postPurchase.postPurchaseHasSubscriptions
|
|
19
21
|
function hasSubscriptions(self)
|
|
20
22
|
return postPurchaseHasSubscriptions(nil)
|
|
21
23
|
end
|
|
22
|
-
function
|
|
24
|
+
function postPEffectUpdateReordered(self, player)
|
|
23
25
|
if not hasSubscriptions(nil) then
|
|
24
26
|
return
|
|
25
27
|
end
|
|
@@ -43,6 +45,6 @@ end
|
|
|
43
45
|
v = {room = {playersHoldingItemOnLastFrameMap = __TS__New(DefaultMap, false)}}
|
|
44
46
|
function ____exports.postPurchaseCallbackInit(self, mod)
|
|
45
47
|
saveDataManager(nil, "postPurchase", v, hasSubscriptions)
|
|
46
|
-
mod:
|
|
48
|
+
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
47
49
|
end
|
|
48
50
|
return ____exports
|
|
@@ -3,7 +3,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
3
3
|
local Set = ____lualib.Set
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local ____exports = {}
|
|
6
|
-
local
|
|
6
|
+
local postPEffectUpdateReordered, FLAGS_WHEN_PONY_IS_ACTIVE, v
|
|
7
7
|
local ____featuresInitialized = require("featuresInitialized")
|
|
8
8
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
9
9
|
local ____flag = require("functions.flag")
|
|
@@ -12,9 +12,11 @@ local ____playerDataStructures = require("functions.playerDataStructures")
|
|
|
12
12
|
local setAddPlayer = ____playerDataStructures.setAddPlayer
|
|
13
13
|
local setDeletePlayer = ____playerDataStructures.setDeletePlayer
|
|
14
14
|
local setHasPlayer = ____playerDataStructures.setHasPlayer
|
|
15
|
+
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
16
|
+
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
15
17
|
local ____exports = require("features.saveDataManager.exports")
|
|
16
18
|
local saveDataManager = ____exports.saveDataManager
|
|
17
|
-
function
|
|
19
|
+
function postPEffectUpdateReordered(self, player)
|
|
18
20
|
local effects = player:GetEffects()
|
|
19
21
|
local entityFlags = player:GetEntityFlags()
|
|
20
22
|
local hasPonyCollectibleEffect = effects:HasCollectibleEffect(CollectibleType.COLLECTIBLE_PONY) or effects:HasCollectibleEffect(CollectibleType.COLLECTIBLE_WHITE_PONY)
|
|
@@ -36,7 +38,7 @@ FLAGS_WHEN_PONY_IS_ACTIVE = {EntityFlag.FLAG_NO_KNOCKBACK, EntityFlag.FLAG_NO_PH
|
|
|
36
38
|
v = {run = {playersIsPonyActive = __TS__New(Set)}}
|
|
37
39
|
function ____exports.isPonyActiveInit(self, mod)
|
|
38
40
|
saveDataManager(nil, "isPonyActive", v)
|
|
39
|
-
mod:
|
|
41
|
+
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
40
42
|
end
|
|
41
43
|
function ____exports.isPonyActive(self, player)
|
|
42
44
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|