Formatted files very nicely
This commit is contained in:
1 parent
8c6564e69f
commit
fedec6ac37
5 files changed
+719
-528
No files matched your search
+66
-26
@@ -23,28 +23,26 @@ end
|
|||||||
__eidItemDescriptions[item] = "Most Fitting Description";
|
__eidItemDescriptions[item] = "Most Fitting Description";
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- Init variables for other mods to hand over Descriptions if they were not yet inited by another mod.
|
-- Init variables for other mods to hand over Descriptions if they were not yet inited by another mod.
|
||||||
if not __eidItemDescriptions then
|
if not __eidItemDescriptions then
|
||||||
__eidItemDescriptions = {};
|
__eidItemDescriptions = {}
|
||||||
end
|
end
|
||||||
if not __eidTrinketDescriptions then
|
if not __eidTrinketDescriptions then
|
||||||
__eidTrinketDescriptions = {};
|
__eidTrinketDescriptions = {}
|
||||||
end
|
end
|
||||||
if not __eidCardDescriptions then
|
if not __eidCardDescriptions then
|
||||||
__eidCardDescriptions = {};
|
__eidCardDescriptions = {}
|
||||||
end
|
end
|
||||||
if not __eidPillDescriptions then
|
if not __eidPillDescriptions then
|
||||||
__eidPillDescriptions = {};
|
__eidPillDescriptions = {}
|
||||||
end
|
end
|
||||||
if not __eidItemTransformations then
|
if not __eidItemTransformations then
|
||||||
__eidItemTransformations = {};
|
__eidItemTransformations = {}
|
||||||
end
|
end
|
||||||
if not __eidEntityDescriptions then
|
if not __eidEntityDescriptions then
|
||||||
__eidEntityDescriptions = {};
|
__eidEntityDescriptions = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
-------------------------Handle Custom Enum -----------------------------
|
-------------------------Handle Custom Enum -----------------------------
|
||||||
|
|
||||||
@@ -65,7 +63,7 @@ EID.TRANSFORMATION = {
|
|||||||
["BOOKWORM"] = 12,
|
["BOOKWORM"] = 12,
|
||||||
["ADULT"] = 14,
|
["ADULT"] = 14,
|
||||||
["SPIDERBABY"] = 13,
|
["SPIDERBABY"] = 13,
|
||||||
["SUPERBUM"] = 11,
|
["SUPERBUM"] = 11
|
||||||
}
|
}
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
@@ -78,7 +76,7 @@ end
|
|||||||
|
|
||||||
-- returns the current text position
|
-- returns the current text position
|
||||||
function EID:getTextPosition()
|
function EID:getTextPosition()
|
||||||
return Vector(EIDConfig["XPosition"],EIDConfig["YPosition"])
|
return Vector(EIDConfig["XPosition"], EIDConfig["YPosition"])
|
||||||
end
|
end
|
||||||
|
|
||||||
-- returns the entity that is currently described. returns last described entity if currently not displaying text
|
-- returns the entity that is currently described. returns last described entity if currently not displaying text
|
||||||
@@ -87,14 +85,14 @@ function EID:getLastDescribedEntity()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function EID:getModDescription(list, id)
|
function EID:getModDescription(list, id)
|
||||||
return (list) and (list[id])
|
return (list) and (list[id])
|
||||||
end
|
end
|
||||||
|
|
||||||
--Get the name of the given transformation by its ID
|
--Get the name of the given transformation by its ID
|
||||||
function EID:getTransformation(id)
|
function EID:getTransformation(id)
|
||||||
local str="Custom";
|
local str = "Custom"
|
||||||
if (tonumber(id) <= #transformations-1) then
|
if (tonumber(id) <= #transformations - 1) then
|
||||||
return transformations[tonumber(id)+1]
|
return transformations[tonumber(id) + 1]
|
||||||
end
|
end
|
||||||
return str
|
return str
|
||||||
end
|
end
|
||||||
@@ -103,13 +101,15 @@ end
|
|||||||
function EID:hasDescription(entity)
|
function EID:hasDescription(entity)
|
||||||
local isAllowed = false
|
local isAllowed = false
|
||||||
if EIDConfig["EnableEntityDescriptions"] then
|
if EIDConfig["EnableEntityDescriptions"] then
|
||||||
isAllowed = isAllowed or (__eidEntityDescriptions[entity.Type.."."..entity.Variant.."."..entity.SubType]~=nil --[[or type(entity:GetData()["EID_Description"]) ~= type(nil)]])
|
isAllowed =
|
||||||
|
isAllowed or
|
||||||
|
(__eidEntityDescriptions[entity.Type .. "." .. entity.Variant .. "." .. entity.SubType] ~= nil) --[[or type(entity:GetData()["EID_Description"]) ~= type(nil)]]
|
||||||
end
|
end
|
||||||
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE and EIDConfig["DisplayItemInfo"])
|
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE and EIDConfig["DisplayItemInfo"])
|
||||||
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TRINKET and EIDConfig["DisplayTrinketInfo"])
|
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TRINKET and EIDConfig["DisplayTrinketInfo"])
|
||||||
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TAROTCARD and EIDConfig["DisplayCardInfo"])
|
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TAROTCARD and EIDConfig["DisplayCardInfo"])
|
||||||
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_PILL and EIDConfig["DisplayPillInfo"])
|
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_PILL and EIDConfig["DisplayPillInfo"])
|
||||||
return entity.Type == EntityType.ENTITY_PICKUP and isAllowed and entity.SubType>0
|
return entity.Type == EntityType.ENTITY_PICKUP and isAllowed and entity.SubType > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Replaces shorthand-representations of a character with the internal reference
|
-- Replaces shorthand-representations of a character with the internal reference
|
||||||
@@ -126,40 +126,80 @@ function EID:replaceMarkupStrings(text)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Returns the icon used for the bulletpoint. It will look at the first character in the given string.
|
-- Returns the icon used for the bulletpoint. It will look at the first character in the given string.
|
||||||
EID.bulletIcons={"↑","↓","!","ǃ"}
|
EID.bulletIcons = {"↑", "↓", "!", "ǃ"}
|
||||||
function EID:getBulletpointIcon(text)
|
function EID:getBulletpointIcon(text)
|
||||||
for i,v in ipairs(EID.bulletIcons) do
|
for i, v in ipairs(EID.bulletIcons) do
|
||||||
local iconPos = string.find(text,v)
|
local iconPos = string.find(text, v)
|
||||||
if iconPos == 1 or iconPos == 2 then
|
if iconPos == 1 or iconPos == 2 then
|
||||||
return v
|
return v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return '\007'
|
return "\007"
|
||||||
end
|
end
|
||||||
|
|
||||||
--needs to be called in a render Callback
|
--needs to be called in a render Callback
|
||||||
-- args: string, Vector(int, int), Vector(float,float), KColor obj, bool
|
-- args: string, Vector(int, int), Vector(float,float), KColor obj, bool
|
||||||
function EID:renderString(str, position, scale, kcolor, centered)
|
function EID:renderString(str, position, scale, kcolor, centered)
|
||||||
EID.font:DrawStringScaledUTF8(str, position.X, position.Y, scale.X ,scale.Y ,kcolor ,EID.font:GetStringWidthUTF8(str), centered)
|
EID.font:DrawStringScaledUTF8(
|
||||||
|
str,
|
||||||
|
position.X,
|
||||||
|
position.Y,
|
||||||
|
scale.X,
|
||||||
|
scale.Y,
|
||||||
|
kcolor,
|
||||||
|
EID.font:GetStringWidthUTF8(str),
|
||||||
|
centered
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get KColor object of "Entity Name" texts
|
-- Get KColor object of "Entity Name" texts
|
||||||
function EID:getNameColor()
|
function EID:getNameColor()
|
||||||
return KColor(EIDConfig["ItemNameColor"][1] , EIDConfig["ItemNameColor"][2], EIDConfig["ItemNameColor"][3],EIDConfig["Transparency"],0,0,0)
|
return KColor(
|
||||||
|
EIDConfig["ItemNameColor"][1],
|
||||||
|
EIDConfig["ItemNameColor"][2],
|
||||||
|
EIDConfig["ItemNameColor"][3],
|
||||||
|
EIDConfig["Transparency"],
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get KColor object of "Description" texts
|
-- Get KColor object of "Description" texts
|
||||||
function EID:getTextColor()
|
function EID:getTextColor()
|
||||||
return KColor(EIDConfig["TextColor"][1] , EIDConfig["TextColor"][2], EIDConfig["TextColor"][3],EIDConfig["Transparency"],0,0,0)
|
return KColor(
|
||||||
|
EIDConfig["TextColor"][1],
|
||||||
|
EIDConfig["TextColor"][2],
|
||||||
|
EIDConfig["TextColor"][3],
|
||||||
|
EIDConfig["Transparency"],
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get KColor object of "Transformation" texts
|
-- Get KColor object of "Transformation" texts
|
||||||
function EID:getTransformationColor()
|
function EID:getTransformationColor()
|
||||||
return KColor(EIDConfig["TransformationColor"][1] , EIDConfig["TransformationColor"][2], EIDConfig["TransformationColor"][3],EIDConfig["Transparency"],0,0,0)
|
return KColor(
|
||||||
|
EIDConfig["TransformationColor"][1],
|
||||||
|
EIDConfig["TransformationColor"][2],
|
||||||
|
EIDConfig["TransformationColor"][3],
|
||||||
|
EIDConfig["Transparency"],
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get KColor object of "Error" texts
|
-- Get KColor object of "Error" texts
|
||||||
function EID:getErrorColor()
|
function EID:getErrorColor()
|
||||||
return KColor(EIDConfig["ErrorColor"][1] , EIDConfig["ErrorColor"][2], EIDConfig["ErrorColor"][3],EIDConfig["Transparency"],0,0,0)
|
return KColor(
|
||||||
|
EIDConfig["ErrorColor"][1],
|
||||||
|
EIDConfig["ErrorColor"][2],
|
||||||
|
EIDConfig["ErrorColor"][3],
|
||||||
|
EIDConfig["Transparency"],
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
+6
-21
@@ -1,5 +1,4 @@
|
|||||||
EIDConfig={
|
EIDConfig = {
|
||||||
|
|
||||||
-------GENERAL---------
|
-------GENERAL---------
|
||||||
|
|
||||||
-- Change language of the mod.
|
-- Change language of the mod.
|
||||||
@@ -13,7 +12,6 @@ EIDConfig={
|
|||||||
-- Russian (https://steamcommunity.com/sharedfiles/filedetails/?id=1552851879)
|
-- Russian (https://steamcommunity.com/sharedfiles/filedetails/?id=1552851879)
|
||||||
-- If you want to make a translation, please contact me :)
|
-- If you want to make a translation, please contact me :)
|
||||||
["Language"] = "en_us",
|
["Language"] = "en_us",
|
||||||
|
|
||||||
-- Change Width of the info boxes. (In characters)
|
-- Change Width of the info boxes. (In characters)
|
||||||
-- Default = 25
|
-- Default = 25
|
||||||
["TextboxWidth"] = 25,
|
["TextboxWidth"] = 25,
|
||||||
@@ -37,18 +35,15 @@ EIDConfig={
|
|||||||
-- Arrow = moving arrow pointing at the item | Blink = the whole sprite blinks white | Border = Blinking white border around the sprite | Highlight = White border around the sprite | None = Disable funtion
|
-- Arrow = moving arrow pointing at the item | Blink = the whole sprite blinks white | Border = Blinking white border around the sprite | Highlight = White border around the sprite | None = Disable funtion
|
||||||
-- Default = "none"
|
-- Default = "none"
|
||||||
["Indicator"] = "none",
|
["Indicator"] = "none",
|
||||||
|
|
||||||
-- Set the keybinding to toggle the descriptions
|
-- Set the keybinding to toggle the descriptions
|
||||||
-- look into the AB+ documentation for the key names
|
-- look into the AB+ documentation for the key names
|
||||||
-- Default = Keyboard.KEY_F2
|
-- Default = Keyboard.KEY_F2
|
||||||
["HideKey"] = Keyboard.KEY_F2 ,
|
["HideKey"] = Keyboard.KEY_F2,
|
||||||
|
|
||||||
-------------CURSE-------------
|
-------------CURSE-------------
|
||||||
|
|
||||||
-- Display informations when the floor has curse of the blind ( ? - Items)
|
-- Display informations when the floor has curse of the blind ( ? - Items)
|
||||||
-- Default = true
|
-- Default = true
|
||||||
["DisableOnCurse"] = true,
|
["DisableOnCurse"] = true,
|
||||||
|
|
||||||
----------ITEM NAMES-----------
|
----------ITEM NAMES-----------
|
||||||
|
|
||||||
-- Toggle Display of Collectible / Card and Pill names
|
-- Toggle Display of Collectible / Card and Pill names
|
||||||
@@ -66,7 +61,6 @@ EIDConfig={
|
|||||||
-- Set the RGB color of the Itemname text
|
-- Set the RGB color of the Itemname text
|
||||||
-- Default = {0.8, 0.3, 0.8}
|
-- Default = {0.8, 0.3, 0.8}
|
||||||
["ItemNameColor"] = {0.8, 0.3, 0.8},
|
["ItemNameColor"] = {0.8, 0.3, 0.8},
|
||||||
|
|
||||||
-------TRANSFORMATIONS---------
|
-------TRANSFORMATIONS---------
|
||||||
|
|
||||||
-- Toggle Display of Transformation text
|
-- Toggle Display of Transformation text
|
||||||
@@ -77,8 +71,7 @@ EIDConfig={
|
|||||||
["TransformationIcons"] = true,
|
["TransformationIcons"] = true,
|
||||||
-- Set the RGB color of the Transformation text
|
-- Set the RGB color of the Transformation text
|
||||||
-- Default = { 0.5, 0.5, 1}
|
-- Default = { 0.5, 0.5, 1}
|
||||||
["TransformationColor"] = { 0.5, 0.5, 1},
|
["TransformationColor"] = {0.5, 0.5, 1},
|
||||||
|
|
||||||
------------CARDS--------------
|
------------CARDS--------------
|
||||||
|
|
||||||
-- Toggle Display of Card / Rune descriptions
|
-- Toggle Display of Card / Rune descriptions
|
||||||
@@ -87,7 +80,6 @@ EIDConfig={
|
|||||||
-- Toggle Display of Card / Rune descriptions when its a shop item
|
-- Toggle Display of Card / Rune descriptions when its a shop item
|
||||||
-- Default = false
|
-- Default = false
|
||||||
["DisplayCardInfoShop"] = false,
|
["DisplayCardInfoShop"] = false,
|
||||||
|
|
||||||
------------PILLS--------------
|
------------PILLS--------------
|
||||||
|
|
||||||
-- Toggle Display of Pill descriptions
|
-- Toggle Display of Pill descriptions
|
||||||
@@ -99,22 +91,16 @@ EIDConfig={
|
|||||||
-- Toggle Display of Pill descriptions that arent known to you yet
|
-- Toggle Display of Pill descriptions that arent known to you yet
|
||||||
-- Default = false
|
-- Default = false
|
||||||
["ShowUnidentifiedPillDescriptions"] = false,
|
["ShowUnidentifiedPillDescriptions"] = false,
|
||||||
|
|
||||||
|
|
||||||
--------Sacrifice Room---------
|
--------Sacrifice Room---------
|
||||||
|
|
||||||
-- Toggle Display of next Sacrifice room Payout descriptions
|
-- Toggle Display of next Sacrifice room Payout descriptions
|
||||||
-- Default = true
|
-- Default = true
|
||||||
["DisplaySacrificeInfo"] = true,
|
["DisplaySacrificeInfo"] = true,
|
||||||
|
|
||||||
|
|
||||||
--------Dice Room---------
|
--------Dice Room---------
|
||||||
|
|
||||||
-- Toggle Display of Diceroom descriptions
|
-- Toggle Display of Diceroom descriptions
|
||||||
-- Default = true
|
-- Default = true
|
||||||
["DisplayDiceInfo"] = true,
|
["DisplayDiceInfo"] = true,
|
||||||
|
|
||||||
|
|
||||||
-------------MISC---------------
|
-------------MISC---------------
|
||||||
|
|
||||||
-- Error message displayed when an error occurs
|
-- Error message displayed when an error occurs
|
||||||
@@ -122,15 +108,14 @@ EIDConfig={
|
|||||||
["ErrorMessage"] = "[Effect not defined]",
|
["ErrorMessage"] = "[Effect not defined]",
|
||||||
-- Set the RGB color of the default description text
|
-- Set the RGB color of the default description text
|
||||||
-- Default = { 1, 1, 1}
|
-- Default = { 1, 1, 1}
|
||||||
["TextColor"] = {1,1,1},
|
["TextColor"] = {1, 1, 1},
|
||||||
-- Set the RGB color of the Error text
|
-- Set the RGB color of the Error text
|
||||||
-- Default = { 1, 0, 0}
|
-- Default = { 1, 0, 0}
|
||||||
["ErrorColor"] = {1,0.4,0.4},
|
["ErrorColor"] = {1, 0.4, 0.4},
|
||||||
-- Enables or disables custom Descriptions for entities
|
-- Enables or disables custom Descriptions for entities
|
||||||
-- Default = true
|
-- Default = true
|
||||||
["EnableEntityDescriptions"] = true
|
["EnableEntityDescriptions"] = true
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
--END CONFIG--
|
--END CONFIG--
|
||||||
-----------
|
-----------
|
||||||
|
|||||||
+16
-14
@@ -1,21 +1,23 @@
|
|||||||
local charsToDebug = {
|
local charsToDebug = {
|
||||||
EID:replaceMarkupStrings("!!! EID DEBUG MODE ACTIVATED !!!"), -- Header
|
EID:replaceMarkupStrings("!!! EID DEBUG MODE ACTIVATED !!!"), -- Header
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ", -- Caps letters
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ", -- Caps letters
|
||||||
"abcdefghijklmnopqrstuvwxyz1234567890", -- small letters + numbers
|
"abcdefghijklmnopqrstuvwxyz1234567890", -- small letters + numbers
|
||||||
"western: Áá Àà Ââ Āā Ää Ãã Åå Ææ Éé Èè Êê Ēē Ëë Íí Ìì Îî Īī Ïï ", --
|
"western: Áá Àà Ââ Āā Ää Ãã Åå Ææ Éé Èè Êê Ēē Ëë Íí Ìì Îî Īī Ïï ", --
|
||||||
"western 2: Óó Òò Ôô Ōō Öö Õõ Øø Œœ Úú Ùù Ûû Ūū Üü Ŵŵ Ýý Ÿÿ Ŷ", --
|
"western 2: Óó Òò Ôô Ōō Öö Õõ Øø Œœ Úú Ùù Ûû Ūū Üü Ŵŵ Ýý Ÿÿ Ŷ", --
|
||||||
"western 3: Þþ Çç Ðð Ññ ß ¿¡", --
|
"western 3: Þþ Çç Ðð Ññ ß ¿¡", --
|
||||||
"cyrillic 1: Аа Бб Вв Гг Дд Ее Ёё Жж Зз Ии Йй Кк Лл Мм Нн Оо",
|
"cyrillic 1: Аа Бб Вв Гг Дд Ее Ёё Жж Зз Ии Йй Кк Лл Мм Нн Оо",
|
||||||
"cyrillic 2: Пп Рр Сс Тт Уу Фф Хх Цц Чч Шш Щщ Ъъ Ыы Ьь Ээ Юю Яя",
|
"cyrillic 2: Пп Рр Сс Тт Уу Фф Хх Цц Чч Шш Щщ Ъъ Ыы Ьь Ээ Юю Яя",
|
||||||
"polish: Ąą Ćć Ęę Łł Ńń Óó Śś Źź Żż",
|
"polish: Ąą Ćć Ęę Łł Ńń Óó Śś Źź Żż",
|
||||||
"custom icons: ↑Positive ↓Negative \007bulletpoint !Exclamation ǃWarning !!!shortcut",
|
"custom icons: ↑Positive ↓Negative \007bulletpoint !Exclamation ǃWarning !!!shortcut",
|
||||||
EID:replaceMarkupStrings("legacy icon Markup: \\1:\1Positive \\2:\2Negative \\3:\3Warning ! \\6:\6 heart \\5:\5 Key \\015:\015 Coin \\8\\189:\8\189 Bomb"),
|
EID:replaceMarkupStrings(
|
||||||
"emotes: ☆★〠♠♣♥♦♤♧♡♢☀☂♨♪♭♯♂♀",
|
"legacy icon Markup: \\1:\1Positive \\2:\2Negative \\3:\3Warning ! \\6:\6 heart \\5:\5 Key \\015:\015 Coin \\8\\189:\8\189 Bomb"
|
||||||
|
),
|
||||||
|
"emotes: ☆★〠♠♣♥♦♤♧♡♢☀☂♨♪♭♯♂♀"
|
||||||
}
|
}
|
||||||
|
|
||||||
local function onDebugRender(t)
|
local function onDebugRender(t)
|
||||||
for i,v in ipairs(charsToDebug) do
|
for i, v in ipairs(charsToDebug) do
|
||||||
EID.font:DrawStringUTF8(v,45,20+((i-1)*15),KColor(1,1,1,1,0,0,0),0,true)
|
EID.font:DrawStringUTF8(v, 45, 20 + ((i - 1) * 15), KColor(1, 1, 1, 1, 0, 0, 0), 0, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EID:AddCallback(ModCallbacks.MC_POST_RENDER, onDebugRender)
|
EID:AddCallback(ModCallbacks.MC_POST_RENDER, onDebugRender)
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
EID = RegisterMod( "External Item Descriptions" ,1 );
|
EID = RegisterMod("External Item Descriptions", 1)
|
||||||
local itemConfig = Isaac.GetItemConfig()
|
local itemConfig = Isaac.GetItemConfig()
|
||||||
|
|
||||||
local lineHeight = 11
|
local lineHeight = 11
|
||||||
local isDisplayingText= false
|
local isDisplayingText = false
|
||||||
local lastDescriptionEntity= nil
|
local lastDescriptionEntity = nil
|
||||||
local hideDescToggle= false
|
local hideDescToggle = false
|
||||||
EID.sacrificeCounter= 1
|
EID.sacrificeCounter = 1
|
||||||
|
|
||||||
local IconSprite = Sprite()
|
local IconSprite = Sprite()
|
||||||
IconSprite:Load("gfx/icons.anm2", true)
|
IconSprite:Load("gfx/icons.anm2", true)
|
||||||
|
|
||||||
local ArrowSprite = Sprite()
|
local ArrowSprite = Sprite()
|
||||||
ArrowSprite:Load("gfx/icons.anm2", true)
|
ArrowSprite:Load("gfx/icons.anm2", true)
|
||||||
ArrowSprite:Play("Arrow",false)
|
ArrowSprite:Play("Arrow", false)
|
||||||
|
|
||||||
local CardSprite = Sprite()
|
local CardSprite = Sprite()
|
||||||
CardSprite:Load("gfx/cardfronts.anm2", true)
|
CardSprite:Load("gfx/cardfronts.anm2", true)
|
||||||
|
|
||||||
require("eid_config")
|
require("eid_config")
|
||||||
require("mod_config_menu")
|
require("mod_config_menu")
|
||||||
require("descriptions.ab+."..EIDConfig["Language"])
|
require("descriptions.ab+." .. EIDConfig["Language"])
|
||||||
require("eid_api")
|
require("eid_api")
|
||||||
|
|
||||||
--use some very hacky trickery to get the path to this mod
|
--use some very hacky trickery to get the path to this mod
|
||||||
@@ -27,47 +27,43 @@ local _, err = pcall(require, "")
|
|||||||
local _, basePathStart = string.find(err, "no file '", 1)
|
local _, basePathStart = string.find(err, "no file '", 1)
|
||||||
local _, modPathStart = string.find(err, "no file '", basePathStart)
|
local _, modPathStart = string.find(err, "no file '", basePathStart)
|
||||||
local modPathEnd, _ = string.find(err, ".lua'", modPathStart)
|
local modPathEnd, _ = string.find(err, ".lua'", modPathStart)
|
||||||
local modPath = string.sub(err, modPathStart+1, modPathEnd-1)
|
local modPath = string.sub(err, modPathStart + 1, modPathEnd - 1)
|
||||||
modPath = string.gsub(modPath, "\\", "/")
|
modPath = string.gsub(modPath, "\\", "/")
|
||||||
modPath = string.gsub(modPath, ":/", ":\\")
|
modPath = string.gsub(modPath, ":/", ":\\")
|
||||||
|
|
||||||
|
|
||||||
EID.font = Font() -- init font object
|
EID.font = Font() -- init font object
|
||||||
EID.font:Load(modPath.."resources/font/default.fnt") -- load a font into the font object
|
EID.font:Load(modPath .. "resources/font/default.fnt") -- load a font into the font object
|
||||||
EID.font:SetMissingCharacter(2)
|
EID.font:SetMissingCharacter(2)
|
||||||
if not EID.font:IsLoaded() then
|
if not EID.font:IsLoaded() then
|
||||||
Isaac.DebugString("EID - ERROR: Could not load font from '"..modPath.."resources/font/default.fnt".."'")
|
Isaac.DebugString("EID - ERROR: Could not load font from '" .. modPath .. "resources/font/default.fnt" .. "'")
|
||||||
end
|
end
|
||||||
|
|
||||||
--Makes textscale smaller, when using detailed english descriptions
|
--Makes textscale smaller, when using detailed english descriptions
|
||||||
if EIDConfig["Language"]=="en_us_detailed" and EIDConfig["Scale"] > 0.5 then
|
if EIDConfig["Language"] == "en_us_detailed" and EIDConfig["Scale"] > 0.5 then
|
||||||
EIDConfig["Scale"] = 0.5
|
EIDConfig["Scale"] = 0.5
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
-------------------------Handle Sacrifice Room-----------------------------
|
-------------------------Handle Sacrifice Room-----------------------------
|
||||||
if EIDConfig["DisplaySacrificeInfo"] then
|
if EIDConfig["DisplaySacrificeInfo"] then
|
||||||
|
function onNewFloor()
|
||||||
|
EID.sacrificeCounter = 1
|
||||||
|
end
|
||||||
|
EID:AddCallback(ModCallbacks.MC_POST_NEW_LEVEL, onNewFloor)
|
||||||
|
|
||||||
function onNewFloor()
|
function onDamage(_, entity, _, flag, source)
|
||||||
EID.sacrificeCounter= 1
|
if Game():GetRoom():GetType() == RoomType.ROOM_SACRIFICE and source.Type == 0 and flag == DamageFlag.DAMAGE_SPIKES then
|
||||||
end
|
if EID.sacrificeCounter < 12 then
|
||||||
EID:AddCallback(ModCallbacks.MC_POST_NEW_LEVEL, onNewFloor)
|
EID.sacrificeCounter = EID.sacrificeCounter + 1
|
||||||
|
end
|
||||||
function onDamage(_,entity,_,flag,source)
|
end
|
||||||
if Game():GetRoom():GetType() == RoomType.ROOM_SACRIFICE and source.Type == 0 and flag == DamageFlag.DAMAGE_SPIKES then
|
end
|
||||||
if EID.sacrificeCounter<12 then
|
EID:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, onDamage, EntityType.ENTITY_PLAYER)
|
||||||
EID.sacrificeCounter= EID.sacrificeCounter+1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
EID:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, onDamage,EntityType.ENTITY_PLAYER)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------Printing Functions------------------------------
|
---------------------------Printing Functions------------------------------
|
||||||
local itemTypes= {"null","passive","active","familiar","trinket"}
|
local itemTypes = {"null", "passive", "active", "familiar", "trinket"}
|
||||||
local modifiedPosY = false -- When the player has the schoolbag it changes
|
local modifiedPosY = false -- When the player has the schoolbag it changes
|
||||||
local function posY()
|
local function posY()
|
||||||
return modifiedPosY ~= false and modifiedPosY or EIDConfig["YPosition"]
|
return modifiedPosY ~= false and modifiedPosY or EIDConfig["YPosition"]
|
||||||
@@ -79,95 +75,130 @@ function printDescription(desc)
|
|||||||
local itemType = itemConfig:GetCollectible(desc[1]).Type
|
local itemType = itemConfig:GetCollectible(desc[1]).Type
|
||||||
|
|
||||||
--Display ItemType / Charge
|
--Display ItemType / Charge
|
||||||
if EIDConfig["ShowItemType"] and (itemType ==3 or itemType== 4) then
|
if EIDConfig["ShowItemType"] and (itemType == 3 or itemType == 4) then
|
||||||
local offsetY = 2*EIDConfig["Scale"]
|
local offsetY = 2 * EIDConfig["Scale"]
|
||||||
if EIDConfig["Scale"]<1 then
|
if EIDConfig["Scale"] < 1 then
|
||||||
offsetY =-1
|
offsetY = -1
|
||||||
end
|
end
|
||||||
IconSprite:Play(itemTypes[itemType])
|
IconSprite:Play(itemTypes[itemType])
|
||||||
IconSprite.Scale = Vector(EIDConfig["Scale"],EIDConfig["Scale"])
|
IconSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
||||||
IconSprite:Update()
|
IconSprite:Update()
|
||||||
IconSprite:Render(Vector(EIDConfig["XPosition"]-3*EIDConfig["Scale"],padding+offsetY), Vector(0,0), Vector(0,0))
|
IconSprite:Render(
|
||||||
if itemType ==3 then -- Display Charge
|
Vector(EIDConfig["XPosition"] - 3 * EIDConfig["Scale"], padding + offsetY),
|
||||||
|
Vector(0, 0),
|
||||||
|
Vector(0, 0)
|
||||||
|
)
|
||||||
|
if itemType == 3 then -- Display Charge
|
||||||
IconSprite:Play(itemConfig:GetCollectible(desc[1]).MaxCharges)
|
IconSprite:Play(itemConfig:GetCollectible(desc[1]).MaxCharges)
|
||||||
IconSprite:Update()
|
IconSprite:Update()
|
||||||
IconSprite:Render(Vector(EIDConfig["XPosition"]-3*EIDConfig["Scale"],padding+offsetY), Vector(0,0), Vector(0,0))
|
IconSprite:Render(
|
||||||
|
Vector(EIDConfig["XPosition"] - 3 * EIDConfig["Scale"], padding + offsetY),
|
||||||
|
Vector(0, 0),
|
||||||
|
Vector(0, 0)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if not EIDConfig["ShowItemName"] then
|
if not EIDConfig["ShowItemName"] then
|
||||||
padding = padding+lineHeight*EIDConfig["Scale"]
|
padding = padding + lineHeight * EIDConfig["Scale"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--Display Itemname
|
--Display Itemname
|
||||||
if EIDConfig["ShowItemName"] then
|
if EIDConfig["ShowItemName"] then
|
||||||
local offset = 0
|
local offset = 0
|
||||||
if EIDConfig["ShowItemType"]then if itemType==3 then offset = 9 else offset = 6 end end
|
if EIDConfig["ShowItemType"] then
|
||||||
EID:renderString(itemConfig:GetCollectible(desc[1]).Name, Vector(EIDConfig["XPosition"]+offset*EIDConfig["Scale"], padding-4), Vector(EIDConfig["Scale"],EIDConfig["Scale"]), EID:getNameColor(), false)
|
if itemType == 3 then
|
||||||
|
offset = 9
|
||||||
|
else
|
||||||
|
offset = 6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EID:renderString(
|
||||||
|
itemConfig:GetCollectible(desc[1]).Name,
|
||||||
|
Vector(EIDConfig["XPosition"] + offset * EIDConfig["Scale"], padding - 4),
|
||||||
|
Vector(EIDConfig["Scale"], EIDConfig["Scale"]),
|
||||||
|
EID:getNameColor(),
|
||||||
|
false
|
||||||
|
)
|
||||||
|
|
||||||
padding = padding+lineHeight*EIDConfig["Scale"]
|
padding = padding + lineHeight * EIDConfig["Scale"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--Display Transformation
|
--Display Transformation
|
||||||
if not(desc[2]=="0" or desc[2]=="" or desc[2]==nil ) then
|
if not (desc[2] == "0" or desc[2] == "" or desc[2] == nil) then
|
||||||
if EIDConfig["TransformationText"] then
|
if EIDConfig["TransformationText"] then
|
||||||
local transformationText= ""
|
local transformationText = ""
|
||||||
if not(EID:getTransformation(desc[2])=="Custom") then
|
if not (EID:getTransformation(desc[2]) == "Custom") then
|
||||||
transformationText =EID:getTransformation(desc[2])
|
transformationText = EID:getTransformation(desc[2])
|
||||||
elseif not(transformations[desc[2]]) then --Custom transformationname
|
elseif not (transformations[desc[2]]) then --Custom transformationname
|
||||||
transformationText=desc[2]
|
transformationText = desc[2]
|
||||||
else
|
else
|
||||||
transformationText=EID:getTransformation(desc[2])
|
transformationText = EID:getTransformation(desc[2])
|
||||||
end
|
end
|
||||||
EID:renderString(transformationText, Vector(EIDConfig["XPosition"]+16*EIDConfig["Scale"], padding-1), Vector(EIDConfig["Scale"],EIDConfig["Scale"]), EID:getTransformationColor(), false)
|
EID:renderString(
|
||||||
|
transformationText,
|
||||||
|
Vector(EIDConfig["XPosition"] + 16 * EIDConfig["Scale"], padding - 1),
|
||||||
|
Vector(EIDConfig["Scale"], EIDConfig["Scale"]),
|
||||||
|
EID:getTransformationColor(),
|
||||||
|
false
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if EIDConfig["TransformationIcons"] and not(EID:getTransformation(desc[2])=="Custom") then
|
if EIDConfig["TransformationIcons"] and not (EID:getTransformation(desc[2]) == "Custom") then
|
||||||
IconSprite:Play("Transformation"..desc[2])
|
IconSprite:Play("Transformation" .. desc[2])
|
||||||
IconSprite.Scale = Vector(EIDConfig["Scale"],EIDConfig["Scale"])
|
IconSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
||||||
IconSprite:Update()
|
IconSprite:Update()
|
||||||
IconSprite:Render(Vector(EIDConfig["XPosition"]+5*EIDConfig["Scale"],padding+5*EIDConfig["Scale"]), Vector(0,0), Vector(0,0))
|
IconSprite:Render(
|
||||||
|
Vector(EIDConfig["XPosition"] + 5 * EIDConfig["Scale"], padding + 5 * EIDConfig["Scale"]),
|
||||||
|
Vector(0, 0),
|
||||||
|
Vector(0, 0)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if(EIDConfig["TransformationIcons"] or EIDConfig["TransformationText"] ) then
|
if (EIDConfig["TransformationIcons"] or EIDConfig["TransformationText"]) then
|
||||||
padding = padding+lineHeight*EIDConfig["Scale"]
|
padding = padding + lineHeight * EIDConfig["Scale"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
printBulletPoints(Description,padding)
|
printBulletPoints(Description, padding)
|
||||||
end
|
end
|
||||||
|
|
||||||
function printTrinketDescription(desc,typ)
|
function printTrinketDescription(desc, typ)
|
||||||
local Description = desc[2]
|
local Description = desc[2]
|
||||||
local padding = posY()
|
local padding = posY()
|
||||||
--Display Itemname
|
--Display Itemname
|
||||||
if EIDConfig["ShowItemName"] then
|
if EIDConfig["ShowItemName"] then
|
||||||
local name= ""
|
local name = ""
|
||||||
if typ=="trinket" then
|
if typ == "trinket" then
|
||||||
name= itemConfig:GetTrinket(desc[1]).Name
|
name = itemConfig:GetTrinket(desc[1]).Name
|
||||||
elseif typ=="card" then
|
elseif typ == "card" then
|
||||||
name= itemConfig:GetCard(desc[1]).Name
|
name = itemConfig:GetCard(desc[1]).Name
|
||||||
elseif typ=="pill" then
|
elseif typ == "pill" then
|
||||||
name= itemConfig:GetPillEffect(desc[1]).Name
|
name = itemConfig:GetPillEffect(desc[1]).Name
|
||||||
elseif typ=="sacrifice" then
|
elseif typ == "sacrifice" then
|
||||||
name= sacrificeDescriptionHeader
|
name = sacrificeDescriptionHeader
|
||||||
elseif typ=="dice" then
|
elseif typ == "dice" then
|
||||||
name= diceDescriptionHeader
|
name = diceDescriptionHeader
|
||||||
elseif typ=="custom" then
|
elseif typ == "custom" then
|
||||||
name= desc[2][1]
|
name = desc[2][1]
|
||||||
Description= desc[2][2]
|
Description = desc[2][2]
|
||||||
end
|
end
|
||||||
EID:renderString(name, Vector(EIDConfig["XPosition"],padding), Vector(EIDConfig["Scale"],EIDConfig["Scale"]), EID:getNameColor(), false)
|
EID:renderString(
|
||||||
|
name,
|
||||||
|
Vector(EIDConfig["XPosition"], padding),
|
||||||
|
Vector(EIDConfig["Scale"], EIDConfig["Scale"]),
|
||||||
|
EID:getNameColor(),
|
||||||
|
false
|
||||||
|
)
|
||||||
|
|
||||||
padding = padding+lineHeight*EIDConfig["Scale"]
|
padding = padding + lineHeight * EIDConfig["Scale"]
|
||||||
end
|
end
|
||||||
printBulletPoints(Description,padding)
|
printBulletPoints(Description, padding)
|
||||||
end
|
end
|
||||||
|
|
||||||
function printBulletPoints(description, padding)
|
function printBulletPoints(description, padding)
|
||||||
local textboxWidth=tonumber(EIDConfig["TextboxWidth"])
|
local textboxWidth = tonumber(EIDConfig["TextboxWidth"])
|
||||||
for line in string.gmatch(description, '([^#]+)') do
|
for line in string.gmatch(description, "([^#]+)") do
|
||||||
local array={}
|
local array = {}
|
||||||
local text = ""
|
local text = ""
|
||||||
for word in string.gmatch(line, '([^ ]+)') do
|
for word in string.gmatch(line, "([^ ]+)") do
|
||||||
if string.len(text)+string.len(word)<=textboxWidth then
|
if string.len(text) + string.len(word) <= textboxWidth then
|
||||||
text = text.." "..word
|
text = text .. " " .. word
|
||||||
else
|
else
|
||||||
table.insert(array, text)
|
table.insert(array, text)
|
||||||
text = word
|
text = word
|
||||||
@@ -180,213 +211,278 @@ function printBulletPoints(description, padding)
|
|||||||
local bpIcon = " " -- no bulletpoint
|
local bpIcon = " " -- no bulletpoint
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
bpIcon = EID:getBulletpointIcon(v)
|
bpIcon = EID:getBulletpointIcon(v)
|
||||||
if string.find(bpIcon,'\007') == nil then
|
if string.find(bpIcon, "\007") == nil then
|
||||||
v = string.sub(v, 3 + #bpIcon)
|
v = string.sub(v, 3 + #bpIcon)
|
||||||
posX = posX - 2 -- Move a bit to the left, to center icons
|
posX = posX - 2 -- Move a bit to the left, to center icons
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EID:renderString(bpIcon..EID:replaceMarkupStrings(v), Vector(posX, padding), Vector(EIDConfig["Scale"],EIDConfig["Scale"]), textColor, false)
|
EID:renderString(
|
||||||
padding = padding +lineHeight*EIDConfig["Scale"]
|
bpIcon .. EID:replaceMarkupStrings(v),
|
||||||
|
Vector(posX, padding),
|
||||||
|
Vector(EIDConfig["Scale"], EIDConfig["Scale"]),
|
||||||
|
textColor,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
padding = padding + lineHeight * EIDConfig["Scale"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------Handle Rendering--------------------------------
|
---------------------------Handle Rendering--------------------------------
|
||||||
function HasCurseBlind()
|
function HasCurseBlind()
|
||||||
local num = Game():GetLevel():GetCurses()
|
local num = Game():GetLevel():GetCurses()
|
||||||
local t={}
|
local t = {}
|
||||||
while num>0 do
|
while num > 0 do
|
||||||
rest=num%2
|
rest = num % 2
|
||||||
t[#t+1]=rest
|
t[#t + 1] = rest
|
||||||
num=(num-rest)/2
|
num = (num - rest) / 2
|
||||||
end
|
end
|
||||||
|
|
||||||
return #t>6 and t[7]==1
|
return #t > 6 and t[7] == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function renderQuestionMark()
|
function renderQuestionMark()
|
||||||
IconSprite:Play("CurseOfBlind")
|
IconSprite:Play("CurseOfBlind")
|
||||||
IconSprite.Scale = Vector(EIDConfig["Scale"],EIDConfig["Scale"])
|
IconSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
||||||
IconSprite:Update()
|
IconSprite:Update()
|
||||||
IconSprite:Render(Vector(EIDConfig["XPosition"]+5*EIDConfig["Scale"],posY()+5*EIDConfig["Scale"]), Vector(0,0), Vector(0,0))
|
IconSprite:Render(
|
||||||
if Isaac.GetPlayer(0):HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then modifiedPosY =EIDConfig["YPosition"] -30 end
|
Vector(EIDConfig["XPosition"] + 5 * EIDConfig["Scale"], posY() + 5 * EIDConfig["Scale"]),
|
||||||
|
Vector(0, 0),
|
||||||
|
Vector(0, 0)
|
||||||
|
)
|
||||||
|
if Isaac.GetPlayer(0):HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then
|
||||||
|
modifiedPosY = EIDConfig["YPosition"] - 30
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function renderIndicator(entity)
|
function renderIndicator(entity)
|
||||||
if EIDConfig["Indicator"] == "blink" then
|
if EIDConfig["Indicator"] == "blink" then
|
||||||
local c = 255-math.floor(255*((entity.FrameCount%40)/40))
|
local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40))
|
||||||
entity:SetColor(Color(1,1,1,1,c,c,c),1,1,false,false)
|
entity:SetColor(Color(1, 1, 1, 1, c, c, c), 1, 1, false, false)
|
||||||
entity:Render(Vector(0,0))
|
entity:Render(Vector(0, 0))
|
||||||
entity:SetColor(Color(1,1,1,1,0,0,0),2,1,false,false)
|
entity:SetColor(Color(1, 1, 1, 1, 0, 0, 0), 2, 1, false, false)
|
||||||
|
|
||||||
elseif EIDConfig["Indicator"] == "border" then
|
elseif EIDConfig["Indicator"] == "border" then
|
||||||
local c = 255-math.floor(255*((entity.FrameCount%40)/40))
|
local c = 255 - math.floor(255 * ((entity.FrameCount % 40) / 40))
|
||||||
entity:SetColor(Color(1,1,1,1,c,c,c),1,1,false,false)
|
entity:SetColor(Color(1, 1, 1, 1, c, c, c), 1, 1, false, false)
|
||||||
entity:Render(Vector(0,1))
|
entity:Render(Vector(0, 1))
|
||||||
entity:Render(Vector(0,-1))
|
entity:Render(Vector(0, -1))
|
||||||
entity:Render(Vector(1,0))
|
entity:Render(Vector(1, 0))
|
||||||
entity:Render(Vector(-1,0))
|
entity:Render(Vector(-1, 0))
|
||||||
entity:SetColor(Color(1,1,1,1,0,0,0),2,1,false,false)
|
entity:SetColor(Color(1, 1, 1, 1, 0, 0, 0), 2, 1, false, false)
|
||||||
entity:Render(Vector(0,0))
|
entity:Render(Vector(0, 0))
|
||||||
|
|
||||||
elseif EIDConfig["Indicator"] == "highlight" then
|
elseif EIDConfig["Indicator"] == "highlight" then
|
||||||
entity:SetColor(Color(1,1,1,1,255,255,255),1,1,false,false)
|
entity:SetColor(Color(1, 1, 1, 1, 255, 255, 255), 1, 1, false, false)
|
||||||
entity:Render(Vector(0,1))
|
entity:Render(Vector(0, 1))
|
||||||
entity:Render(Vector(0,-1))
|
entity:Render(Vector(0, -1))
|
||||||
entity:Render(Vector(1,0))
|
entity:Render(Vector(1, 0))
|
||||||
entity:Render(Vector(-1,0))
|
entity:Render(Vector(-1, 0))
|
||||||
entity:SetColor(Color(1,1,1,1,0,0,0),2,1,false,false)
|
entity:SetColor(Color(1, 1, 1, 1, 0, 0, 0), 2, 1, false, false)
|
||||||
entity:Render(Vector(0,0))
|
entity:Render(Vector(0, 0))
|
||||||
|
|
||||||
elseif EIDConfig["Indicator"] == "arrow" then
|
elseif EIDConfig["Indicator"] == "arrow" then
|
||||||
ArrowSprite:Update()
|
ArrowSprite:Update()
|
||||||
local ArrowOffset = Vector(0,-35)
|
local ArrowOffset = Vector(0, -35)
|
||||||
if entity.Variant ==100 and not entity:ToPickup():IsShopItem() then ArrowOffset = Vector(0,-62) end
|
if entity.Variant == 100 and not entity:ToPickup():IsShopItem() then
|
||||||
ArrowSprite:Render(Game():GetRoom():WorldToScreenPosition(entity.Position+ArrowOffset), Vector(0,0), Vector(0,0))
|
ArrowOffset = Vector(0, -62)
|
||||||
|
end
|
||||||
|
ArrowSprite:Render(Game():GetRoom():WorldToScreenPosition(entity.Position + ArrowOffset), Vector(0, 0), Vector(0, 0))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------On Render Function------------------------------
|
---------------------------On Render Function------------------------------
|
||||||
|
|
||||||
local function onRender(t)
|
local function onRender(t)
|
||||||
isDisplayingText= false
|
isDisplayingText = false
|
||||||
local player = Isaac.GetPlayer(0)
|
local player = Isaac.GetPlayer(0)
|
||||||
local closest = nil
|
local closest = nil
|
||||||
local closestDice = nil
|
local closestDice = nil
|
||||||
local dist = 10000
|
local dist = 10000
|
||||||
if Input.IsButtonTriggered(EIDConfig["HideKey"], 0) then
|
if Input.IsButtonTriggered(EIDConfig["HideKey"], 0) then
|
||||||
hideDescToggle = not hideDescToggle;
|
hideDescToggle = not hideDescToggle
|
||||||
|
end
|
||||||
|
if hideDescToggle then
|
||||||
|
return
|
||||||
end
|
end
|
||||||
if hideDescToggle then return end
|
|
||||||
|
|
||||||
for i, entity in ipairs(Isaac.GetRoomEntities()) do
|
for i, entity in ipairs(Isaac.GetRoomEntities()) do
|
||||||
if Game():GetRoom():GetType()==RoomType.ROOM_DICE and entity.Type==1000 and entity.Variant== 76 then closestDice= entity end
|
if Game():GetRoom():GetType() == RoomType.ROOM_DICE and entity.Type == 1000 and entity.Variant == 76 then
|
||||||
|
closestDice = entity
|
||||||
|
end
|
||||||
|
|
||||||
if EID:hasDescription(entity) then
|
if EID:hasDescription(entity) then
|
||||||
local diff = entity.Position:__sub(player.Position);
|
local diff = entity.Position:__sub(player.Position)
|
||||||
if diff:Length() < dist then
|
if diff:Length() < dist then
|
||||||
closest = entity;
|
closest = entity
|
||||||
dist = diff:Length();
|
dist = diff:Length()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if dist / 40 > tonumber(EIDConfig["MaxDistance"]) or not closest.Type == EntityType.ENTITY_PICKUP then
|
||||||
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
|
||||||
if Game():GetRoom():GetType()==RoomType.ROOM_SACRIFICE and EIDConfig["DisplaySacrificeInfo"] then
|
printTrinketDescription(sacrificeDescriptions[EID.sacrificeCounter], "sacrifice")
|
||||||
printTrinketDescription(sacrificeDescriptions[EID.sacrificeCounter],"sacrifice")
|
|
||||||
end
|
end
|
||||||
if Game():GetRoom():GetType()==RoomType.ROOM_DICE and EIDConfig["DisplayDiceInfo"] and type(closestDice) ~= type(nil) then
|
if
|
||||||
printTrinketDescription(diceDescriptions[closestDice.SubType+1],"dice")
|
Game():GetRoom():GetType() == RoomType.ROOM_DICE and EIDConfig["DisplayDiceInfo"] and type(closestDice) ~= type(nil)
|
||||||
|
then
|
||||||
|
printTrinketDescription(diceDescriptions[closestDice.SubType + 1], "dice")
|
||||||
renderIndicator(closestDice)
|
renderIndicator(closestDice)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if closest==nil then return end
|
if closest == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
lastDescriptionEntity = closest
|
lastDescriptionEntity = closest
|
||||||
isDisplayingText= true
|
isDisplayingText = true
|
||||||
|
|
||||||
--Handle Indicators
|
--Handle Indicators
|
||||||
renderIndicator(closest)
|
renderIndicator(closest)
|
||||||
|
|
||||||
--Handle Entities (specific)
|
--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")
|
printTrinketDescription({closest.Type, closest:GetData()["EID_Description"]}, "custom")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--Handle Entities (omni)
|
--Handle Entities (omni)
|
||||||
if EIDConfig["EnableEntityDescriptions"] and __eidEntityDescriptions[closest.Type.."."..closest.Variant.."."..closest.SubType] ~=nil then
|
if
|
||||||
printTrinketDescription({closest.Type,EID:getModDescription(__eidEntityDescriptions,closest.Type.."."..closest.Variant.."."..closest.SubType)},"custom")
|
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"
|
||||||
|
)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--Handle Trinkets
|
--Handle Trinkets
|
||||||
if closest.Variant == PickupVariant.PICKUP_TRINKET then
|
if closest.Variant == PickupVariant.PICKUP_TRINKET then
|
||||||
|
--Handle Collectibles
|
||||||
if closest.SubType <= 128 then
|
if closest.SubType <= 128 then
|
||||||
printTrinketDescription(trinketdescriptions[closest.SubType],"trinket")
|
printTrinketDescription(trinketdescriptions[closest.SubType], "trinket")
|
||||||
elseif EID:getModDescription(__eidTrinketDescriptions,closest.SubType) then
|
elseif EID:getModDescription(__eidTrinketDescriptions, closest.SubType) then
|
||||||
printTrinketDescription({closest.SubType,EID:getModDescription(__eidTrinketDescriptions,closest.SubType)},"trinket")
|
printTrinketDescription(
|
||||||
|
{closest.SubType, EID:getModDescription(__eidTrinketDescriptions, closest.SubType)},
|
||||||
|
"trinket"
|
||||||
|
)
|
||||||
else
|
else
|
||||||
printTrinketDescription({closest.SubType,itemConfig:GetTrinket(closest.SubType).Description})
|
printTrinketDescription({closest.SubType, itemConfig:GetTrinket(closest.SubType).Description})
|
||||||
end
|
end
|
||||||
--Handle Collectibles
|
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
elseif closest.Variant == PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
if HasCurseBlind() and EIDConfig["DisableOnCurse"] then renderQuestionMark() return end
|
--Handle Cards & Runes
|
||||||
if EID:getModDescription(__eidItemDescriptions,closest.SubType) then
|
if HasCurseBlind() and EIDConfig["DisableOnCurse"] then
|
||||||
|
renderQuestionMark()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if EID:getModDescription(__eidItemDescriptions, closest.SubType) then
|
||||||
local tranformation = "0"
|
local tranformation = "0"
|
||||||
if EID:getModDescription(__eidItemTransformations,closest.SubType) then
|
if EID:getModDescription(__eidItemTransformations, closest.SubType) then
|
||||||
tranformation = EID:getModDescription(__eidItemTransformations,closest.SubType)
|
tranformation = EID:getModDescription(__eidItemTransformations, closest.SubType)
|
||||||
end
|
end
|
||||||
printDescription({closest.SubType,tranformation,EID:getModDescription(__eidItemDescriptions,closest.SubType)})
|
printDescription({closest.SubType, tranformation, EID:getModDescription(__eidItemDescriptions, closest.SubType)})
|
||||||
elseif closest.SubType <= 552 then
|
elseif closest.SubType <= 552 then
|
||||||
if EID:getModDescription(__eidItemTransformations,closest.SubType) then
|
if EID:getModDescription(__eidItemTransformations, closest.SubType) then
|
||||||
printDescription({closest.SubType,EID:getModDescription(__eidItemTransformations,closest.SubType),descriptarray[closest.SubType][3]})
|
printDescription(
|
||||||
|
{
|
||||||
|
closest.SubType,
|
||||||
|
EID:getModDescription(__eidItemTransformations, closest.SubType),
|
||||||
|
descriptarray[closest.SubType][3]
|
||||||
|
}
|
||||||
|
)
|
||||||
else
|
else
|
||||||
printDescription(descriptarray[closest.SubType])
|
printDescription(descriptarray[closest.SubType])
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
printDescription({closest.SubType,"",itemConfig:GetCollectible(closest.SubType).Description})
|
printDescription({closest.SubType, "", itemConfig:GetCollectible(closest.SubType).Description})
|
||||||
end
|
end
|
||||||
--Handle Cards & Runes
|
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_TAROTCARD then
|
--Handle Pills
|
||||||
if closest:ToPickup():IsShopItem() and not EIDConfig["DisplayCardInfoShop"] then renderQuestionMark() return end
|
if closest:ToPickup():IsShopItem() and not EIDConfig["DisplayCardInfoShop"] then
|
||||||
if EID:getModDescription(__eidCardDescriptions,closest.SubType) then
|
renderQuestionMark()
|
||||||
printTrinketDescription({closest.SubType,EID:getModDescription(__eidCardDescriptions,closest.SubType)},"card")
|
return
|
||||||
|
end
|
||||||
|
if EID:getModDescription(__eidCardDescriptions, closest.SubType) then
|
||||||
|
printTrinketDescription({closest.SubType, EID:getModDescription(__eidCardDescriptions, closest.SubType)}, "card")
|
||||||
elseif closest.SubType <= 54 then
|
elseif closest.SubType <= 54 then
|
||||||
printTrinketDescription(cardDescriptions[closest.SubType],"card")
|
printTrinketDescription(cardDescriptions[closest.SubType], "card")
|
||||||
CardSprite:Play(tostring(closest.SubType))
|
CardSprite:Play(tostring(closest.SubType))
|
||||||
CardSprite.Scale = Vector(EIDConfig["Scale"],EIDConfig["Scale"])
|
CardSprite.Scale = Vector(EIDConfig["Scale"], EIDConfig["Scale"])
|
||||||
CardSprite:Update()
|
CardSprite:Update()
|
||||||
local offsetX = 0
|
local offsetX = 0
|
||||||
if EIDConfig["ShowItemName"] then offsetX = 10 end
|
if EIDConfig["ShowItemName"] then
|
||||||
CardSprite:Render(Vector(EIDConfig["XPosition"]-9*EIDConfig["Scale"],posY()+(12+offsetX)*EIDConfig["Scale"]), Vector(0,0), Vector(0,0))
|
offsetX = 10
|
||||||
|
end
|
||||||
|
CardSprite:Render(
|
||||||
|
Vector(EIDConfig["XPosition"] - 9 * EIDConfig["Scale"], posY() + (12 + offsetX) * EIDConfig["Scale"]),
|
||||||
|
Vector(0, 0),
|
||||||
|
Vector(0, 0)
|
||||||
|
)
|
||||||
else
|
else
|
||||||
printTrinketDescription({closest.SubType,itemConfig:GetCard(closest.SubType).Description})
|
printTrinketDescription({closest.SubType, itemConfig:GetCard(closest.SubType).Description})
|
||||||
|
end
|
||||||
|
elseif closest.Variant == PickupVariant.PICKUP_PILL then
|
||||||
|
if closest:ToPickup():IsShopItem() and not EIDConfig["DisplayPillInfoShop"] then
|
||||||
|
renderQuestionMark()
|
||||||
|
return
|
||||||
end
|
end
|
||||||
--Handle Pills
|
|
||||||
elseif closest.Variant == PickupVariant.PICKUP_PILL then
|
|
||||||
if closest:ToPickup():IsShopItem() and not EIDConfig["DisplayPillInfoShop"] then renderQuestionMark() return end
|
|
||||||
|
|
||||||
local pillColor = closest.SubType
|
local pillColor = closest.SubType
|
||||||
local pool = Game():GetItemPool()
|
local pool = Game():GetItemPool()
|
||||||
local pillEffect = pool:GetPillEffect(pillColor)
|
local pillEffect = pool:GetPillEffect(pillColor)
|
||||||
local identified = pool:IsPillIdentified(pillColor)
|
local identified = pool:IsPillIdentified(pillColor)
|
||||||
if (identified or EIDConfig["ShowUnidentifiedPillDescriptions"]) then
|
if (identified or EIDConfig["ShowUnidentifiedPillDescriptions"]) then
|
||||||
if EID:getModDescription(__eidPillDescriptions,pillEffect) then
|
if EID:getModDescription(__eidPillDescriptions, pillEffect) then
|
||||||
printTrinketDescription({pillEffect,EID:getModDescription(__eidPillDescriptions,pillEffect)},"pill")
|
printTrinketDescription({pillEffect, EID:getModDescription(__eidPillDescriptions, pillEffect)}, "pill")
|
||||||
elseif pillEffect < 47 then
|
elseif pillEffect < 47 then
|
||||||
printTrinketDescription(pillDescriptions[pillEffect+1],"pill")
|
printTrinketDescription(pillDescriptions[pillEffect + 1], "pill")
|
||||||
else
|
else
|
||||||
EID:renderString(EIDConfig["ErrorMessage"], Vector(EIDConfig["XPosition"], posY()), Vector(EIDConfig["Scale"],EIDConfig["Scale"]), EID:getErrorColor(), false)
|
EID:renderString(
|
||||||
|
EIDConfig["ErrorMessage"],
|
||||||
|
Vector(EIDConfig["XPosition"], posY()),
|
||||||
|
Vector(EIDConfig["Scale"], EIDConfig["Scale"]),
|
||||||
|
EID:getErrorColor(),
|
||||||
|
false
|
||||||
|
)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
EID:renderString(unidentifiedPillMessage, Vector(EIDConfig["XPosition"], posY()), Vector(EIDConfig["Scale"],EIDConfig["Scale"]), EID:getErrorColor(), false)
|
EID:renderString(
|
||||||
|
unidentifiedPillMessage,
|
||||||
|
Vector(EIDConfig["XPosition"], posY()),
|
||||||
|
Vector(EIDConfig["Scale"], EIDConfig["Scale"]),
|
||||||
|
EID:getErrorColor(),
|
||||||
|
false
|
||||||
|
)
|
||||||
end
|
end
|
||||||
local pillsprite = closest:GetSprite()
|
local pillsprite = closest:GetSprite()
|
||||||
pillsprite.Scale = Vector(EIDConfig["Scale"]*0.75,EIDConfig["Scale"]*0.75)
|
pillsprite.Scale = Vector(EIDConfig["Scale"] * 0.75, EIDConfig["Scale"] * 0.75)
|
||||||
pillsprite:Update()
|
pillsprite:Update()
|
||||||
local offsetX = 0
|
local offsetX = 0
|
||||||
if EIDConfig["ShowItemName"] and (identified or EIDConfig["ShowUnidentifiedPillDescriptions"]) then offsetX = 10 end
|
if EIDConfig["ShowItemName"] and (identified or EIDConfig["ShowUnidentifiedPillDescriptions"]) then
|
||||||
pillsprite:Render(Vector(EIDConfig["XPosition"]+2*EIDConfig["Scale"],posY()+(11+offsetX)*EIDConfig["Scale"]), Vector(0,0), Vector(0,0))
|
offsetX = 10
|
||||||
pillsprite.Scale = Vector(1,1)
|
end
|
||||||
end
|
pillsprite:Render(
|
||||||
if player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then modifiedPosY =EIDConfig["YPosition"] +30 end
|
Vector(EIDConfig["XPosition"] + 2 * EIDConfig["Scale"], posY() + (11 + offsetX) * EIDConfig["Scale"]),
|
||||||
|
Vector(0, 0),
|
||||||
|
Vector(0, 0)
|
||||||
|
)
|
||||||
|
pillsprite.Scale = Vector(1, 1)
|
||||||
|
end
|
||||||
|
if player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then
|
||||||
|
modifiedPosY = EIDConfig["YPosition"] + 30
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
EID:AddCallback(ModCallbacks.MC_POST_RENDER, onRender)
|
EID:AddCallback(ModCallbacks.MC_POST_RENDER, onRender)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ModConfigMenu then
|
if ModConfigMenu then
|
||||||
local json = require("json")
|
local json = require("json")
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--------Handle Savadata---------
|
--------Handle Savadata---------
|
||||||
--------------------------------
|
--------------------------------
|
||||||
@@ -398,7 +494,9 @@ local json = require("json")
|
|||||||
savedEIDConfig["Language"] = EIDConfig["Language"]
|
savedEIDConfig["Language"] = EIDConfig["Language"]
|
||||||
-- Only copy Saved config entries that exist in the save
|
-- Only copy Saved config entries that exist in the save
|
||||||
for key, value in pairs(EIDConfig) do
|
for key, value in pairs(EIDConfig) do
|
||||||
if savedEIDConfig[key]~=nil then EIDConfig[key]=savedEIDConfig[key] end
|
if savedEIDConfig[key] ~= nil then
|
||||||
|
EIDConfig[key] = savedEIDConfig[key]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+352
-286
@@ -1,334 +1,400 @@
|
|||||||
if ModConfigMenu then
|
if ModConfigMenu then
|
||||||
|
function AnIndexOf(t, val)
|
||||||
function AnIndexOf(t,val)
|
for k, v in ipairs(t) do
|
||||||
for k,v in ipairs(t) do
|
if v == val then
|
||||||
if v == val then return k end
|
return k
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
ModConfigMenu.AddText("EID", "General", "Change Language in the Config file.")
|
ModConfigMenu.AddText("EID", "General", "Change Language in the Config file.")
|
||||||
ModConfigMenu.AddSpace("EID", "General")
|
ModConfigMenu.AddSpace("EID", "General")
|
||||||
|
|
||||||
-- Disable on Curse
|
-- Disable on Curse
|
||||||
ModConfigMenu.AddSetting("EID","General", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"General",
|
||||||
return EIDConfig["DisableOnCurse"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "True"
|
return EIDConfig["DisableOnCurse"]
|
||||||
if EIDConfig["DisableOnCurse"] then
|
end,
|
||||||
onOff = "False"
|
Display = function()
|
||||||
|
local onOff = "True"
|
||||||
|
if EIDConfig["DisableOnCurse"] then
|
||||||
|
onOff = "False"
|
||||||
|
end
|
||||||
|
return 'Show on "Curse of Blind": ' .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisableOnCurse"] = currentBool
|
||||||
end
|
end
|
||||||
return "Show on \"Curse of Blind\": " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["DisableOnCurse"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
--indicator
|
--indicator
|
||||||
local indicators= {"arrow","blink","border","highlight","none"}
|
local indicators = {"arrow", "blink", "border", "highlight", "none"}
|
||||||
ModConfigMenu.AddSetting("EID", "General", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.NUMBER,
|
"EID",
|
||||||
CurrentSetting = function()
|
"General",
|
||||||
return AnIndexOf(indicators,EIDConfig["Indicator"])
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.NUMBER,
|
||||||
Minimum = 1,
|
CurrentSetting = function()
|
||||||
Maximum = 5,
|
return AnIndexOf(indicators, EIDConfig["Indicator"])
|
||||||
Display = function()
|
end,
|
||||||
return "Indicator: " .. EIDConfig["Indicator"]
|
Minimum = 1,
|
||||||
end,
|
Maximum = 5,
|
||||||
OnChange = function(currentNum)
|
Display = function()
|
||||||
EIDConfig["Indicator"] = indicators[currentNum]
|
return "Indicator: " .. EIDConfig["Indicator"]
|
||||||
|
end,
|
||||||
end,
|
OnChange = function(currentNum)
|
||||||
})
|
EIDConfig["Indicator"] = indicators[currentNum]
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
--------ShowUnidentifiedPillDescriptions---------
|
--------ShowUnidentifiedPillDescriptions---------
|
||||||
ModConfigMenu.AddSetting("EID","General", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"General",
|
||||||
return EIDConfig["ShowUnidentifiedPillDescriptions"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["ShowUnidentifiedPillDescriptions"]
|
||||||
if EIDConfig["ShowUnidentifiedPillDescriptions"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["ShowUnidentifiedPillDescriptions"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Show Unidentified Pilleffects: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["ShowUnidentifiedPillDescriptions"] = currentBool
|
||||||
end
|
end
|
||||||
return "Show Unidentified Pilleffects: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["ShowUnidentifiedPillDescriptions"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
--------Sacrifice Room---------
|
--------Sacrifice Room---------
|
||||||
ModConfigMenu.AddSetting("EID","Rooms", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Rooms",
|
||||||
return EIDConfig["DisplaySacrificeInfo"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["DisplaySacrificeInfo"]
|
||||||
if EIDConfig["DisplaySacrificeInfo"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["DisplaySacrificeInfo"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Sacrifice Room Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplaySacrificeInfo"] = currentBool
|
||||||
end
|
end
|
||||||
return "Sacrifice Room Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["DisplaySacrificeInfo"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
--------Dice Room---------
|
--------Dice Room---------
|
||||||
ModConfigMenu.AddSetting("EID","Rooms", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Rooms",
|
||||||
return EIDConfig["DisplayDiceInfo"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["DisplayDiceInfo"]
|
||||||
if EIDConfig["DisplayDiceInfo"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["DisplayDiceInfo"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Dice Room Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplayDiceInfo"] = currentBool
|
||||||
end
|
end
|
||||||
return "Dice Room Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["DisplayDiceInfo"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
------------Collectibles--------------
|
||||||
|
|
||||||
------------Collectibles--------------
|
ModConfigMenu.AddSetting(
|
||||||
|
"EID",
|
||||||
ModConfigMenu.AddSetting("EID","General", {
|
"General",
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
{
|
||||||
CurrentSetting = function()
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
return EIDConfig["DisplayItemInfo"]
|
CurrentSetting = function()
|
||||||
end,
|
return EIDConfig["DisplayItemInfo"]
|
||||||
Display = function()
|
end,
|
||||||
local onOff = "False"
|
Display = function()
|
||||||
if EIDConfig["DisplayItemInfo"] then
|
local onOff = "False"
|
||||||
onOff = "True"
|
if EIDConfig["DisplayItemInfo"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Collectible Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplayItemInfo"] = currentBool
|
||||||
end
|
end
|
||||||
return "Collectible Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
------------Trinkets--------------
|
||||||
EIDConfig["DisplayItemInfo"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
------------Trinkets--------------
|
|
||||||
|
|
||||||
ModConfigMenu.AddSetting("EID","General", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"General",
|
||||||
return EIDConfig["DisplayTrinketInfo"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["DisplayTrinketInfo"]
|
||||||
if EIDConfig["DisplayTrinketInfo"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["DisplayTrinketInfo"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Trinket Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplayTrinketInfo"] = currentBool
|
||||||
end
|
end
|
||||||
return "Trinket Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
------------CARDS--------------
|
||||||
EIDConfig["DisplayTrinketInfo"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
------------CARDS--------------
|
|
||||||
|
|
||||||
ModConfigMenu.AddSetting("EID","General", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"General",
|
||||||
return EIDConfig["DisplayCardInfo"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["DisplayCardInfo"]
|
||||||
if EIDConfig["DisplayCardInfo"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["DisplayCardInfo"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Card Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplayCardInfo"] = currentBool
|
||||||
end
|
end
|
||||||
return "Card Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["DisplayCardInfo"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
------------PILLS--------------
|
------------PILLS--------------
|
||||||
ModConfigMenu.AddSetting("EID","General", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"General",
|
||||||
return EIDConfig["DisplayPillInfo"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["DisplayPillInfo"]
|
||||||
if EIDConfig["DisplayPillInfo"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["DisplayPillInfo"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Pill Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplayPillInfo"] = currentBool
|
||||||
end
|
end
|
||||||
return "Pill Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["DisplayPillInfo"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ModConfigMenu.AddSpace("EID", "Rooms")
|
ModConfigMenu.AddSpace("EID", "Rooms")
|
||||||
ModConfigMenu.AddText("EID", "Rooms", "Display Infos in Shops")
|
ModConfigMenu.AddText("EID", "Rooms", "Display Infos in Shops")
|
||||||
------------CARDS--------------
|
------------CARDS--------------
|
||||||
|
|
||||||
ModConfigMenu.AddSetting("EID","Rooms", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Rooms",
|
||||||
return EIDConfig["DisplayCardInfoShop"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["DisplayCardInfoShop"]
|
||||||
if EIDConfig["DisplayCardInfoShop"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["DisplayCardInfoShop"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Card Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplayCardInfoShop"] = currentBool
|
||||||
end
|
end
|
||||||
return "Card Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["DisplayCardInfoShop"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
------------PILLS--------------
|
------------PILLS--------------
|
||||||
ModConfigMenu.AddSetting("EID","Rooms", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Rooms",
|
||||||
return EIDConfig["DisplayPillInfoShop"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["DisplayPillInfoShop"]
|
||||||
if EIDConfig["DisplayPillInfoShop"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["DisplayPillInfoShop"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Pill Infos: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["DisplayPillInfoShop"] = currentBool
|
||||||
end
|
end
|
||||||
return "Pill Infos: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["DisplayPillInfoShop"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- SCALE
|
-- SCALE
|
||||||
local textScales= {0.5,0.75,1,1.25,1.5,2}
|
local textScales = {0.5, 0.75, 1, 1.25, 1.5, 2}
|
||||||
ModConfigMenu.AddSetting("EID", "Display", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.NUMBER,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Display",
|
||||||
return AnIndexOf(textScales,EIDConfig["Scale"])
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.NUMBER,
|
||||||
Minimum = 1,
|
CurrentSetting = function()
|
||||||
Maximum = 6,
|
return AnIndexOf(textScales, EIDConfig["Scale"])
|
||||||
Display = function()
|
end,
|
||||||
return "Text Size: " .. EIDConfig["Scale"]
|
Minimum = 1,
|
||||||
end,
|
Maximum = 6,
|
||||||
OnChange = function(currentNum)
|
Display = function()
|
||||||
EIDConfig["Scale"] = textScales[currentNum]
|
return "Text Size: " .. EIDConfig["Scale"]
|
||||||
|
end,
|
||||||
end,
|
OnChange = function(currentNum)
|
||||||
})
|
EIDConfig["Scale"] = textScales[currentNum]
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
-- maxDistance
|
-- maxDistance
|
||||||
local distances={1,1.5,2,3,4,5,6,7,8,9,10}
|
local distances = {1, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
||||||
ModConfigMenu.AddSetting("EID", "Display", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.SCROLL,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Display",
|
||||||
return AnIndexOf(distances,EIDConfig["MaxDistance"])-1
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.SCROLL,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
return "Display Distance: $scroll" .. AnIndexOf(distances,EIDConfig["MaxDistance"])-1 .." "..EIDConfig["MaxDistance"].." Grids"
|
return AnIndexOf(distances, EIDConfig["MaxDistance"]) - 1
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
Display = function()
|
||||||
EIDConfig["MaxDistance"]= distances[currentNum+1]
|
return "Display Distance: $scroll" ..
|
||||||
end
|
AnIndexOf(distances, EIDConfig["MaxDistance"]) - 1 .. " " .. EIDConfig["MaxDistance"] .. " Grids"
|
||||||
})
|
end,
|
||||||
|
OnChange = function(currentNum)
|
||||||
|
EIDConfig["MaxDistance"] = distances[currentNum + 1]
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
-- Transparency
|
-- Transparency
|
||||||
local transparencies={0.1,0.175,0.25,0.3,0.4,0.5,0.6,0.75,0.8,0.9,1}
|
local transparencies = {0.1, 0.175, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 0.9, 1}
|
||||||
ModConfigMenu.AddSetting("EID", "Display", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.SCROLL,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Display",
|
||||||
return AnIndexOf(transparencies,EIDConfig["Transparency"])-1
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.SCROLL,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
return "Transparency: $scroll" .. AnIndexOf(transparencies,EIDConfig["Transparency"])-1 .." "..EIDConfig["Transparency"]
|
return AnIndexOf(transparencies, EIDConfig["Transparency"]) - 1
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
Display = function()
|
||||||
EIDConfig["Transparency"]= transparencies[currentNum+1]
|
return "Transparency: $scroll" ..
|
||||||
end
|
AnIndexOf(transparencies, EIDConfig["Transparency"]) - 1 .. " " .. EIDConfig["Transparency"]
|
||||||
})
|
end,
|
||||||
|
OnChange = function(currentNum)
|
||||||
|
EIDConfig["Transparency"] = transparencies[currentNum + 1]
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
--------ShowItemName---------
|
--------ShowItemName---------
|
||||||
ModConfigMenu.AddSetting("EID","Display", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Display",
|
||||||
return EIDConfig["ShowItemName"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["ShowItemName"]
|
||||||
if EIDConfig["ShowItemName"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["ShowItemName"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Display Item Name: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["ShowItemName"] = currentBool
|
||||||
end
|
end
|
||||||
return "Display Item Name: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["ShowItemName"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
--------ShowItemType---------
|
--------ShowItemType---------
|
||||||
ModConfigMenu.AddSetting("EID","Display", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Display",
|
||||||
return EIDConfig["ShowItemType"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["ShowItemType"]
|
||||||
if EIDConfig["ShowItemType"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["ShowItemType"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Display Item Type: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["ShowItemType"] = currentBool
|
||||||
end
|
end
|
||||||
return "Display Item Type: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
-------TRANSFORMATIONS---------
|
||||||
EIDConfig["ShowItemType"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
-------TRANSFORMATIONS---------
|
|
||||||
|
|
||||||
ModConfigMenu.AddSetting("EID","Display", {
|
ModConfigMenu.AddSetting(
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
"EID",
|
||||||
CurrentSetting = function()
|
"Display",
|
||||||
return EIDConfig["TransformationText"]
|
{
|
||||||
end,
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Display = function()
|
CurrentSetting = function()
|
||||||
local onOff = "False"
|
return EIDConfig["TransformationText"]
|
||||||
if EIDConfig["TransformationText"] then
|
end,
|
||||||
onOff = "True"
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EIDConfig["TransformationText"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Display Transformation Name: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["TransformationText"] = currentBool
|
||||||
end
|
end
|
||||||
return "Display Transformation Name: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
ModConfigMenu.AddSetting(
|
||||||
EIDConfig["TransformationText"] = currentBool
|
"EID",
|
||||||
end,
|
"Display",
|
||||||
})
|
{
|
||||||
ModConfigMenu.AddSetting("EID","Display", {
|
Type = ModConfigMenuOptionType.BOOLEAN,
|
||||||
Type = ModConfigMenuOptionType.BOOLEAN,
|
CurrentSetting = function()
|
||||||
CurrentSetting = function()
|
return EIDConfig["TransformationIcons"]
|
||||||
return EIDConfig["TransformationIcons"]
|
end,
|
||||||
end,
|
Display = function()
|
||||||
Display = function()
|
local onOff = "False"
|
||||||
local onOff = "False"
|
if EIDConfig["TransformationIcons"] then
|
||||||
if EIDConfig["TransformationIcons"] then
|
onOff = "True"
|
||||||
onOff = "True"
|
end
|
||||||
|
return "Display Transformation Icon: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EIDConfig["TransformationIcons"] = currentBool
|
||||||
end
|
end
|
||||||
return "Display Transformation Icon: " .. onOff
|
}
|
||||||
end,
|
)
|
||||||
OnChange = function(currentBool)
|
|
||||||
EIDConfig["TransformationIcons"] = currentBool
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user