From 86cb44d1224b275d6723f1654020d45cbb3963c8 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sun, 25 Oct 2020 19:08:51 +0100 Subject: [PATCH] Removed "printTrinketDescription" function --- eid_debugging.lua | 2 +- main.lua | 53 ++++++++--------------------------------------- 2 files changed, 10 insertions(+), 45 deletions(-) diff --git a/eid_debugging.lua b/eid_debugging.lua index 326388bb..7bd3bd60 100644 --- a/eid_debugging.lua +++ b/eid_debugging.lua @@ -24,7 +24,7 @@ local charsToDebug = { __eidItemDescriptions[1] = "\1 Overriden description" -- 5.100.1 = Sad Onion __eidTrinketDescriptions[1] = "\2 Overriden " -- 5.350.1 = swallowed penny __eidCardDescriptions[1] = "Overriden Card description" -- 5.300.1 = the fool -__eidPillDescriptions[1] = "Test" -- Doesnt seem to work +__eidPillDescriptions[21] = "Test" -- Pill Effect 20 = Hematemesis -- Legacy add Description __eidItemTransformations[1] = "Test Transformation" diff --git a/main.lua b/main.lua index 82f78832..5aa3cd11 100644 --- a/main.lua +++ b/main.lua @@ -167,23 +167,6 @@ function printDescription(desc) printBulletPoints(desc.Description, padding) end -function printTrinketDescription(desc) - local padding = posY() - --Display Itemname - if EIDConfig["ShowItemName"] then - - EID:renderString( - desc.Name, - Vector(EIDConfig["XPosition"], padding - 4), - Vector(EIDConfig["Scale"], EIDConfig["Scale"]), - EID:getNameColor() - ) - - padding = padding + lineHeight * EIDConfig["Scale"] - end - printBulletPoints(desc.Description, padding) -end - function printBulletPoints(description, padding) local textboxWidth = tonumber(EIDConfig["TextboxWidth"]) * 4 description = EID:replaceShortMarkupStrings(description) @@ -311,12 +294,12 @@ local function onRender(t) if dist / 40 > tonumber(EIDConfig["MaxDistance"]) or not closest.Type == EntityType.ENTITY_PICKUP then if Game():GetRoom():GetType() == RoomType.ROOM_SACRIFICE and EIDConfig["DisplaySacrificeInfo"] then - printTrinketDescription(EID:getDescriptionObj("sacrifice", EID.sacrificeCounter), "sacrifice") + printDescription(EID:getDescriptionObj("sacrifice", EID.sacrificeCounter)) end if Game():GetRoom():GetType() == RoomType.ROOM_DICE and EIDConfig["DisplayDiceInfo"] and type(closestDice) ~= type(nil) then - printTrinketDescription(EID:getDescriptionObj("dice", closestDice.SubType + 1), "dice") + printDescription(EID:getDescriptionObj("dice", closestDice.SubType + 1)) renderIndicator(closestDice) end return @@ -332,29 +315,22 @@ local function onRender(t) renderIndicator(closest) --Handle Entities (specific) - if EIDConfig["EnableEntityDescriptions"] and type(closest:GetData()["EID_Description"]) ~= type(nil) then +--[[ if EIDConfig["EnableEntityDescriptions"] and type(closest:GetData()["EID_Description"]) ~= type(nil) then printTrinketDescription({closest.Type, closest:GetData()["EID_Description"]}, "custom") return end --Handle Entities (omni) - if - EIDConfig["EnableEntityDescriptions"] and + if EIDConfig["EnableEntityDescriptions"] and __eidEntityDescriptions[closest.Type .. "." .. closest.Variant .. "." .. closest.SubType] ~= nil then - printTrinketDescription( - { - closest.Type, - EID:getModDescription(__eidEntityDescriptions, closest.Type .. "." .. closest.Variant .. "." .. closest.SubType) - }, - "custom" - ) + printDescription(EID:getDescriptionObj("custom", closest.Type .. "." .. closest.Variant .. "." .. closest.SubType)) return - end + end]]-- --Handle Trinkets if closest.Variant == PickupVariant.PICKUP_TRINKET then - printTrinketDescription(EID:getDescriptionObj("trinkets",closest.SubType)) + printDescription(EID:getDescriptionObj("trinkets",closest.SubType)) --Handle Collectibles elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then if EID:hasCurseBlind() and EIDConfig["DisableOnCurse"] then @@ -368,7 +344,7 @@ local function onRender(t) renderQuestionMark() return end - printTrinketDescription(EID:getDescriptionObj("cards", closest.SubType), "cards") + printDescription(EID:getDescriptionObj("cards", closest.SubType)) if closest.SubType <= 54 then CardSprite:Play(tostring(closest.SubType)) CardSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"]) @@ -395,18 +371,7 @@ local function onRender(t) local pillEffect = pool:GetPillEffect(pillColor) local identified = pool:IsPillIdentified(pillColor) if (identified or EIDConfig["ShowUnidentifiedPillDescriptions"]) then - if EID:getModDescription(__eidPillDescriptions, pillEffect) then - printTrinketDescription({pillEffect, EID:getModDescription(__eidPillDescriptions, pillEffect)}, "pills") - elseif pillEffect < 47 then - printTrinketDescription(EID:getDescriptionObj("pills", pillEffect + 1), "pills") - else - EID:renderString( - EIDConfig["ErrorMessage"], - Vector(EIDConfig["XPosition"], posY()), - Vector(EIDConfig["Scale"], EIDConfig["Scale"]), - EID:getErrorColor() - ) - end + printDescription(EID:getDescriptionObj("pills", pillEffect + 1)) else EID:renderString( EID:getDescriptionTable("unidentifiedPill"),