Small code cleanup
This commit is contained in:
1 parent
05933dbe82
commit
c5809cf9e4
3 files changed
+5
-9
No files matched your search
@@ -297,7 +297,7 @@ function EID:D1Prediction(rng)
|
|||||||
fullID = "5." .. poss[sel].Variant
|
fullID = "5." .. poss[sel].Variant
|
||||||
if poss[sel].Variant == 300 then
|
if poss[sel].Variant == 300 then
|
||||||
if specialCards[poss[sel].SubType] 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
|
return "{{" .. variantToName[poss[sel].Variant] .. poss[sel].SubType .. "}} " .. objName
|
||||||
elseif EID.runeIDs[poss[sel].SubType] then
|
elseif EID.runeIDs[poss[sel].SubType] then
|
||||||
fullID = "5.301"
|
fullID = "5.301"
|
||||||
@@ -309,7 +309,7 @@ function EID:D1Prediction(rng)
|
|||||||
if D1chests[poss[sel].Variant] then fullID = "5." .. poss[sel].Variant
|
if D1chests[poss[sel].Variant] then fullID = "5." .. poss[sel].Variant
|
||||||
-- display the item name for pills, cards, and trinkets in AB+
|
-- 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
|
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!
|
-- 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
|
if poss[sel].Variant == 70 and not EID.Config["ShowUnidentifiedPillDescriptions"] and not game:GetItemPool():IsPillIdentified(poss[sel].SubType) then
|
||||||
objName = EID:getDescriptionEntry("unidentifiedPill")
|
objName = EID:getDescriptionEntry("unidentifiedPill")
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ Controller.BUTTON_START = 15
|
|||||||
local MCMLoaded, MCM = pcall(require, "scripts.modconfig")
|
local MCMLoaded, MCM = pcall(require, "scripts.modconfig")
|
||||||
EID.MCMCompat_isDisplayingEIDTab = ""
|
EID.MCMCompat_isDisplayingEIDTab = ""
|
||||||
local MCMCompat_isDisplayingDummyMCMObj = false
|
local MCMCompat_isDisplayingDummyMCMObj = false
|
||||||
local MCMCompat_oldPermanentObj = false
|
local MCMCompat_oldPermanentObj = nil
|
||||||
EID.MCMLoaded = MCMLoaded
|
EID.MCMLoaded = MCMLoaded
|
||||||
local colorNameArray = {}
|
local colorNameArray = {}
|
||||||
EID.MCM_OptionChanged = false
|
EID.MCM_OptionChanged = false
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ EID = RegisterMod("External Item Descriptions", 1)
|
|||||||
EID.GameVersion = "ab+"
|
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.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.descriptions = {} -- Table that holds all translation strings
|
||||||
EID.enableDebug = false
|
EID.enableDebug = true
|
||||||
local game = Game()
|
local game = Game()
|
||||||
|
|
||||||
require("eid_config")
|
require("eid_config")
|
||||||
@@ -517,7 +517,7 @@ function EID:printNewDescriptions()
|
|||||||
EID.CachingDescription = true
|
EID.CachingDescription = true
|
||||||
resetDescCache()
|
resetDescCache()
|
||||||
|
|
||||||
for i,newDesc in ipairs(EID.descriptionsToPrint) do
|
for _,newDesc in ipairs(EID.descriptionsToPrint) do
|
||||||
if newDesc.Description == "UnidentifiedPill" then
|
if newDesc.Description == "UnidentifiedPill" then
|
||||||
if EID:renderUnidentifiedPill(newDesc.Entity) ~= false then
|
if EID:renderUnidentifiedPill(newDesc.Entity) ~= false then
|
||||||
table.insert(EID.previousDescs, newDesc)
|
table.insert(EID.previousDescs, newDesc)
|
||||||
@@ -1493,10 +1493,6 @@ local function onRender(t)
|
|||||||
|
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_PILL then
|
elseif closest.Variant == PickupVariant.PICKUP_PILL then
|
||||||
--Handle Pills
|
--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
|
if EID:getEntityData(closest, "EID_DontHide") ~= true then
|
||||||
local hideinShop = closest:ToPickup():IsShopItem() and not EID.Config["DisplayPillInfoShop"]
|
local hideinShop = closest:ToPickup():IsShopItem() and not EID.Config["DisplayPillInfoShop"]
|
||||||
local isOptionsSpawn = REPENTANCE and not EID.Config["DisplayPillInfoOptions?"] and closest:ToPickup().OptionsPickupIndex > 0
|
local isOptionsSpawn = REPENTANCE and not EID.Config["DisplayPillInfoOptions?"] and closest:ToPickup().OptionsPickupIndex > 0
|
||||||
|
|||||||
Reference in new issue
Block a user