Crane Game support
This commit is contained in:
1 parent
4dacbb6b54
commit
25aea6f7d8
2 files changed
+31
-1
No files matched your search
+1
-1
@@ -491,7 +491,7 @@ function EID:hasDescription(entity)
|
|||||||
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_PILL and EID.Config["DisplayPillInfo"])
|
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_PILL and EID.Config["DisplayPillInfo"])
|
||||||
return isAllowed and entity.SubType > 0
|
return isAllowed and entity.SubType > 0
|
||||||
end
|
end
|
||||||
isAllowed = isAllowed or (entity.Type == 1000 and entity.Variant == EffectVariant.DICE_FLOOR and EID.Config["DisplayDiceInfo"])
|
isAllowed = isAllowed or (entity.Type == 1000 and entity.Variant == EffectVariant.DICE_FLOOR and EID.Config["DisplayDiceInfo"]) or (entity.Type == 6 and entity.Variant == 16)
|
||||||
return isAllowed
|
return isAllowed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,21 @@ function EID:IsAltChoice(pickup)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
-------------------------Handle Crane Game-----------------------------
|
||||||
|
|
||||||
|
function EID:postGetCollectible(selectedCollectible, itemPoolType, decrease, seed)
|
||||||
|
if itemPoolType == ItemPoolType.POOL_CRANE_GAME then
|
||||||
|
local cranes = Isaac.FindByType(6, 16)
|
||||||
|
for _, crane in pairs(cranes) do
|
||||||
|
if not EID:getEntityData(crane, "EID_CraneItemType") then
|
||||||
|
crane:GetData()["EID_CraneItemType"] = selectedCollectible
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EID:AddCallback(ModCallbacks.MC_POST_GET_COLLECTIBLE, EID.postGetCollectible)
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------Printing Functions------------------------------
|
---------------------------Printing Functions------------------------------
|
||||||
|
|
||||||
@@ -761,6 +776,21 @@ local function onRender(t)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if closest.Type == 6 and closest.Variant == 16 then
|
||||||
|
--Handle Crane Game
|
||||||
|
if EID:getEntityData(closest, "EID_CraneItemType") then
|
||||||
|
if EID:getEntityData(closest, "EID_DontHide") ~= true then
|
||||||
|
if (EID:hasCurseBlind() and EID.Config["DisableOnCurse"]) or (game.Challenge == Challenge.CHALLENGE_APRILS_FOOL and EID.Config["DisableOnAprilFoolsChallenge"]) then
|
||||||
|
EID:renderQuestionMark()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local descriptionObj = EID:getDescriptionObj(5, 100, EID:getEntityData(closest, "EID_CraneItemType"))
|
||||||
|
|
||||||
|
EID:printDescription(descriptionObj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if closest.Variant == PickupVariant.PICKUP_TRINKET then
|
if closest.Variant == PickupVariant.PICKUP_TRINKET then
|
||||||
--Handle Trinkets
|
--Handle Trinkets
|
||||||
local trinketID = closest.SubType
|
local trinketID = closest.SubType
|
||||||
|
|||||||
Reference in new issue
Block a user