isaacscript-common 30.6.1 → 30.7.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.
- package/dist/index.rollup.d.ts +6 -0
- package/dist/isaacscript-common.lua +23 -15
- package/dist/src/functions/nextStage.d.ts.map +1 -1
- package/dist/src/functions/nextStage.lua +2 -1
- package/dist/src/functions/players.d.ts +5 -0
- package/dist/src/functions/players.d.ts.map +1 -1
- package/dist/src/functions/players.lua +22 -13
- package/package.json +1 -1
- package/src/functions/nextStage.ts +2 -1
- package/src/functions/players.ts +9 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -1021,6 +1021,12 @@ export declare function anyPlayerHasCollectible(collectibleType: CollectibleType
|
|
|
1021
1021
|
*/
|
|
1022
1022
|
export declare function anyPlayerHasTrinket(trinketType: TrinketType, ignoreModifiers?: boolean): boolean;
|
|
1023
1023
|
|
|
1024
|
+
/**
|
|
1025
|
+
* Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
1026
|
+
* activation, a poop from IBS, etc.).
|
|
1027
|
+
*/
|
|
1028
|
+
export declare function anyPlayerHoldingItem(): boolean;
|
|
1029
|
+
|
|
1024
1030
|
/**
|
|
1025
1031
|
* Helper function to determine if the given character is present.
|
|
1026
1032
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 30.
|
|
3
|
+
isaacscript-common 30.7.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -21687,6 +21687,13 @@ function ____exports.anyPlayerHasTrinket(self, trinketType, ignoreModifiers)
|
|
|
21687
21687
|
function(____, player) return player:HasTrinket(trinketType, ignoreModifiers) end
|
|
21688
21688
|
)
|
|
21689
21689
|
end
|
|
21690
|
+
function ____exports.anyPlayerHoldingItem(self)
|
|
21691
|
+
local players = getAllPlayers(nil)
|
|
21692
|
+
return __TS__ArraySome(
|
|
21693
|
+
players,
|
|
21694
|
+
function(____, player) return player:IsHoldingItem() end
|
|
21695
|
+
)
|
|
21696
|
+
end
|
|
21690
21697
|
function ____exports.anyPlayerIs(self, ...)
|
|
21691
21698
|
local matchingCharacters = {...}
|
|
21692
21699
|
local matchingCharacterSet = __TS__New(ReadonlySet, matchingCharacters)
|
|
@@ -21993,7 +22000,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
21993
22000
|
do
|
|
21994
22001
|
local collectibleType = player:GetActiveItem(activeSlot)
|
|
21995
22002
|
if collectibleType == CollectibleType.NULL then
|
|
21996
|
-
goto
|
|
22003
|
+
goto __continue97
|
|
21997
22004
|
end
|
|
21998
22005
|
local stillHasCollectible
|
|
21999
22006
|
repeat
|
|
@@ -22003,7 +22010,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
22003
22010
|
end
|
|
22004
22011
|
until not stillHasCollectible
|
|
22005
22012
|
end
|
|
22006
|
-
::
|
|
22013
|
+
::__continue97::
|
|
22007
22014
|
end
|
|
22008
22015
|
end
|
|
22009
22016
|
function ____exports.removeAllPlayerTrinkets(self, player)
|
|
@@ -22011,7 +22018,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
22011
22018
|
do
|
|
22012
22019
|
local trinketType = player:GetTrinket(trinketSlot)
|
|
22013
22020
|
if trinketType == TrinketType.NULL then
|
|
22014
|
-
goto
|
|
22021
|
+
goto __continue102
|
|
22015
22022
|
end
|
|
22016
22023
|
local hasTrinket
|
|
22017
22024
|
repeat
|
|
@@ -22021,7 +22028,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
22021
22028
|
end
|
|
22022
22029
|
until not hasTrinket
|
|
22023
22030
|
end
|
|
22024
|
-
::
|
|
22031
|
+
::__continue102::
|
|
22025
22032
|
end
|
|
22026
22033
|
end
|
|
22027
22034
|
function ____exports.removeCollectible(self, player, ...)
|
|
@@ -22081,9 +22088,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
22081
22088
|
itemPool:RemoveCollectible(collectibleType)
|
|
22082
22089
|
end
|
|
22083
22090
|
repeat
|
|
22084
|
-
local
|
|
22085
|
-
local
|
|
22086
|
-
if
|
|
22091
|
+
local ____switch124 = activeSlot
|
|
22092
|
+
local ____cond124 = ____switch124 == ActiveSlot.PRIMARY
|
|
22093
|
+
if ____cond124 then
|
|
22087
22094
|
do
|
|
22088
22095
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
22089
22096
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -22092,8 +22099,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
22092
22099
|
break
|
|
22093
22100
|
end
|
|
22094
22101
|
end
|
|
22095
|
-
|
|
22096
|
-
if
|
|
22102
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SECONDARY
|
|
22103
|
+
if ____cond124 then
|
|
22097
22104
|
do
|
|
22098
22105
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
22099
22106
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -22108,16 +22115,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
22108
22115
|
break
|
|
22109
22116
|
end
|
|
22110
22117
|
end
|
|
22111
|
-
|
|
22112
|
-
if
|
|
22118
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.POCKET
|
|
22119
|
+
if ____cond124 then
|
|
22113
22120
|
do
|
|
22114
22121
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
22115
22122
|
player:SetActiveCharge(charge, activeSlot)
|
|
22116
22123
|
break
|
|
22117
22124
|
end
|
|
22118
22125
|
end
|
|
22119
|
-
|
|
22120
|
-
if
|
|
22126
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.POCKET_SINGLE_USE
|
|
22127
|
+
if ____cond124 then
|
|
22121
22128
|
do
|
|
22122
22129
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
22123
22130
|
break
|
|
@@ -40839,7 +40846,8 @@ function ____exports.getNextStage(self)
|
|
|
40839
40846
|
local repentanceStage = onRepentanceStage(nil)
|
|
40840
40847
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
40841
40848
|
if backwardsPath then
|
|
40842
|
-
|
|
40849
|
+
local nextStage = asNumber(nil, stage) - 1
|
|
40850
|
+
return nextStage == 0 and LevelStage.HOME or nextStage
|
|
40843
40851
|
end
|
|
40844
40852
|
repeat
|
|
40845
40853
|
local ____switch4 = roomGridIndex
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextStage.d.ts","sourceRoot":"","sources":["../../../src/functions/nextStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"nextStage.d.ts","sourceRoot":"","sources":["../../../src/functions/nextStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,UAAU,CAyFzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,UAAQ,GAAG,SAAS,CAiF3D"}
|
|
@@ -28,7 +28,8 @@ function ____exports.getNextStage(self)
|
|
|
28
28
|
local repentanceStage = onRepentanceStage(nil)
|
|
29
29
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
30
30
|
if backwardsPath then
|
|
31
|
-
|
|
31
|
+
local nextStage = asNumber(nil, stage) - 1
|
|
32
|
+
return nextStage == 0 and LevelStage.HOME or nextStage
|
|
32
33
|
end
|
|
33
34
|
repeat
|
|
34
35
|
local ____switch4 = roomGridIndex
|
|
@@ -25,6 +25,11 @@ export declare function anyPlayerHasCollectible(collectibleType: CollectibleType
|
|
|
25
25
|
* effects granted by other items. Default is false.
|
|
26
26
|
*/
|
|
27
27
|
export declare function anyPlayerHasTrinket(trinketType: TrinketType, ignoreModifiers?: boolean): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
30
|
+
* activation, a poop from IBS, etc.).
|
|
31
|
+
*/
|
|
32
|
+
export declare function anyPlayerHoldingItem(): boolean;
|
|
28
33
|
/**
|
|
29
34
|
* Helper function to determine if the given character is present.
|
|
30
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAEf,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkBtC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAKT;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;;;;;GAOG;AACH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/B,IAAI,CAON;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAQN;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,aAAqB,EAC/B,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
|
|
1
|
+
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAEf,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkBtC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC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9D;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAG7D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAa/D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAalE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAQN;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,aAAqB,EAC/B,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
|
|
@@ -113,6 +113,15 @@ function ____exports.anyPlayerHasTrinket(self, trinketType, ignoreModifiers)
|
|
|
113
113
|
function(____, player) return player:HasTrinket(trinketType, ignoreModifiers) end
|
|
114
114
|
)
|
|
115
115
|
end
|
|
116
|
+
--- Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
117
|
+
-- activation, a poop from IBS, etc.).
|
|
118
|
+
function ____exports.anyPlayerHoldingItem(self)
|
|
119
|
+
local players = getAllPlayers(nil)
|
|
120
|
+
return __TS__ArraySome(
|
|
121
|
+
players,
|
|
122
|
+
function(____, player) return player:IsHoldingItem() end
|
|
123
|
+
)
|
|
124
|
+
end
|
|
116
125
|
--- Helper function to determine if the given character is present.
|
|
117
126
|
--
|
|
118
127
|
-- This function is variadic, meaning that you can supply as many characters as you want to check
|
|
@@ -547,7 +556,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
547
556
|
do
|
|
548
557
|
local collectibleType = player:GetActiveItem(activeSlot)
|
|
549
558
|
if collectibleType == CollectibleType.NULL then
|
|
550
|
-
goto
|
|
559
|
+
goto __continue97
|
|
551
560
|
end
|
|
552
561
|
local stillHasCollectible
|
|
553
562
|
repeat
|
|
@@ -557,7 +566,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
557
566
|
end
|
|
558
567
|
until not stillHasCollectible
|
|
559
568
|
end
|
|
560
|
-
::
|
|
569
|
+
::__continue97::
|
|
561
570
|
end
|
|
562
571
|
end
|
|
563
572
|
--- Helper function to remove all of the held trinkets from a player.
|
|
@@ -569,7 +578,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
569
578
|
do
|
|
570
579
|
local trinketType = player:GetTrinket(trinketSlot)
|
|
571
580
|
if trinketType == TrinketType.NULL then
|
|
572
|
-
goto
|
|
581
|
+
goto __continue102
|
|
573
582
|
end
|
|
574
583
|
local hasTrinket
|
|
575
584
|
repeat
|
|
@@ -579,7 +588,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
579
588
|
end
|
|
580
589
|
until not hasTrinket
|
|
581
590
|
end
|
|
582
|
-
::
|
|
591
|
+
::__continue102::
|
|
583
592
|
end
|
|
584
593
|
end
|
|
585
594
|
--- Helper function to remove one or more collectibles to a player.
|
|
@@ -670,9 +679,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
670
679
|
itemPool:RemoveCollectible(collectibleType)
|
|
671
680
|
end
|
|
672
681
|
repeat
|
|
673
|
-
local
|
|
674
|
-
local
|
|
675
|
-
if
|
|
682
|
+
local ____switch124 = activeSlot
|
|
683
|
+
local ____cond124 = ____switch124 == ActiveSlot.PRIMARY
|
|
684
|
+
if ____cond124 then
|
|
676
685
|
do
|
|
677
686
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
678
687
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -681,8 +690,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
681
690
|
break
|
|
682
691
|
end
|
|
683
692
|
end
|
|
684
|
-
|
|
685
|
-
if
|
|
693
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SECONDARY
|
|
694
|
+
if ____cond124 then
|
|
686
695
|
do
|
|
687
696
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
688
697
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -697,16 +706,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
697
706
|
break
|
|
698
707
|
end
|
|
699
708
|
end
|
|
700
|
-
|
|
701
|
-
if
|
|
709
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.POCKET
|
|
710
|
+
if ____cond124 then
|
|
702
711
|
do
|
|
703
712
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
704
713
|
player:SetActiveCharge(charge, activeSlot)
|
|
705
714
|
break
|
|
706
715
|
end
|
|
707
716
|
end
|
|
708
|
-
|
|
709
|
-
if
|
|
717
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.POCKET_SINGLE_USE
|
|
718
|
+
if ____cond124 then
|
|
710
719
|
do
|
|
711
720
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
712
721
|
break
|
package/package.json
CHANGED
|
@@ -33,7 +33,8 @@ export function getNextStage(): LevelStage {
|
|
|
33
33
|
|
|
34
34
|
// First, handle the special case of being on the backwards path.
|
|
35
35
|
if (backwardsPath) {
|
|
36
|
-
|
|
36
|
+
const nextStage = asNumber(stage) - 1;
|
|
37
|
+
return nextStage === 0 ? LevelStage.HOME : nextStage;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
// Second, handle the special case of being in a specific off-grid room.
|
package/src/functions/players.ts
CHANGED
|
@@ -99,6 +99,15 @@ export function anyPlayerHasTrinket(
|
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
104
|
+
* activation, a poop from IBS, etc.).
|
|
105
|
+
*/
|
|
106
|
+
export function anyPlayerHoldingItem(): boolean {
|
|
107
|
+
const players = getAllPlayers();
|
|
108
|
+
return players.some((player) => player.IsHoldingItem());
|
|
109
|
+
}
|
|
110
|
+
|
|
102
111
|
/**
|
|
103
112
|
* Helper function to determine if the given character is present.
|
|
104
113
|
*
|