Fixed some minor bugs
This commit is contained in:
1 parent
931d505bc9
commit
e565ab65a9
5 files changed
+824
-812
No files matched your search
+779
-781
File diff suppressed because it is too large.
Load diff
+19
-5
@@ -205,7 +205,7 @@ end
|
|||||||
|
|
||||||
-- Returns if EID is displaying text right now
|
-- Returns if EID is displaying text right now
|
||||||
function EID:isDisplayingText()
|
function EID:isDisplayingText()
|
||||||
return EID.isDisplayingText
|
return EID.isDisplaying
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns true, if curse of blind is active
|
-- Returns true, if curse of blind is active
|
||||||
@@ -261,7 +261,7 @@ function EID:getDescriptionObj(Type, Variant, SubType)
|
|||||||
description.Name = EID:getObjectName(Type, Variant, description.ID)
|
description.Name = EID:getObjectName(Type, Variant, description.ID)
|
||||||
|
|
||||||
local tableEntry = EID:getDescriptionData(Type, Variant, description.ID)
|
local tableEntry = EID:getDescriptionData(Type, Variant, description.ID)
|
||||||
description.Description =tableEntry and tableEntry[3] or "MISSING DESCRIPTION"
|
description.Description =tableEntry and tableEntry[3] or EID:getXMLDescription(Type, Variant, description.ID)
|
||||||
|
|
||||||
description.Transformation = EID:getTransformation(Type, Variant, description.ID)
|
description.Transformation = EID:getTransformation(Type, Variant, description.ID)
|
||||||
|
|
||||||
@@ -353,11 +353,12 @@ end
|
|||||||
-- tries to get the ingame name of an item based on its ID
|
-- tries to get the ingame name of an item based on its ID
|
||||||
function EID:getObjectName(Type, Variant, SubType)
|
function EID:getObjectName(Type, Variant, SubType)
|
||||||
local tableEntry = EID:getDescriptionData(Type, Variant, SubType)
|
local tableEntry = EID:getDescriptionData(Type, Variant, SubType)
|
||||||
if tableEntry == nil then return Type.."."..Variant.."."..SubType end
|
|
||||||
local tableName = EID:getTableName(Type, Variant)
|
local tableName = EID:getTableName(Type, Variant)
|
||||||
local name = nil
|
local name = nil
|
||||||
if tableEntry[2] ~= nil and tableEntry[2] ~= "" then
|
if tableEntry ~= nil then
|
||||||
name = tableEntry[2]
|
if tableEntry[2] ~= nil and tableEntry[2] ~= "" then
|
||||||
|
name = tableEntry[2]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if tableName == "collectibles" then
|
if tableName == "collectibles" then
|
||||||
return name or EID.itemConfig:GetCollectible(SubType).Name
|
return name or EID.itemConfig:GetCollectible(SubType).Name
|
||||||
@@ -378,6 +379,19 @@ function EID:getObjectName(Type, Variant, SubType)
|
|||||||
return Type.."."..Variant.."."..SubType
|
return Type.."."..Variant.."."..SubType
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- tries to get the ingame description of an object, based on their description in the XML files
|
||||||
|
function EID:getXMLDescription(Type, Variant, SubType)
|
||||||
|
local tableName = EID:getTableName(Type, Variant)
|
||||||
|
local desc= nil
|
||||||
|
if tableName == "collectibles" then
|
||||||
|
desc = EID.itemConfig:GetCollectible(SubType).Description
|
||||||
|
elseif tableName == "trinkets" then
|
||||||
|
desc = EID.itemConfig:GetTrinket(SubType).Description
|
||||||
|
elseif tableName == "cards" then
|
||||||
|
desc = EID.itemConfig:GetCard(SubType).Description
|
||||||
|
end
|
||||||
|
return desc or "(No Description available)"
|
||||||
|
end
|
||||||
-- check if an entity is part of the describable entities
|
-- check if an entity is part of the describable entities
|
||||||
function EID:hasDescription(entity)
|
function EID:hasDescription(entity)
|
||||||
local isAllowed = false
|
local isAllowed = false
|
||||||
|
|||||||
+20
-20
@@ -100,29 +100,29 @@ EID:addColor("ColorBlackBlink", nil, function(color)
|
|||||||
|
|
||||||
|
|
||||||
local function onDebugRender(t)
|
local function onDebugRender(t)
|
||||||
for i,v in ipairs(Isaac.FindByType(5,10,3,true,false)) do
|
for i,v in ipairs(Isaac.FindByType(5,10,3,true,false)) do
|
||||||
if v:GetData()["EID_Description"] == nil then
|
if v:GetData()["EID_Description"] == nil then
|
||||||
v:GetData()["EID_Description"] = "Test specific description#Init seed: ".. v.InitSeed
|
v:GetData()["EID_Description"] = "Test specific description#Init seed: ".. v.InitSeed
|
||||||
end
|
|
||||||
end
|
end
|
||||||
for i,v in ipairs(Isaac.FindByType(5,10,4,true,false)) do
|
end
|
||||||
if v:GetData()["EID_Description"] == nil then
|
for i,v in ipairs(Isaac.FindByType(5,10,4,true,false)) do
|
||||||
local descTable = {
|
if v:GetData()["EID_Description"] == nil then
|
||||||
["Name"] = "Some Item with seed ".. v.InitSeed ,
|
local descTable = {
|
||||||
["Description"] = "Test specific description#Init seed: ".. v.InitSeed,
|
["Name"] = "Some Item with seed ".. v.InitSeed ,
|
||||||
["Transformation"] = "1,2"
|
["Description"] = "Test specific description#Init seed: ".. v.InitSeed,
|
||||||
}
|
["Transformation"] = "1,2"
|
||||||
v:GetData()["EID_Description"] = descTable
|
}
|
||||||
end
|
v:GetData()["EID_Description"] = descTable
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for i, v in ipairs(charsToDebug) do
|
for i, v in ipairs(charsToDebug) do
|
||||||
local pos = EID.getTextPosition() + Vector(-5, - 15 + ((i - 1) * 14))
|
local pos = EID.getTextPosition() + Vector(-5, - 15 + ((i - 1) * 14))
|
||||||
EID:renderString(v, pos, Vector(EID.Config["Scale"], EID.Config["Scale"]), KColor(1, 1, 1, 1, 0, 0, 0))
|
EID:renderString(v, pos, Vector(EID.Config["Scale"], EID.Config["Scale"]), KColor(1, 1, 1, 1, 0, 0, 0))
|
||||||
|
|
||||||
if not showDebugChars then
|
if not showDebugChars then
|
||||||
break
|
break
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
EID:AddCallback(ModCallbacks.MC_POST_RENDER, onDebugRender)
|
EID:AddCallback(ModCallbacks.MC_POST_RENDER, onDebugRender)
|
||||||
@@ -13,7 +13,7 @@ EID.isHidden = EID.Config["Hidden"]
|
|||||||
-- general variables
|
-- general variables
|
||||||
EID.PositionModifiers = {}
|
EID.PositionModifiers = {}
|
||||||
EID.UsedPosition = Vector(EID.Config["XPosition"], EID.Config["YPosition"])
|
EID.UsedPosition = Vector(EID.Config["XPosition"], EID.Config["YPosition"])
|
||||||
EID.isDisplayingText = false
|
EID.isDisplaying = false
|
||||||
EID.isDisplayingPermanent = false
|
EID.isDisplayingPermanent = false
|
||||||
EID.permanentDisplayTextObj = nil
|
EID.permanentDisplayTextObj = nil
|
||||||
EID.lastDescriptionEntity = nil
|
EID.lastDescriptionEntity = nil
|
||||||
@@ -285,7 +285,7 @@ end
|
|||||||
---------------------------On Render Function------------------------------
|
---------------------------On Render Function------------------------------
|
||||||
|
|
||||||
local function onRender(t)
|
local function onRender(t)
|
||||||
EID.isDisplayingText = false
|
EID.isDisplaying = false
|
||||||
if Input.IsButtonTriggered(EID.Config["HideKey"], 0) then
|
if Input.IsButtonTriggered(EID.Config["HideKey"], 0) then
|
||||||
EID.isHidden = not EID.isHidden
|
EID.isHidden = not EID.isHidden
|
||||||
end
|
end
|
||||||
@@ -308,7 +308,7 @@ local function onRender(t)
|
|||||||
|
|
||||||
if EID.isDisplayingPermanent and EID.permanentDisplayTextObj ~= nil then
|
if EID.isDisplayingPermanent and EID.permanentDisplayTextObj ~= nil then
|
||||||
EID:printDescription(EID.permanentDisplayTextObj)
|
EID:printDescription(EID.permanentDisplayTextObj)
|
||||||
EID.isDisplayingText = true
|
EID.isDisplaying = true
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ local function onRender(t)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
EID.lastDescriptionEntity = closest
|
EID.lastDescriptionEntity = closest
|
||||||
EID.isDisplayingText = true
|
EID.isDisplaying = true
|
||||||
|
|
||||||
--Handle Indicators
|
--Handle Indicators
|
||||||
EID:renderIndicator(closest)
|
EID:renderIndicator(closest)
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<metadata>
|
<metadata>
|
||||||
<name>!!External item descriptions</name>
|
<name>!!~External item descriptions</name>
|
||||||
<directory>external item descriptions</directory>
|
<directory>external item descriptions</directory>
|
||||||
<id>836319872</id>
|
<id>836319872</id>
|
||||||
<description>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 ;)
|
<description>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 ;)
|
||||||
@@ -76,7 +76,7 @@ https://moddingofisaac.com/mod/1079/external-item-descriptions
|
|||||||
- [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities
|
- [url=https://steamcommunity.com/id/whytefang/]adc[/url] for creating an awesome new Languagepack and providing ideas for new functionalities
|
||||||
|
|
||||||
[img]https://i.imgur.com/P6a8043.png[/img] [url=https://github.com/wofsauge/External-Item-Descriptions]Any Problems? Visit this project on GitHub[/url]</description>
|
[img]https://i.imgur.com/P6a8043.png[/img] [url=https://github.com/wofsauge/External-Item-Descriptions]Any Problems? Visit this project on GitHub[/url]</description>
|
||||||
<version>3.4</version>
|
<version>3.5</version>
|
||||||
<visibility>Public</visibility>
|
<visibility>Public</visibility>
|
||||||
<tag id="Lua"/>
|
<tag id="Lua"/>
|
||||||
<tag id="Items"/>
|
<tag id="Items"/>
|
||||||
|
|||||||
Reference in new issue
Block a user