isaacscript-common 17.8.0 → 17.9.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/dist/index.d.ts
CHANGED
|
@@ -11690,6 +11690,14 @@ export declare function playerConvertSoulHeartsToBlackHearts(player: EntityPlaye
|
|
|
11690
11690
|
*/
|
|
11691
11691
|
export declare function playerHasCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): boolean;
|
|
11692
11692
|
|
|
11693
|
+
/**
|
|
11694
|
+
* Helper function to check to see if a player has one or more transformations.
|
|
11695
|
+
*
|
|
11696
|
+
* This function is variadic, meaning that you can supply as many transformations as you want to
|
|
11697
|
+
* check for. Returns true if the player has any of the supplied transformations.
|
|
11698
|
+
*/
|
|
11699
|
+
export declare function playerHasForm(player: EntityPlayer, ...playerForms: PlayerForm[]): boolean;
|
|
11700
|
+
|
|
11693
11701
|
/**
|
|
11694
11702
|
* Helper function to see if the player is out of health.
|
|
11695
11703
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 17.
|
|
3
|
+
isaacscript-common 17.9.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -21756,12 +21756,19 @@ function ____exports.playerHasCollectible(self, player, ...)
|
|
|
21756
21756
|
function(____, collectibleType) return player:HasCollectible(collectibleType) end
|
|
21757
21757
|
)
|
|
21758
21758
|
end
|
|
21759
|
+
function ____exports.playerHasForm(self, player, ...)
|
|
21760
|
+
local playerForms = {...}
|
|
21761
|
+
return __TS__ArraySome(
|
|
21762
|
+
playerForms,
|
|
21763
|
+
function(____, playerForm) return player:HasPlayerForm(playerForm) end
|
|
21764
|
+
)
|
|
21765
|
+
end
|
|
21759
21766
|
function ____exports.removeAllActiveItems(self, player)
|
|
21760
21767
|
for ____, activeSlot in ipairs(getEnumValues(nil, ActiveSlot)) do
|
|
21761
21768
|
do
|
|
21762
21769
|
local collectibleType = player:GetActiveItem(activeSlot)
|
|
21763
21770
|
if collectibleType == CollectibleType.NULL then
|
|
21764
|
-
goto
|
|
21771
|
+
goto __continue93
|
|
21765
21772
|
end
|
|
21766
21773
|
local hasCollectible
|
|
21767
21774
|
repeat
|
|
@@ -21771,7 +21778,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
21771
21778
|
end
|
|
21772
21779
|
until not hasCollectible
|
|
21773
21780
|
end
|
|
21774
|
-
::
|
|
21781
|
+
::__continue93::
|
|
21775
21782
|
end
|
|
21776
21783
|
end
|
|
21777
21784
|
function ____exports.removeAllPlayerTrinkets(self, player)
|
|
@@ -21779,7 +21786,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
21779
21786
|
do
|
|
21780
21787
|
local trinketType = player:GetTrinket(trinketSlot)
|
|
21781
21788
|
if trinketType == TrinketType.NULL then
|
|
21782
|
-
goto
|
|
21789
|
+
goto __continue98
|
|
21783
21790
|
end
|
|
21784
21791
|
local hasTrinket
|
|
21785
21792
|
repeat
|
|
@@ -21789,7 +21796,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
21789
21796
|
end
|
|
21790
21797
|
until not hasTrinket
|
|
21791
21798
|
end
|
|
21792
|
-
::
|
|
21799
|
+
::__continue98::
|
|
21793
21800
|
end
|
|
21794
21801
|
end
|
|
21795
21802
|
function ____exports.removeCollectibleCostume(self, player, collectibleType)
|
|
@@ -21843,9 +21850,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
21843
21850
|
itemPool:RemoveCollectible(collectibleType)
|
|
21844
21851
|
end
|
|
21845
21852
|
repeat
|
|
21846
|
-
local
|
|
21847
|
-
local
|
|
21848
|
-
if
|
|
21853
|
+
local ____switch117 = activeSlot
|
|
21854
|
+
local ____cond117 = ____switch117 == ActiveSlot.PRIMARY
|
|
21855
|
+
if ____cond117 then
|
|
21849
21856
|
do
|
|
21850
21857
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
21851
21858
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -21854,8 +21861,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
21854
21861
|
break
|
|
21855
21862
|
end
|
|
21856
21863
|
end
|
|
21857
|
-
|
|
21858
|
-
if
|
|
21864
|
+
____cond117 = ____cond117 or ____switch117 == ActiveSlot.SECONDARY
|
|
21865
|
+
if ____cond117 then
|
|
21859
21866
|
do
|
|
21860
21867
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
21861
21868
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -21870,16 +21877,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
21870
21877
|
break
|
|
21871
21878
|
end
|
|
21872
21879
|
end
|
|
21873
|
-
|
|
21874
|
-
if
|
|
21880
|
+
____cond117 = ____cond117 or ____switch117 == ActiveSlot.POCKET
|
|
21881
|
+
if ____cond117 then
|
|
21875
21882
|
do
|
|
21876
21883
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
21877
21884
|
player:SetActiveCharge(charge, activeSlot)
|
|
21878
21885
|
break
|
|
21879
21886
|
end
|
|
21880
21887
|
end
|
|
21881
|
-
|
|
21882
|
-
if
|
|
21888
|
+
____cond117 = ____cond117 or ____switch117 == ActiveSlot.POCKET_SINGLE_USE
|
|
21889
|
+
if ____cond117 then
|
|
21883
21890
|
do
|
|
21884
21891
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
21885
21892
|
break
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActiveSlot, CollectibleType, ControllerIndex, PlayerType, TrinketType } from "isaac-typescript-definitions";
|
|
1
|
+
import { ActiveSlot, CollectibleType, ControllerIndex, PlayerForm, PlayerType, TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
|
|
3
3
|
export declare function addTrinketCostume(player: EntityPlayer, trinketType: TrinketType): void;
|
|
4
4
|
export declare function anyPlayerHasCollectible(collectibleType: CollectibleType): boolean;
|
|
@@ -230,6 +230,13 @@ export declare function playerAddCollectible(player: EntityPlayer, ...collectibl
|
|
|
230
230
|
* check for. Returns true if the player has any of the supplied collectible types.
|
|
231
231
|
*/
|
|
232
232
|
export declare function playerHasCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Helper function to check to see if a player has one or more transformations.
|
|
235
|
+
*
|
|
236
|
+
* This function is variadic, meaning that you can supply as many transformations as you want to
|
|
237
|
+
* check for. Returns true if the player has any of the supplied transformations.
|
|
238
|
+
*/
|
|
239
|
+
export declare function playerHasForm(player: EntityPlayer, ...playerForms: PlayerForm[]): boolean;
|
|
233
240
|
/**
|
|
234
241
|
* Helper function to remove all of the active items from a player. This includes the Schoolbag item
|
|
235
242
|
* and any pocket actives.
|
|
@@ -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,
|
|
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,EAEV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AActC,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,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,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;;;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"}
|
|
@@ -504,6 +504,17 @@ function ____exports.playerHasCollectible(self, player, ...)
|
|
|
504
504
|
function(____, collectibleType) return player:HasCollectible(collectibleType) end
|
|
505
505
|
)
|
|
506
506
|
end
|
|
507
|
+
--- Helper function to check to see if a player has one or more transformations.
|
|
508
|
+
--
|
|
509
|
+
-- This function is variadic, meaning that you can supply as many transformations as you want to
|
|
510
|
+
-- check for. Returns true if the player has any of the supplied transformations.
|
|
511
|
+
function ____exports.playerHasForm(self, player, ...)
|
|
512
|
+
local playerForms = {...}
|
|
513
|
+
return __TS__ArraySome(
|
|
514
|
+
playerForms,
|
|
515
|
+
function(____, playerForm) return player:HasPlayerForm(playerForm) end
|
|
516
|
+
)
|
|
517
|
+
end
|
|
507
518
|
--- Helper function to remove all of the active items from a player. This includes the Schoolbag item
|
|
508
519
|
-- and any pocket actives.
|
|
509
520
|
function ____exports.removeAllActiveItems(self, player)
|
|
@@ -511,7 +522,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
511
522
|
do
|
|
512
523
|
local collectibleType = player:GetActiveItem(activeSlot)
|
|
513
524
|
if collectibleType == CollectibleType.NULL then
|
|
514
|
-
goto
|
|
525
|
+
goto __continue93
|
|
515
526
|
end
|
|
516
527
|
local hasCollectible
|
|
517
528
|
repeat
|
|
@@ -521,7 +532,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
521
532
|
end
|
|
522
533
|
until not hasCollectible
|
|
523
534
|
end
|
|
524
|
-
::
|
|
535
|
+
::__continue93::
|
|
525
536
|
end
|
|
526
537
|
end
|
|
527
538
|
--- Helper function to remove all of the held trinkets from a player.
|
|
@@ -533,7 +544,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
533
544
|
do
|
|
534
545
|
local trinketType = player:GetTrinket(trinketSlot)
|
|
535
546
|
if trinketType == TrinketType.NULL then
|
|
536
|
-
goto
|
|
547
|
+
goto __continue98
|
|
537
548
|
end
|
|
538
549
|
local hasTrinket
|
|
539
550
|
repeat
|
|
@@ -543,7 +554,7 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
543
554
|
end
|
|
544
555
|
until not hasTrinket
|
|
545
556
|
end
|
|
546
|
-
::
|
|
557
|
+
::__continue98::
|
|
547
558
|
end
|
|
548
559
|
end
|
|
549
560
|
--- Helper function to remove a collectible costume from a player. Use this helper function to avoid
|
|
@@ -624,9 +635,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
624
635
|
itemPool:RemoveCollectible(collectibleType)
|
|
625
636
|
end
|
|
626
637
|
repeat
|
|
627
|
-
local
|
|
628
|
-
local
|
|
629
|
-
if
|
|
638
|
+
local ____switch117 = activeSlot
|
|
639
|
+
local ____cond117 = ____switch117 == ActiveSlot.PRIMARY
|
|
640
|
+
if ____cond117 then
|
|
630
641
|
do
|
|
631
642
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
632
643
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -635,8 +646,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
635
646
|
break
|
|
636
647
|
end
|
|
637
648
|
end
|
|
638
|
-
|
|
639
|
-
if
|
|
649
|
+
____cond117 = ____cond117 or ____switch117 == ActiveSlot.SECONDARY
|
|
650
|
+
if ____cond117 then
|
|
640
651
|
do
|
|
641
652
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
642
653
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -651,16 +662,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
651
662
|
break
|
|
652
663
|
end
|
|
653
664
|
end
|
|
654
|
-
|
|
655
|
-
if
|
|
665
|
+
____cond117 = ____cond117 or ____switch117 == ActiveSlot.POCKET
|
|
666
|
+
if ____cond117 then
|
|
656
667
|
do
|
|
657
668
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
658
669
|
player:SetActiveCharge(charge, activeSlot)
|
|
659
670
|
break
|
|
660
671
|
end
|
|
661
672
|
end
|
|
662
|
-
|
|
663
|
-
if
|
|
673
|
+
____cond117 = ____cond117 or ____switch117 == ActiveSlot.POCKET_SINGLE_USE
|
|
674
|
+
if ____cond117 then
|
|
664
675
|
do
|
|
665
676
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
666
677
|
break
|
package/package.json
CHANGED
package/src/functions/players.ts
CHANGED
|
@@ -642,6 +642,19 @@ export function playerHasCollectible(
|
|
|
642
642
|
);
|
|
643
643
|
}
|
|
644
644
|
|
|
645
|
+
/**
|
|
646
|
+
* Helper function to check to see if a player has one or more transformations.
|
|
647
|
+
*
|
|
648
|
+
* This function is variadic, meaning that you can supply as many transformations as you want to
|
|
649
|
+
* check for. Returns true if the player has any of the supplied transformations.
|
|
650
|
+
*/
|
|
651
|
+
export function playerHasForm(
|
|
652
|
+
player: EntityPlayer,
|
|
653
|
+
...playerForms: PlayerForm[]
|
|
654
|
+
): boolean {
|
|
655
|
+
return playerForms.some((playerForm) => player.HasPlayerForm(playerForm));
|
|
656
|
+
}
|
|
657
|
+
|
|
645
658
|
/**
|
|
646
659
|
* Helper function to remove all of the active items from a player. This includes the Schoolbag item
|
|
647
660
|
* and any pocket actives.
|