isaacscript-common 72.0.0 → 72.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 72.0.
|
|
3
|
+
isaacscript-common 72.0.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -21890,6 +21890,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
21890
21890
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
21891
21891
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
21892
21892
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
21893
|
+
local ____frames = require("src.functions.frames")
|
|
21894
|
+
local isAfterRoomFrame = ____frames.isAfterRoomFrame
|
|
21893
21895
|
local ____playerDataStructures = require("src.functions.playerDataStructures")
|
|
21894
21896
|
local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
|
|
21895
21897
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
@@ -21913,7 +21915,7 @@ function PostHolyMantleRemoved.prototype.____constructor(self)
|
|
|
21913
21915
|
local newNumHolyMantles = effects:GetCollectibleEffectNum(CollectibleType.HOLY_MANTLE)
|
|
21914
21916
|
local oldNumHolyMantles = defaultMapGetPlayer(nil, v.run.playersHolyMantleMap, player)
|
|
21915
21917
|
mapSetPlayer(nil, v.run.playersHolyMantleMap, player, newNumHolyMantles)
|
|
21916
|
-
if newNumHolyMantles < oldNumHolyMantles then
|
|
21918
|
+
if newNumHolyMantles < oldNumHolyMantles and isAfterRoomFrame(nil, 0) then
|
|
21917
21919
|
self:fire(player, oldNumHolyMantles, newNumHolyMantles)
|
|
21918
21920
|
end
|
|
21919
21921
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostHolyMantleRemoved.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostHolyMantleRemoved.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"PostHolyMantleRemoved.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostHolyMantleRemoved.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQ3D,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,wBAAwB,CAAC;IACnF,CAAC;;;;MAAK;;IAatB,UAAmB,UAAU,0BAAoB;IAGjD,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAoBzC;CACH"}
|
|
@@ -7,6 +7,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
7
7
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
8
8
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
9
9
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
10
|
+
local ____frames = require("src.functions.frames")
|
|
11
|
+
local isAfterRoomFrame = ____frames.isAfterRoomFrame
|
|
10
12
|
local ____playerDataStructures = require("src.functions.playerDataStructures")
|
|
11
13
|
local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
|
|
12
14
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
@@ -30,7 +32,7 @@ function PostHolyMantleRemoved.prototype.____constructor(self)
|
|
|
30
32
|
local newNumHolyMantles = effects:GetCollectibleEffectNum(CollectibleType.HOLY_MANTLE)
|
|
31
33
|
local oldNumHolyMantles = defaultMapGetPlayer(nil, v.run.playersHolyMantleMap, player)
|
|
32
34
|
mapSetPlayer(nil, v.run.playersHolyMantleMap, player, newNumHolyMantles)
|
|
33
|
-
if newNumHolyMantles < oldNumHolyMantles then
|
|
35
|
+
if newNumHolyMantles < oldNumHolyMantles and isAfterRoomFrame(nil, 0) then
|
|
34
36
|
self:fire(player, oldNumHolyMantles, newNumHolyMantles)
|
|
35
37
|
end
|
|
36
38
|
end
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
3
|
+
import { isAfterRoomFrame } from "../../functions/frames";
|
|
3
4
|
import {
|
|
4
5
|
defaultMapGetPlayer,
|
|
5
6
|
mapSetPlayer,
|
|
@@ -45,7 +46,11 @@ export class PostHolyMantleRemoved extends CustomCallback<ModCallbackCustom.POST
|
|
|
45
46
|
);
|
|
46
47
|
mapSetPlayer(v.run.playersHolyMantleMap, player, newNumHolyMantles);
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
// We check for being after room frame 0 to prevent the callback from firing when the player
|
|
50
|
+
// loses a lost curse from a white fire. (In this case, the player will have a Holy Mantle
|
|
51
|
+
// effect from the lost curse, and then when losing the curse, they will also lose the Holy
|
|
52
|
+
// Mantle.)
|
|
53
|
+
if (newNumHolyMantles < oldNumHolyMantles && isAfterRoomFrame(0)) {
|
|
49
54
|
this.fire(player, oldNumHolyMantles, newNumHolyMantles);
|
|
50
55
|
}
|
|
51
56
|
};
|