Fixed some Isses with rendering Icons

This commit is contained in:
Wofsauge committed 2020-11-29 21:43:20 +01:00
1 parent e32b32d46e
commit 16a59bd938
4 files changed
+28 -25

No files matched your search

+2 -2
View File
@@ -485,8 +485,8 @@ end
-- Returns the icon used for the bulletpoint. It will look at the first word in the given string.
function EID:handleBulletpointIcon(text)
local firstWord = string.match(text, "{{.-}}")
if EID:getIcon(firstWord) ~= EID.InlineIcons["ERROR"] then
local firstWord = string.match(text, "([^%s]+)")
if EID:getIcon(firstWord) ~= EID.InlineIcons["ERROR"] and string.find(firstWord, "{{.-}}")~=nil then
return firstWord
end
return "\007"
+20 -20
View File
@@ -75,27 +75,27 @@ EID.InlineIcons = {
----- Modded Trinket-icons are automatically generated. No code needed!
["Slotmachine"] = {"Slotmachine", 0, 7, 7},
-- Room Icons
["Shop"] = {"roomicons", 0, 7, 9},
["SecretRoom"] = {"roomicons", 1, 7, 9},
["SuperSecretRoom"] = {"roomicons", 2, 7, 9},
["Library"] = {"roomicons", 3, 8, 9},
["TreasureRoom"] = {"roomicons", 4, 7, 9},
["AngelRoom"] = {"roomicons", 5, 7, 9},
["DevilRoom"] = {"roomicons", 6, 7, 9},
["MiniBoss"] = {"roomicons", 7, 7, 9},
["BossRoom"] = {"roomicons", 8, 9, 9},
["ChallengeRoom"] = {"roomicons", 9, 7, 9},
["BossRushRoom"] = {"roomicons", 10, 7, 9},
["CursedRoom"] = {"roomicons", 11, 7, 9},
["SacrificeRoom"] = {"roomicons", 12, 7, 9},
["ArcadeRoom"] = {"roomicons", 13, 7, 9},
["GreedTreasureRoom"] = {"roomicons", 14, 7, 9},
["DiceRoom"] = {"roomicons", 15, 8, 9},
["ChestRoom"] = {"roomicons", 16, 8, 9},
["IsaacsRoom"] = {"roomicons", 17, 8, 9},
["BarrenRoom"] = {"roomicons", 18, 8, 9},
["Shop"] = {"roomicons", 0, 8, 9, 0, 2},
["SecretRoom"] = {"roomicons", 1, 8, 9, 0, 2},
["SuperSecretRoom"] = {"roomicons", 2, 8, 9, 0, 2},
["Library"] = {"roomicons", 3, 8, 9, 0, 2},
["TreasureRoom"] = {"roomicons", 4, 8, 9, 0, 2},
["AngelRoom"] = {"roomicons", 5, 8, 9, 0, 2},
["DevilRoom"] = {"roomicons", 6, 8, 9, 0, 2},
["MiniBoss"] = {"roomicons", 7, 8, 9, 0, 2},
["BossRoom"] = {"roomicons", 8, 9, 9, 0, 2},
["ChallengeRoom"] = {"roomicons", 9, 8, 9, 0, 2},
["BossRushRoom"] = {"roomicons", 10, 8, 9, 0, 2},
["CursedRoom"] = {"roomicons", 11, 8, 9, 0, 2},
["SacrificeRoom"] = {"roomicons", 12, 8, 9, 0, 2},
["ArcadeRoom"] = {"roomicons", 13, 8, 9, 0, 2},
["GreedTreasureRoom"] = {"roomicons", 14, 8, 9, 0, 2},
["DiceRoom"] = {"roomicons", 15, 8, 9, 0, 2},
["ChestRoom"] = {"roomicons", 16, 8, 9, 0, 2},
["IsaacsRoom"] = {"roomicons", 17, 8, 9, 0, 2},
["BarrenRoom"] = {"roomicons", 18, 8, 9, 0, 2},
-- Roomshape Icons
["Room"] = {"roomshape", 0, 9, 9},
["Room"] = {"roomshape", 0, 9, 9, 0, 2},
["RoomSmallHorizontal"] = {"roomshape", 1, 9, 9},
["RoomSmallVertical"] = {"roomshape", 2, 7, 6},
["RoomLongVertical"] = {"roomshape", 3, 7, 9},
+2 -2
View File
@@ -107,7 +107,7 @@ local function onDebugRender(t)
for i,v in ipairs(Isaac.FindByType(5,10,4,true,false)) do
if v:GetData()["EID_Description"] == nil then
local descTable = {
--["Name"] = "Some Item with seed ".. v.InitSeed ,
["Name"] = "Some Item with seed ".. v.InitSeed ,
["Description"] = "Test specific description#Init seed: ".. v.InitSeed,
["Transformation"] = "1,2"
}
@@ -116,7 +116,7 @@ local function onDebugRender(t)
end
for i, v in ipairs(charsToDebug) do
local pos = EID.getTextPosition() + Vector(0, - 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))
if not showDebugChars then
+4 -1
View File
@@ -3,6 +3,7 @@ EID = RegisterMod("External Item Descriptions", 1)
EID.GameVersion = "ab+"
EID.Languages = {"en_us", "en_us_detailed", "fr", "pt", "ru", "spa", "bul", "pl", "turkish"}
EID.descriptions = {} -- Table that holds all translation strings
local enableDebug = false
require("eid_config")
EID.Config = EID.DefaultConfig
@@ -445,4 +446,6 @@ if EID.MCMLoaded then
EID:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, SaveGame)
end
require("eid_debugging")
if enableDebug then
require("eid_debugging")
end