Fixed indicators for Crane Game descriptions

This commit is contained in:
Wofsauge committed 2021-12-16 22:12:29 +01:00
1 parent c0121ce90f
commit ceb1837550
1 file changed
+14 -6
+14 -6
View File
@@ -413,8 +413,12 @@ function EID:renderIndicator(entity)
entityPos = entityPos + entity:GetData()["EID_RenderOffset"] entityPos = entityPos + entity:GetData()["EID_RenderOffset"]
end end
-- Move highlights a bit to fit onto the alt Item layout of Flip / Tainted Laz -- Move highlights a bit to fit onto the alt Item layout of Flip / Tainted Laz
if REPENTANCE and entity.Variant == 100 and EID.player:HasCollectible(CollectibleType.COLLECTIBLE_FLIP) then if REPENTANCE then
entityPos = entityPos + Vector(2.5,2.5) if entity.Variant == 100 and EID.player:HasCollectible(CollectibleType.COLLECTIBLE_FLIP) then
entityPos = entityPos + Vector(2.5,2.5)
elseif entity.Type == 6 and entity.Variant == 16 then
entityPos = entityPos + Vector(0,-5)
end
end end
local sprite = entity:GetSprite() local sprite = entity:GetSprite()
if REPENTANCE then if REPENTANCE then
@@ -488,6 +492,8 @@ end
function EID:renderEntity(entity, sprite, position) function EID:renderEntity(entity, sprite, position)
if entity.Type == 5 and entity.Variant == 100 then if entity.Type == 5 and entity.Variant == 100 then
sprite:RenderLayer(1, position, nullVector, nullVector) sprite:RenderLayer(1, position, nullVector, nullVector)
elseif entity.Type == 6 and entity.Variant == 16 then -- Crane Game
sprite:RenderLayer(2, position, nullVector, nullVector)
else else
sprite:Render(position, nullVector, nullVector) sprite:Render(position, nullVector, nullVector)
end end
@@ -575,10 +581,12 @@ function EID:onGameUpdate()
table.insert(curPositions, {entity, entity.Position}) table.insert(curPositions, {entity, entity.Position})
end end
for _, crane in ipairs(Isaac.FindByType(6, 16, -1, true, false)) do if REPENTANCE and EID.CraneItemType ~= nil then
if EID.CraneItemType[tostring(crane.InitSeed)] then for _, crane in ipairs(Isaac.FindByType(6, 16, -1, true, false)) do
if crane:GetSprite():IsPlaying("Prize") then if EID.CraneItemType[tostring(crane.InitSeed)] then
EID.CraneItemType[tostring(crane.InitSeed)] = nil if crane:GetSprite():IsPlaying("Prize") then
EID.CraneItemType[tostring(crane.InitSeed)] = nil
end
end end
end end
end end