Fix Crane Game description, add REPENTOGON support (#814)
* Fix Crane Game description, add repentogon support * Update main.lua * Update main.lua
This commit is contained in:
1 parent
74d46e9704
commit
27774c9c5e
2 files changed
+20
-7
No files matched your search
@@ -1050,7 +1050,12 @@ function EID:hasDescription(entity)
|
|||||||
(EID.isRepentance and EID:getEntityData(entity, "EID_FlipItemID") and EID:PlayersHaveCollectible(CollectibleType.COLLECTIBLE_FLIP)))
|
(EID.isRepentance and EID:getEntityData(entity, "EID_FlipItemID") and EID:PlayersHaveCollectible(CollectibleType.COLLECTIBLE_FLIP)))
|
||||||
end
|
end
|
||||||
if entity.Type == 6 and entity.Variant == 16 and EID.Config["DisplayCraneInfo"] and EID.isRepentance then
|
if entity.Type == 6 and entity.Variant == 16 and EID.Config["DisplayCraneInfo"] and EID.isRepentance then
|
||||||
isAllowed = not entity:GetSprite():IsPlaying("Broken") and not entity:GetSprite():IsPlaying("Prize") and not entity:GetSprite():IsPlaying("OutOfPrizes") and (EID.CraneItemType[entity.InitSeed.."Drop"..entity.DropSeed] or EID.CraneItemType[tostring(entity.InitSeed)])
|
if REPENTOGON then
|
||||||
|
isAllowed = not entity:GetSprite():IsPlaying("Broken") and not entity:GetSprite():IsPlaying("OutOfPrizes") and entity:ToSlot():GetPrizeCollectible() ~= -1
|
||||||
|
else
|
||||||
|
isAllowed = not entity:GetSprite():IsPlaying("Broken") and not entity:GetSprite():IsPlaying("OutOfPrizes") and (EID.CraneItemType[entity.InitSeed.."Drop"..entity.DropSeed] or EID.CraneItemType[tostring(entity.InitSeed)])
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
if entity.Type == 1000 then
|
if entity.Type == 1000 then
|
||||||
if entity.Variant == 161 then
|
if entity.Variant == 161 then
|
||||||
|
|||||||
@@ -1505,15 +1505,23 @@ function EID:OnRender()
|
|||||||
end
|
end
|
||||||
-- Handle Crane Game
|
-- Handle Crane Game
|
||||||
elseif closest.Type == 6 and closest.Variant == 16 then
|
elseif closest.Type == 6 and closest.Variant == 16 then
|
||||||
if EID.CraneItemType[tostring(closest.InitSeed)] or EID.CraneItemType[closest.InitSeed.."Drop"..closest.DropSeed] then
|
local collectibleID = EID.CraneItemType[closest.InitSeed.."Drop"..closest.DropSeed] or EID.CraneItemType[tostring(closest.InitSeed)]
|
||||||
|
-- REPENTOGON lets us get the prize collectible directly
|
||||||
|
if REPENTOGON then
|
||||||
|
collectibleID = closest:ToSlot():GetPrizeCollectible()
|
||||||
|
end
|
||||||
|
if collectibleID then
|
||||||
|
local wasHidden = false
|
||||||
if EID:getEntityData(closest, "EID_DontHide") ~= true 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
|
local isHideUncollected = EID.Config["HideUncollectedItemDescriptions"] and EID:requiredForCollectionPage(collectibleID)
|
||||||
EID:addQuestionMarkDescription(closest)
|
if (EID.Config["DisableOnCurse"] and EID:hasCurseBlind()) or (isHideUncollected) or (EID.Config["DisableOnAprilFoolsChallenge"] and game.Challenge == Challenge.CHALLENGE_APRILS_FOOL) then
|
||||||
|
local description = isHideUncollected and EID:getDescriptionEntry("CollectionPageInfo") or nil
|
||||||
|
EID:addQuestionMarkDescription(closest, description)
|
||||||
|
wasHidden = true;
|
||||||
end
|
end
|
||||||
else
|
end
|
||||||
local collectibleID = EID.CraneItemType[closest.InitSeed.."Drop"..closest.DropSeed] or EID.CraneItemType[tostring(closest.InitSeed)]
|
if not wasHidden then
|
||||||
local descriptionObj = EID:getDescriptionObj(5, 100, collectibleID, closest)
|
local descriptionObj = EID:getDescriptionObj(5, 100, collectibleID, closest)
|
||||||
|
|
||||||
EID:addDescriptionToPrint(descriptionObj)
|
EID:addDescriptionToPrint(descriptionObj)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user