From beb4cad9f68deca6181a6634d76b7f7e003a3ca7 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Wed, 11 Aug 2021 03:43:03 +0200 Subject: [PATCH] Fixed spelling error in IsAltChoice function --- main.lua | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/main.lua b/main.lua index ee1b95d0..97748902 100644 --- a/main.lua +++ b/main.lua @@ -172,16 +172,16 @@ questionMarkSprite:Load("gfx/005.100_collectible.anm2",true) questionMarkSprite:ReplaceSpritesheet(1,"gfx/items/collectibles/questionmark.png") questionMarkSprite:LoadGraphics() -function EID:IsAltChoise(pickup) +function EID:IsAltChoice(pickup) if pickup:GetData() == nil then return false end - if EID:getEntityData(pickup, "EID_IsAltChoise") ~= nil then - return EID:getEntityData(pickup, "EID_IsAltChoise") + if EID:getEntityData(pickup, "EID_IsAltChoice") ~= nil then + return EID:getEntityData(pickup, "EID_IsAltChoice") end if not REPENTANCE or game:GetLevel():GetStageType() < 4 or game:GetRoom():GetType() ~= RoomType.ROOM_TREASURE then - pickup:GetData()["EID_IsAltChoise"] = false + pickup:GetData()["EID_IsAltChoice"] = false return false end @@ -190,7 +190,7 @@ function EID:IsAltChoise(pickup) if name ~= "Idle" and name ~= "ShopIdle" then -- Collectible can be ignored. its definetly not hidden - pickup:GetData()["EID_IsAltChoise"] = false + pickup:GetData()["EID_IsAltChoice"] = false return false end @@ -201,7 +201,7 @@ function EID:IsAltChoise(pickup) local ecolor = entitySprite:GetTexel(Vector(0,i),nullVector,1,1) if qcolor.Red ~= ecolor.Red or qcolor.Green ~= ecolor.Green or qcolor.Blue ~= ecolor.Blue then -- it is not same with question mark sprite - pickup:GetData()["EID_IsAltChoise"] = false + pickup:GetData()["EID_IsAltChoice"] = false return false end end @@ -212,13 +212,12 @@ function EID:IsAltChoise(pickup) local qcolor = questionMarkSprite:GetTexel(Vector(j,i),nullVector,1,1) local ecolor = entitySprite:GetTexel(Vector(j,i),nullVector,1,1) if qcolor.Red ~= ecolor.Red or qcolor.Green ~= ecolor.Green or qcolor.Blue ~= ecolor.Blue then - pickup:GetData()["EID_IsAltChoise"] = false + pickup:GetData()["EID_IsAltChoice"] = false return false end end end - print("calc") - pickup:GetData()["EID_IsAltChoise"] = true + pickup:GetData()["EID_IsAltChoice"] = true return true end @@ -659,7 +658,7 @@ local function onRender(t) elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then --Handle Collectibles if EID:getEntityData(closest, "EID_DontHide") ~= true then - if (EID:hasCurseBlind() and not closest:ToPickup().Touched and EID.Config["DisableOnCurse"]) or (EID.Config["DisableOnAltPath"] and not closest:ToPickup().Touched and EID:IsAltChoise(closest)) or (game.Challenge == Challenge.CHALLENGE_APRILS_FOOL and EID.Config["DisableOnAprilFoolsChallenge"]) then + if (EID:hasCurseBlind() and not closest:ToPickup().Touched and EID.Config["DisableOnCurse"]) or (EID.Config["DisableOnAltPath"] and not closest:ToPickup().Touched and EID:IsAltChoice(closest)) or (game.Challenge == Challenge.CHALLENGE_APRILS_FOOL and EID.Config["DisableOnAprilFoolsChallenge"]) then EID:renderQuestionMark() return end