Card Reading Portal support
This commit is contained in:
1 parent
38473053c7
commit
f6f476ca82
1 file changed
+28
-15
@@ -706,27 +706,31 @@ function EID:renderIndicator(entity)
|
|||||||
sprite.FlipX = true
|
sprite.FlipX = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if EID.Config["Indicator"] == "blink" then
|
|
||||||
local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40))
|
-- Don't apply sprite.Color changes to Effects (Dice Floors, Card Reading Portals), use Arrow instead
|
||||||
sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv)
|
if EID.Config["Indicator"] == "arrow" or entity.Type == 1000 then
|
||||||
EID:renderEntity(entity, sprite, entityPos)
|
|
||||||
sprite.Color = Color(1, 1, 1, 1, 0, 0, 0)
|
|
||||||
elseif EID.Config["Indicator"] == "arrow" then
|
|
||||||
ArrowSprite:Update()
|
ArrowSprite:Update()
|
||||||
ArrowSprite:Render(arrowPos, nullVector, nullVector)
|
ArrowSprite:Render(arrowPos, nullVector, nullVector)
|
||||||
else
|
else
|
||||||
if EID.Config["Indicator"] == "border" then
|
if EID.Config["Indicator"] == "blink" then
|
||||||
local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40))
|
local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40))
|
||||||
sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv)
|
sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv)
|
||||||
elseif EID.Config["Indicator"] == "highlight" then
|
EID:renderEntity(entity, sprite, entityPos)
|
||||||
sprite.Color = Color(1, 1, 1, 1, 255/repDiv, 255/repDiv, 255/repDiv)
|
sprite.Color = Color(1, 1, 1, 1, 0, 0, 0)
|
||||||
|
else
|
||||||
|
if EID.Config["Indicator"] == "border" then
|
||||||
|
local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40))
|
||||||
|
sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv)
|
||||||
|
elseif EID.Config["Indicator"] == "highlight" then
|
||||||
|
sprite.Color = Color(1, 1, 1, 1, 255/repDiv, 255/repDiv, 255/repDiv)
|
||||||
|
end
|
||||||
|
EID:renderEntity(entity, sprite, entityPos + Vector(0, 1))
|
||||||
|
EID:renderEntity(entity, sprite, entityPos + Vector(0, -1))
|
||||||
|
EID:renderEntity(entity, sprite, entityPos + Vector(1, 0))
|
||||||
|
EID:renderEntity(entity, sprite, entityPos + Vector(-1, 0))
|
||||||
|
sprite.Color = Color(1, 1, 1, 1, 0, 0, 0)
|
||||||
|
EID:renderEntity(entity, sprite, entityPos)
|
||||||
end
|
end
|
||||||
EID:renderEntity(entity, sprite, entityPos + Vector(0, 1))
|
|
||||||
EID:renderEntity(entity, sprite, entityPos + Vector(0, -1))
|
|
||||||
EID:renderEntity(entity, sprite, entityPos + Vector(1, 0))
|
|
||||||
EID:renderEntity(entity, sprite, entityPos + Vector(-1, 0))
|
|
||||||
sprite.Color = Color(1, 1, 1, 1, 0, 0, 0)
|
|
||||||
EID:renderEntity(entity, sprite, entityPos)
|
|
||||||
end
|
end
|
||||||
if isMirrorRoom then
|
if isMirrorRoom then
|
||||||
sprite.FlipX = false
|
sprite.FlipX = false
|
||||||
@@ -1132,6 +1136,15 @@ local function onRender(t)
|
|||||||
elseif closest.Type == 1000 and closest.Variant == 76 then
|
elseif closest.Type == 1000 and closest.Variant == 76 then
|
||||||
EID:printDescription(EID:getDescriptionObj(closest.Type, closest.Variant, closest.SubType+1, closest))
|
EID:printDescription(EID:getDescriptionObj(closest.Type, closest.Variant, closest.SubType+1, closest))
|
||||||
return
|
return
|
||||||
|
-- Handle Card Reading Portals
|
||||||
|
elseif closest.Type == 1000 and closest.Variant == 161 and closest.SubType <= 2 then
|
||||||
|
local subtypeToCard = {18, 5, 19}
|
||||||
|
-- Reuse the descriptions of The Emperor/Stars/Moon, so no localization needed
|
||||||
|
local descriptionObj = EID:getDescriptionObj(5, 300, subtypeToCard[closest.SubType+1], closest)
|
||||||
|
-- Card Reading's name
|
||||||
|
descriptionObj.Name = EID:getObjectName(5, 100, 660)
|
||||||
|
EID:printDescription(descriptionObj)
|
||||||
|
return
|
||||||
-- 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)] then
|
if EID.CraneItemType[tostring(closest.InitSeed)] then
|
||||||
|
|||||||
Reference in new issue
Block a user