isaacscript-common 1.2.121 → 1.2.122
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.
|
@@ -250,6 +250,11 @@ export declare function isBethany(player: EntityPlayer): boolean;
|
|
|
250
250
|
* (For example, the Strawman Keeper.)
|
|
251
251
|
*/
|
|
252
252
|
export declare function isChildPlayer(player: EntityPlayer): boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Helper function for detecting when a player is Eden or Tainted Eden. Useful for situations where
|
|
255
|
+
* you want to know if the starting stats were randomized, for example.
|
|
256
|
+
*/
|
|
257
|
+
export declare function isEden(player: EntityPlayer): boolean;
|
|
253
258
|
export declare function isFirstPlayer(player: EntityPlayer): boolean;
|
|
254
259
|
/**
|
|
255
260
|
* Helper function for detecting when a player is Jacob or Esau. This will only match the
|
|
@@ -543,6 +543,10 @@ function ____exports.isBethany(self, player)
|
|
|
543
543
|
local character = player:GetPlayerType()
|
|
544
544
|
return character == PlayerType.PLAYER_BETHANY or character == PlayerType.PLAYER_BETHANY_B
|
|
545
545
|
end
|
|
546
|
+
function ____exports.isEden(self, player)
|
|
547
|
+
local character = player:GetPlayerType()
|
|
548
|
+
return character == PlayerType.PLAYER_EDEN or character == PlayerType.PLAYER_EDEN_B
|
|
549
|
+
end
|
|
546
550
|
function ____exports.isFirstPlayer(self, player)
|
|
547
551
|
return ____exports.getPlayerIndexVanilla(nil, player) == 0
|
|
548
552
|
end
|
|
@@ -603,9 +607,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
603
607
|
itemPool:RemoveCollectible(collectibleType)
|
|
604
608
|
end
|
|
605
609
|
repeat
|
|
606
|
-
local
|
|
607
|
-
local
|
|
608
|
-
if
|
|
610
|
+
local ____switch129 = activeSlot
|
|
611
|
+
local ____cond129 = ____switch129 == ActiveSlot.SLOT_PRIMARY
|
|
612
|
+
if ____cond129 then
|
|
609
613
|
do
|
|
610
614
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
611
615
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -614,8 +618,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
614
618
|
break
|
|
615
619
|
end
|
|
616
620
|
end
|
|
617
|
-
|
|
618
|
-
if
|
|
621
|
+
____cond129 = ____cond129 or ____switch129 == ActiveSlot.SLOT_SECONDARY
|
|
622
|
+
if ____cond129 then
|
|
619
623
|
do
|
|
620
624
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
621
625
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -630,16 +634,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
630
634
|
break
|
|
631
635
|
end
|
|
632
636
|
end
|
|
633
|
-
|
|
634
|
-
if
|
|
637
|
+
____cond129 = ____cond129 or ____switch129 == ActiveSlot.SLOT_POCKET
|
|
638
|
+
if ____cond129 then
|
|
635
639
|
do
|
|
636
640
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
637
641
|
player:SetActiveCharge(charge, activeSlot)
|
|
638
642
|
break
|
|
639
643
|
end
|
|
640
644
|
end
|
|
641
|
-
|
|
642
|
-
if
|
|
645
|
+
____cond129 = ____cond129 or ____switch129 == ActiveSlot.SLOT_POCKET2
|
|
646
|
+
if ____cond129 then
|
|
643
647
|
do
|
|
644
648
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
645
649
|
break
|