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
@@ -1505,15 +1505,23 @@ function EID:OnRender()
|
||||
end
|
||||
-- Handle Crane Game
|
||||
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:hasCurseBlind() and EID.Config["DisableOnCurse"]) or (game.Challenge == Challenge.CHALLENGE_APRILS_FOOL and EID.Config["DisableOnAprilFoolsChallenge"]) then
|
||||
EID:addQuestionMarkDescription(closest)
|
||||
local isHideUncollected = EID.Config["HideUncollectedItemDescriptions"] and EID:requiredForCollectionPage(collectibleID)
|
||||
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
|
||||
else
|
||||
local collectibleID = EID.CraneItemType[closest.InitSeed.."Drop"..closest.DropSeed] or EID.CraneItemType[tostring(closest.InitSeed)]
|
||||
end
|
||||
if not wasHidden then
|
||||
local descriptionObj = EID:getDescriptionObj(5, 100, collectibleID, closest)
|
||||
|
||||
EID:addDescriptionToPrint(descriptionObj)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user