Merge remote-tracking branch 'upstream/master'

This commit is contained in:
kittenchilly committed 2021-10-31 15:21:28 -05:00
commit 09f008f81f
4 files changed
+83 -45

No files matched your search

+4
View File
@@ -62,6 +62,9 @@ EID.UserConfig = {
-- Toggle obstruction based hiding, when the player has flight
-- Default = true
["DisableObstructionOnFlight"] = true,
-- If set to true, the mod will no longer check if the save game has achievements unlocked
-- Default = false
["DisableAchievementCheck"] = false,
-------------CURSE-------------
@@ -262,6 +265,7 @@ EID.DefaultConfig = {
["InitiallyHidden"] = false,
["HideInBattle"] = false,
["DisableObstructionOnFlight"] = true,
["DisableAchievementCheck"] = false,
["DisableOnCurse"] = true,
["DisableOnAltPath"] = true,
["DisableOnAprilFoolsChallenge"] = true,
+43 -32
View File
@@ -9,7 +9,7 @@ local game = Game()
require("eid_config")
EID.Config = EID.UserConfig
EID.Config.Version = "3.2"
EID.ModVersion = "3.85"
EID.ModVersion = "3.87"
EID.DefaultConfig.Version = EID.Config.Version
EID.isHidden = false
EID.player = nil
@@ -404,6 +404,9 @@ function EID:renderIndicator(entity)
end
local repDiv = 1
local entityPos = Isaac.WorldToScreen(entity.Position)
if entity:GetData() and entity:GetData()["EID_RenderOffset"] then
entityPos = entityPos + entity:GetData()["EID_RenderOffset"]
end
local sprite = entity:GetSprite()
if REPENTANCE then
repDiv = 255
@@ -416,25 +419,8 @@ function EID:renderIndicator(entity)
if EID.Config["Indicator"] == "blink" then
local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40))
sprite.Color = Color(1, 1, 1, 1, c/repDiv, c/repDiv, c/repDiv)
sprite:Render(entityPos, nullVector, nullVector)
EID:renderEntity(entity, sprite, entityPos)
sprite.Color = Color(1, 1, 1, 1, 0, 0, 0)
elseif 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)
sprite:Render(entityPos + Vector(0, 1), nullVector, nullVector)
sprite:Render(entityPos + Vector(0, -1), nullVector, nullVector)
sprite:Render(entityPos + Vector(1, 0), nullVector, nullVector)
sprite:Render(entityPos + Vector(-1, 0), nullVector, nullVector)
sprite.Color = Color(1, 1, 1, 1, 0, 0, 0)
sprite:Render(entityPos, nullVector, nullVector)
elseif EID.Config["Indicator"] == "highlight" then
sprite.Color = Color(1, 1, 1, 1, 255/repDiv, 255/repDiv, 255/repDiv)
sprite:Render(entityPos + Vector(0, 1), nullVector, nullVector)
sprite:Render(entityPos + Vector(0, -1), nullVector, nullVector)
sprite:Render(entityPos + Vector(1, 0), nullVector, nullVector)
sprite:Render(entityPos + Vector(-1, 0), nullVector, nullVector)
sprite.Color = Color(1, 1, 1, 1, 0, 0, 0)
sprite:Render(entityPos, nullVector, nullVector)
elseif EID.Config["Indicator"] == "arrow" then
ArrowSprite:Update()
local ArrowOffset = Vector(0, -35)
@@ -442,6 +428,19 @@ function EID:renderIndicator(entity)
ArrowOffset = Vector(0, -62)
end
ArrowSprite:Render(Isaac.WorldToScreen(entity.Position + ArrowOffset), nullVector, nullVector)
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
if REPENTANCE then
if isMirrorRoom then
@@ -450,6 +449,15 @@ function EID:renderIndicator(entity)
end
end
function EID:renderEntity(entity, sprite, position)
if entity.Type == 5 and entity.Variant == 100 then
sprite:RenderLayer(1, position, nullVector, nullVector)
else
sprite:Render(position, nullVector, nullVector)
end
end
function EID:renderHUDLocationIndicators()
local mousePos = Isaac.WorldToRenderPosition(Input.GetMousePosition(true)) * 2
Isaac.RenderScaledText("Mouse pos X:"..mousePos.X.." Y:"..mousePos.Y, 100, 10, 0.5, 0.5, 1 ,1 ,1 ,1 )
@@ -497,6 +505,20 @@ EID.hasValidWalkingpath = true
function EID:onGameUpdate()
EID.player = Isaac.GetPlayer(0)
--Fix Overlapping Pedestals
local curPositions = {}
for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do
local pos = entity.Position
for _, otherPos in ipairs(curPositions) do
if pos:Distance(otherPos[2]) == 0 then
entity.Position = entity.Position + Vector(1,0)
entity:GetData()["EID_RenderOffset"] = Vector(10,0)
otherPos[1]:GetData()["EID_RenderOffset"] = Vector(-10,0)
end
end
table.insert(curPositions, {entity, entity.Position})
end
if not EID.Config["DisplayObstructedCardInfo"] or not EID.Config["DisplayObstructedPillInfo"] or not EID.Config["DisplayObstructedSoulstoneInfo"] then
if EID.lastDescriptionEntity == nil or (EID.Config["DisableObstructionOnFlight"] and EID.player.CanFly) then
if EID.pathCheckerEntity ~= nil then
@@ -520,24 +542,12 @@ function EID:onGameUpdate()
end
end
--Fix Overlapping Pedestals
local curPositions = {}
for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do
local pos = entity.Position
for _, otherPos in ipairs(curPositions) do
if pos:Distance(otherPos) == 0 then
entity.Position = entity.Position + Vector(1,0)
break
end
end
table.insert(curPositions, entity.Position)
end
end
EID:AddCallback(ModCallbacks.MC_POST_UPDATE, EID.onGameUpdate)
local hasShownAchievementWarning = false
local function renderAchievementInfo()
if REPENTANCE and game:GetFrameCount() < 10*30 then
if REPENTANCE and not EID.Config.DisableAchievementCheck and game:GetFrameCount() < 10*30 and game.Challenge == 0 then
local hasBookOfRevelationsUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS)
if not hasBookOfRevelationsUnlocked then
local hasCubeOfMeatUnlocked = EID:isCollectibleUnlockedAnyPool(CollectibleType.COLLECTIBLE_CUBE_OF_MEAT)
@@ -812,6 +822,7 @@ if EID.MCMLoaded or REPENTANCE then
EID.SaveData(EID, json.encode(EID.Config))
EID:hidePermanentText()
EID.itemUnlockStates[CollectibleType.COLLECTIBLE_CUBE_OF_MEAT] = nil
EID.itemUnlockStates[CollectibleType.COLLECTIBLE_BOOK_OF_REVELATIONS or CollectibleType.COLLECTIBLE_BOOK_REVELATIONS] = nil
end
EID:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, SaveGame)
end
+13 -13
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<name>!!~External item descriptions</name>
<directory>external item descriptions</directory>
<id>836319872</id>
<description>[img]https://i.imgur.com/l9nbaxP.png[/img]
<name>!!~External item descriptions</name>
<directory>external item descriptions</directory>
<id>836319872</id>
<description>[img]https://i.imgur.com/l9nbaxP.png[/img]
This mod displays detailed information about all items, trinkets, cards, runes and pills DIRECTLY onto your screen. Say goodbye to your browsertab with platinumgod open ;)
@@ -90,13 +90,13 @@ https://moddingofisaac.com/mod/1079/external-item-descriptions
- Jake for the sweet [b]German[/b] language pack
- [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities
</description>
<version>3.85</version>
<visibility>Public</visibility>
<tag id="Lua"/>
<tag id="Items"/>
<tag id="Active Items"/>
<tag id="Trinkets"/>
<tag id="Pills"/>
<tag id="Cards"/>
<tag id="Tweaks"/>
<version>3.87</version>
<visibility>Public</visibility>
<tag id="Lua"/>
<tag id="Items"/>
<tag id="Active Items"/>
<tag id="Trinkets"/>
<tag id="Pills"/>
<tag id="Cards"/>
<tag id="Tweaks"/>
</metadata>
+23
View File
@@ -354,6 +354,29 @@ if MCMLoaded then
Info = {"Distance to the object until descriptions are displayed."}
}
)
-- disable achievements
MCM.AddSetting(
"EID",
"General",
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function()
return EID.Config["DisableAchievementCheck"]
end,
Display = function()
local onOff = "Enabled"
if EID.Config["DisableAchievementCheck"] then
onOff = "Disabled"
end
return "Achievement warning: " .. onOff
end,
OnChange = function(currentBool)
EID.Config["DisableAchievementCheck"] = currentBool
end,
Info = {"Use this to turn off the achievement warning"}
}
)
---------------------------------------------------------------------------
---------------------------------Display-----------------------------------