Small code cleanup

This commit is contained in:
Wofsauge committed 2022-08-14 22:59:06 +02:00
1 parent 05933dbe82
commit c5809cf9e4
3 files changed
+5 -9

No files matched your search

+2 -2
View File
@@ -297,7 +297,7 @@ function EID:D1Prediction(rng)
fullID = "5." .. poss[sel].Variant
if poss[sel].Variant == 300 then
if specialCards[poss[sel].SubType] then
local objName = EID:getObjectName(5, poss[sel].Variant, poss[sel].SubType, poss[sel])
local objName = EID:getObjectName(5, poss[sel].Variant, poss[sel].SubType)
return "{{" .. variantToName[poss[sel].Variant] .. poss[sel].SubType .. "}} " .. objName
elseif EID.runeIDs[poss[sel].SubType] then
fullID = "5.301"
@@ -309,7 +309,7 @@ function EID:D1Prediction(rng)
if D1chests[poss[sel].Variant] then fullID = "5." .. poss[sel].Variant
-- display the item name for pills, cards, and trinkets in AB+
elseif poss[sel].Variant == 70 or poss[sel].Variant == 300 or poss[sel].Variant == 350 then
local objName = EID:getObjectName(5, poss[sel].Variant, poss[sel].SubType, poss[sel])
local objName = EID:getObjectName(5, poss[sel].Variant, poss[sel].SubType)
-- don't display the name of unidentified pills!
if poss[sel].Variant == 70 and not EID.Config["ShowUnidentifiedPillDescriptions"] and not game:GetItemPool():IsPillIdentified(poss[sel].SubType) then
objName = EID:getDescriptionEntry("unidentifiedPill")
+1 -1
View File
@@ -20,7 +20,7 @@ Controller.BUTTON_START = 15
local MCMLoaded, MCM = pcall(require, "scripts.modconfig")
EID.MCMCompat_isDisplayingEIDTab = ""
local MCMCompat_isDisplayingDummyMCMObj = false
local MCMCompat_oldPermanentObj = false
local MCMCompat_oldPermanentObj = nil
EID.MCMLoaded = MCMLoaded
local colorNameArray = {}
EID.MCM_OptionChanged = false
+2 -6
View File
@@ -3,7 +3,7 @@ EID = RegisterMod("External Item Descriptions", 1)
EID.GameVersion = "ab+"
EID.Languages = {"en_us", "en_us_detailed", "fr", "pt", "pt_br", "ru", "spa", "it", "bul", "pl", "de", "tr_tr", "ko_kr", "zh_cn", "ja_jp", "cs_cz"}
EID.descriptions = {} -- Table that holds all translation strings
EID.enableDebug = false
EID.enableDebug = true
local game = Game()
require("eid_config")
@@ -517,7 +517,7 @@ function EID:printNewDescriptions()
EID.CachingDescription = true
resetDescCache()
for i,newDesc in ipairs(EID.descriptionsToPrint) do
for _,newDesc in ipairs(EID.descriptionsToPrint) do
if newDesc.Description == "UnidentifiedPill" then
if EID:renderUnidentifiedPill(newDesc.Entity) ~= false then
table.insert(EID.previousDescs, newDesc)
@@ -1493,10 +1493,6 @@ local function onRender(t)
elseif closest.Variant == PickupVariant.PICKUP_PILL then
--Handle Pills
if not EID.Config["DisplayObstructedPillInfo"] and closest.FrameCount < 3 then
-- small delay when having obstruction enabled & entering the room to prevent spoilers
--return
end
if EID:getEntityData(closest, "EID_DontHide") ~= true then
local hideinShop = closest:ToPickup():IsShopItem() and not EID.Config["DisplayPillInfoShop"]
local isOptionsSpawn = REPENTANCE and not EID.Config["DisplayPillInfoOptions?"] and closest:ToPickup().OptionsPickupIndex > 0