Fixed spelling error in IsAltChoice function
This commit is contained in:
1 parent
1e356a7cd3
commit
beb4cad9f6
1 file changed
+9
-10
@@ -172,16 +172,16 @@ questionMarkSprite:Load("gfx/005.100_collectible.anm2",true)
|
|||||||
questionMarkSprite:ReplaceSpritesheet(1,"gfx/items/collectibles/questionmark.png")
|
questionMarkSprite:ReplaceSpritesheet(1,"gfx/items/collectibles/questionmark.png")
|
||||||
questionMarkSprite:LoadGraphics()
|
questionMarkSprite:LoadGraphics()
|
||||||
|
|
||||||
function EID:IsAltChoise(pickup)
|
function EID:IsAltChoice(pickup)
|
||||||
if pickup:GetData() == nil then
|
if pickup:GetData() == nil then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if EID:getEntityData(pickup, "EID_IsAltChoise") ~= nil then
|
if EID:getEntityData(pickup, "EID_IsAltChoice") ~= nil then
|
||||||
return EID:getEntityData(pickup, "EID_IsAltChoise")
|
return EID:getEntityData(pickup, "EID_IsAltChoice")
|
||||||
end
|
end
|
||||||
|
|
||||||
if not REPENTANCE or game:GetLevel():GetStageType() < 4 or game:GetRoom():GetType() ~= RoomType.ROOM_TREASURE then
|
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
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ function EID:IsAltChoise(pickup)
|
|||||||
|
|
||||||
if name ~= "Idle" and name ~= "ShopIdle" then
|
if name ~= "Idle" and name ~= "ShopIdle" then
|
||||||
-- Collectible can be ignored. its definetly not hidden
|
-- Collectible can be ignored. its definetly not hidden
|
||||||
pickup:GetData()["EID_IsAltChoise"] = false
|
pickup:GetData()["EID_IsAltChoice"] = false
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ function EID:IsAltChoise(pickup)
|
|||||||
local ecolor = entitySprite:GetTexel(Vector(0,i),nullVector,1,1)
|
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
|
if qcolor.Red ~= ecolor.Red or qcolor.Green ~= ecolor.Green or qcolor.Blue ~= ecolor.Blue then
|
||||||
-- it is not same with question mark sprite
|
-- it is not same with question mark sprite
|
||||||
pickup:GetData()["EID_IsAltChoise"] = false
|
pickup:GetData()["EID_IsAltChoice"] = false
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -212,13 +212,12 @@ function EID:IsAltChoise(pickup)
|
|||||||
local qcolor = questionMarkSprite:GetTexel(Vector(j,i),nullVector,1,1)
|
local qcolor = questionMarkSprite:GetTexel(Vector(j,i),nullVector,1,1)
|
||||||
local ecolor = entitySprite: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
|
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
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print("calc")
|
pickup:GetData()["EID_IsAltChoice"] = true
|
||||||
pickup:GetData()["EID_IsAltChoise"] = true
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -659,7 +658,7 @@ local function onRender(t)
|
|||||||
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
--Handle Collectibles
|
--Handle Collectibles
|
||||||
if EID:getEntityData(closest, "EID_DontHide") ~= true then
|
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()
|
EID:renderQuestionMark()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user