From 17f73f4bf2245171b4dd232d1b62312ecd19bfbf Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Fri, 12 Nov 2021 00:51:59 +0100 Subject: [PATCH] Temporarily fixed item names using the variable name as their name, instead of the localization --- eid_api.lua | 12 ++++++++---- main.lua | 5 +++-- metadata.xml | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/eid_api.lua b/eid_api.lua index a404af64..d234d176 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -436,14 +436,18 @@ function EID:getObjectName(Type, Variant, SubType) end end if tableName == "collectibles" then - return name or EID.itemConfig:GetCollectible(SubType).Name + local vanillaName = EID.itemConfig:GetCollectible(SubType).Name + return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName elseif tableName == "trinkets" then - return name or EID.itemConfig:GetTrinket(SubType).Name + local vanillaName = EID.itemConfig:GetTrinket(SubType).Name + return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName elseif tableName == "cards" then - return name or EID.itemConfig:GetCard(SubType).Name + local vanillaName = EID.itemConfig:GetCard(SubType).Name + return name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName elseif tableName == "pills" or tableName == "horsepills" then local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType) - name = name or EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name + local vanillaName = EID.itemConfig:GetPillEffect(adjustedSubtype - 1).Name + name = name or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en_us"][tableName][SubType][2] or vanillaName return string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger elseif tableName == "sacrifice" then return EID:getDescriptionEntry("sacrificeHeader") diff --git a/main.lua b/main.lua index 86cba044..026f8366 100644 --- a/main.lua +++ b/main.lua @@ -9,7 +9,7 @@ local game = Game() require("eid_config") EID.Config = EID.UserConfig EID.Config.Version = "3.2" -EID.ModVersion = "3.89" +EID.ModVersion = "3.90" EID.DefaultConfig.Version = EID.Config.Version EID.isHidden = false EID.player = nil @@ -591,6 +591,8 @@ local searchPartitions = EntityPartition.FAMILIAR + EntityPartition.ENEMY + Enti local function onRender(t) EID.isDisplaying = false + EID:setPlayer() + if Input.IsButtonTriggered(EID.Config["HideKey"], EID.player.ControllerIndex or 0) then EID.isHidden = not EID.isHidden end @@ -602,7 +604,6 @@ local function onRender(t) -- Disabling Achievement detection for now, since it breaks on some occasions since new patch --renderAchievementInfo() - EID:setPlayer() if EID.GameVersion == "ab+" then if EID.player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then EID:addTextPosModifier("Schoolbag", Vector(0,30)) diff --git a/metadata.xml b/metadata.xml index 54714b1f..02a31ce8 100644 --- a/metadata.xml +++ b/metadata.xml @@ -90,7 +90,7 @@ 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 - 3.89 + 3.90 Public