feat: personal fork section 1 - slim fonts, Russian MCM labels, render fault containment

This commit is contained in:
lzrdblzzrd committed 2026-09-21 17:38:29 +03:00
1 parent 276232ef74
commit 88d2ba6154
5 files changed
+279 -506733

No files matched your search

+250 -115
View File
@@ -141,9 +141,141 @@ function EID:buildColorArray()
table.sort(colorNameArray)
end
-- Personal fork: Russian MCM labels. Option names are translated lazily
-- (when the menu is opened), category names once at menu registration.
-- Anything missing from the dictionary falls back to English.
EID.MCM_RU_Labels = {
-- Categories
["General"] = "Общее",
["Display"] = "Отображение",
["Visuals"] = "Внешний вид",
["Colors"] = "Цвета",
["Crafting"] = "Крафт",
["Reminder"] = "Напоминания",
["Mouse"] = "Мышь",
["Save Game"] = "Сохранения",
["Info"] = "Информация",
-- Booleans
["True"] = "Вкл",
["False"] = "Выкл",
-- Display options
["Multiple descriptions"] = "Несколько описаний",
["Max Descriptions"] = "Максимум описаний",
["Max Distance"] = "Макс. дистанция",
["Show Item Info"] = "Информация об артефактах",
["Show Trinket Info"] = "Информация о брелоках",
["Show Card Info"] = "Информация о картах",
["Show Pill Info"] = "Информация о пилюлях",
["Show Unreachable Card Info"] = "Инфо о недоступных картах",
["Show Unreachable Pill Info"] = "Инфо о недоступных пилюлях",
["Show Unreachable Soulstone Info"] = "Инфо о недоступных камнях душ",
["Show Crane Game Info"] = "Инфо о кран-автомате",
["Show Dice Room Info"] = "Инфо о комнатах кубика",
["Show Flip Item Descriptions"] = "Описания второго артефакта Flip",
["Show Glitched Item Info"] = "Инфо о глитч-артефактах",
["Show Glitched Crown Summary"] = "Сводка Глитч-короны",
["Show Sacrifice Room Info"] = "Инфо о комнате жертвоприношений",
["Show Sanguine Bond Info"] = "Инфо о Кровавых узах",
["Show Void Stat Increases"] = "Прирост статов от Бездны",
["Show Tainted Cain Salvage Results"] = "Результаты разбора Порченого Каина",
["Show pill effect after one use"] = "Эффект пилюли после 1 использования",
["Show Unidentified Pill Effects"] = "Эффекты неопознанных пилюль",
["Show Hidden Alt-Path Item"] = "Скрытый артефакт альт-пути",
["Show on April Fools Challenge"] = "Показ в челлендже «День дурака»",
["Show Hidden Information"] = "Показывать скрытую информацию",
["Show Item Names"] = "Показывать названия артефактов",
["Show Controls"] = "Показывать управление",
["Show Recipes/Best Bag as"] = "Рецепты/лучшая сумка в виде",
["Show Display"] = "Показывать дисплей",
["Show RNG Predictions"] = "Показывать RNG-предсказания",
["Start of Run Warnings"] = "Предупреждения в начале забега",
["Co-op Player Descriptions"] = "Описания для коопа",
["Paired Player Descriptions"] = "Описания парных игроков",
["Predict Sanguine Bond Result"] = "Предсказание Кровавых уз",
["Always show with flight"] = "Всегда показывать при полёте",
["Hide in Battle"] = "Скрывать в бою",
["Is Initially Hidden"] = "Скрыто изначально",
["Hide uncollected items"] = "Скрывать несобранные артефакты",
["Highlight uncollected items"] = "Подсвечивать несобранные артефакты",
["Show descriptions on collection page"] = "Описания на странице коллекции",
["Donation machine progress"] = "Прогресс автомата пожертвований",
["Display IDs"] = "Показывать ID",
["Display Names"] = "Показывать названия",
["Skip Locked Items"] = "Пропускать закрытые артефакты",
["Preview rerolls"] = "Предпросмотр рероллов",
["Display ID"] = "Показывать ID",
["Display Name"] = "Показывать название",
["Display Description"] = "Показывать описание",
["Display Icon"] = "Показывать иконку",
["Display Type"] = "Показывать тип",
["Display Quality"] = "Показывать качество",
["Display Transformation Icon"] = "Иконка трансформации",
["Display Transformation Progress"] = "Прогресс трансформации",
["Display Transformation Name"] = "Название трансформации",
["Dynamic Health Up Text"] = "Динамический текст о здоровье",
["Item Pool Info"] = "Информация о пуле",
["Current Item Pool Icon"] = "Иконка текущего пула",
["Current Item Pool Name"] = "Название текущего пула",
["Stat Change Icons"] = "Иконки изменения статов",
["Stat/Pickup Bulletpoint Icons"] = "Маркеры статов/подбираемых предметов",
["Local Mode Centered"] = "Локальный режим по центру",
["Purchaseable Card Info"] = "Инфо о картах в продаже",
["Purchaseable Pill Info"] = "Инфо о пилюлях в продаже",
["Purchaseable Soulstone Info"] = "Инфо о камнях душ в продаже",
["'Options?' Card Info"] = "Инфо о картах для «Options?»",
["'Options?' Pill Info"] = "Инфо о пилюлях для «Options?»",
["Item Reminder"] = "Напоминание об артефактах",
["Disable Player Inputs"] = "Отключить управление игроком",
["Max Entries"] = "Максимум записей",
["Overview crop after X rows"] = "Обрезка обзора после X строк",
["Navigate Up"] = "Навигация вверх",
["Navigate Down"] = "Навигация вниз",
["Navigate Left"] = "Навигация влево",
["Navigate Right"] = "Навигация вправо",
["Hold to Show"] = "Удерживать для показа",
-- Numbers / scroll / hotkeys
["Display Mode"] = "Режим отображения",
["Indicator"] = "Индикатор",
["Line Height"] = "Высота строк",
["Text Size"] = "Размер текста",
["Text Size (Local Mode)"] = "Размер текста (локальный режим)",
["Markup Icon Size"] = "Размер иконок разметки",
["Textbox Width"] = "Ширина текстового окна",
["Opacity"] = "Прозрачность",
["Position X"] = "Позиция X",
["Position Y"] = "Позиция Y",
["Display Mod Indicator"] = "Индикатор мода",
["Description Refresh Rate"] = "Частота обновления описаний",
["Name Language"] = "Язык названий",
["Toggle (Keyboard)"] = "Переключение (клавиатура)",
["Toggle (Controller)"] = "Переключение (геймпад)",
["Colorblind Mode"] = "Режим дальтонизма",
["Thorough Calculations"] = "Тщательные расчёты",
["Random Calculations"] = "Случайные расчёты",
["Recipes to Display"] = "Рецептов на экране",
["Sort Recipes by"] = "Сортировка рецептов",
-- Custom labels
["Font Type"] = "Тип шрифта",
["Language"] = "Язык",
["Highlight color"] = "Цвет подсветки",
["Collection Page Highlight color"] = "Цвет подсветки страницы коллекции",
["Current Save Game"] = "Текущее сохранение",
["Recipe List Options"] = "Опции списка рецептов",
}
---@param text string English label
---@return string label in Russian when EID language is Russian, English otherwise
function EID.MCMTr(text)
if EID:getLanguage() == "ru" and EID.MCM_RU_Labels[text] ~= nil then
return EID.MCM_RU_Labels[text]
end
return text
end
function EID:AddBooleanSetting(category, optionName, displayText, params)
if type(params) ~= "table" then params = {} end
if params.repOnly and not EID.isRepentance then return end
category = EID.MCMTr(category)
MCM.AddSetting(
"EID", category,
{
@@ -153,11 +285,11 @@ function EID:AddBooleanSetting(category, optionName, displayText, params)
end,
Display = params.displayFunc or function()
if params.displayingTab then EID.MCMCompat_isDisplayingEIDTab = params.displayingTab end
local onOff = params.offText or "False"
local onOff = params.offText or EID.MCMTr("False")
if EID.Config[optionName] then
onOff = params.onText or "True"
onOff = params.onText or EID.MCMTr("True")
end
return displayText .. ": " .. onOff
return EID.MCMTr(displayText) .. ": " .. onOff
end,
OnChange = params.onChangeFunc or function(currentBool)
EID.Config[optionName] = currentBool
@@ -171,6 +303,7 @@ end
function EID:AddNumberSetting(category, optionName, displayText, minimum, maximum, params)
if type(params) ~= "table" then params = {} end
if params.repOnly and not EID.isRepentance then return end
category = EID.MCMTr(category)
MCM.AddSetting(
"EID", category,
{
@@ -183,7 +316,7 @@ function EID:AddNumberSetting(category, optionName, displayText, minimum, maximu
ModifyBy = params.modifyBy or 1,
Display = params.displayFunc or function()
if params.displayingTab then EID.MCMCompat_isDisplayingEIDTab = params.displayingTab end
return displayText .. ": " .. ((params.displayTable and params.displayTable[EID.Config[optionName]]) or EID.Config[optionName])
return EID.MCMTr(displayText) .. ": " .. ((params.displayTable and params.displayTable[EID.Config[optionName]]) or EID.Config[optionName])
end,
OnChange = params.onChangeFunc or function(currentNum)
EID.Config[optionName] = (params.indexOf and params.indexOf[currentNum]) or currentNum
@@ -197,6 +330,7 @@ end
function EID:AddScrollSetting(category, optionName, displayText, scrollTable, params)
if type(params) ~= "table" then params = {} end
if params.repOnly and not EID.isRepentance then return end
category = EID.MCMTr(category)
MCM.AddSetting(
"EID", category,
{
@@ -206,7 +340,7 @@ function EID:AddScrollSetting(category, optionName, displayText, scrollTable, pa
end,
Display = params.displayFunc or function()
if params.displayingTab then EID.MCMCompat_isDisplayingEIDTab = params.displayingTab end
return displayText .. ": $scroll" .. (AnIndexOf(scrollTable, EID.Config[optionName]) - 1) .. " " ..
return EID.MCMTr(displayText) .. ": $scroll" .. (AnIndexOf(scrollTable, EID.Config[optionName]) - 1) .. " " ..
EID.Config[optionName] .. (params.label or "")
end,
OnChange = params.onChangeFunc or function(currentNum)
@@ -220,6 +354,7 @@ end
function EID:AddHotkeySetting(category, optionName, displayText, infoText, isController)
if (type(infoText) == "string") then infoText = {infoText} end
category = EID.MCMTr(category)
local optionType = ModConfigMenu.OptionType.KEYBIND_KEYBOARD
local hotkeyToString = InputHelper.KeyboardToString
local deviceString = "keyboard"
@@ -241,7 +376,7 @@ function EID:AddHotkeySetting(category, optionName, displayText, infoText, isCon
Display = function()
local key = "None"
if (hotkeyToString[EID.Config[optionName]]) then key = hotkeyToString[EID.Config[optionName]] end
return displayText .. ": " .. key
return EID.MCMTr(displayText) .. ": " .. key
end,
OnChange = function(currentNum)
EID.Config[optionName] = currentNum or -1
@@ -277,16 +412,16 @@ if MCMLoaded then
---------------------------------------------------------------------------
-----------------------------------Info------------------------------------
MCM.AddSpace("EID", "Info")
MCM.AddText("EID", "Info", function() return "External Item Descriptions" end)
MCM.AddSpace("EID", "Info")
MCM.AddText("EID", "Info", function() return "Version "..string.format("%.2f", EID.ModVersion) .."_"..EID.ModVersionCommit.." ("..EID.GameVersion..")" end)
MCM.AddSpace("EID", "Info")
MCM.AddText("EID", "Info", function() return "by Wofsauge" end)
MCM.AddSpace("EID", "Info")
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~~~~~~~~~~~~~~~~~~~~~~~" or "" end)
MCM.AddText("EID", "Info", function() return EID.isHidden and"~~~~~ CURRENTLY HIDDEN! ~~~~~" or "" end)
MCM.AddText("EID", "Info", function()
MCM.AddSpace("EID", EID.MCMTr("Info"))
MCM.AddText("EID", EID.MCMTr("Info"), function() return "External Item Descriptions" end)
MCM.AddSpace("EID", EID.MCMTr("Info"))
MCM.AddText("EID", EID.MCMTr("Info"), function() return "Version "..string.format("%.2f", EID.ModVersion) .."_"..EID.ModVersionCommit.." ("..EID.GameVersion..")" end)
MCM.AddSpace("EID", EID.MCMTr("Info"))
MCM.AddText("EID", EID.MCMTr("Info"), function() return "by Wofsauge" end)
MCM.AddSpace("EID", EID.MCMTr("Info"))
MCM.AddText("EID", EID.MCMTr("Info"), function() return EID.isHidden and"~~~~~~~~~~~~~~~~~~~~~~~~~~~" or "" end)
MCM.AddText("EID", EID.MCMTr("Info"), function() return EID.isHidden and"~~~~~ CURRENTLY HIDDEN! ~~~~~" or "" end)
MCM.AddText("EID", EID.MCMTr("Info"), function()
EID.MCMCompat_isDisplayingEIDTab = ""
if EID.Config["HideKey"] ~= -1 or EID.Config["HideButton"] ~= -1 then
local hotkeyString = InputHelper.KeyboardToString[EID.Config["HideKey"]] or InputHelper.ControllerToString[EID.Config["HideButton"]]
@@ -299,10 +434,10 @@ if MCMLoaded then
---------------------------------------------------------------------------
---------------------------------General-----------------------------------
-- Language
MCM.AddText("EID", "General", "Language")
MCM.AddText("EID", EID.MCMTr("General"), "Language")
MCM.AddSetting(
"EID",
"General",
EID.MCMTr("General"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -317,9 +452,9 @@ if MCMLoaded then
Display = function()
EID.MCMCompat_isDisplayingEIDTab = "General"
if EID.Config["Language"] == "auto" then
return "Language: Auto (" .. displayLanguage[AnIndexOf(EID.Languages, EID:getLanguage())] .. ")"
return EID.MCMTr("Language") .. ": Auto (" .. displayLanguage[AnIndexOf(EID.Languages, EID:getLanguage())] .. ")"
else
return "Language: " .. displayLanguage[AnIndexOf(EID.Languages, EID.Config["Language"])]
return EID.MCMTr("Language") .. ": " .. displayLanguage[AnIndexOf(EID.Languages, EID.Config["Language"])]
end
end,
OnChange = function(currentNum)
@@ -344,8 +479,8 @@ if MCMLoaded then
EID:AddNumberSetting("General", "TranslateItemName", "Name Language", 1, 3, {displayTable = translateStates,
infoText = {"Displays item, trinket and character names in a different language than descriptions."}})
MCM.AddSpace("EID", "General")
MCM.AddText("EID", "General", "Keybinds")
MCM.AddSpace("EID", EID.MCMTr("General"))
MCM.AddText("EID", EID.MCMTr("General"), "Keybinds")
-- Hide Keys
EID:AddHotkeySetting("General", "HideKey", "Toggle (Keyboard)",
@@ -353,8 +488,8 @@ if MCMLoaded then
EID:AddHotkeySetting("General", "HideButton", "Toggle (Controller)",
"Press this button to toggle the description display (Left Stick or Right Stick recommended; most other buttons will not work).", true)
MCM.AddSpace("EID", "General")
MCM.AddText("EID", "General", "Advanced")
MCM.AddSpace("EID", EID.MCMTr("General"))
MCM.AddText("EID", EID.MCMTr("General"), "Advanced")
local refreshRateSteps = {1, 2, 3, 4, 6, 10, 12, 15, 20, 30, 60}
EID:AddScrollSetting("General", "RefreshRate", "Description Refresh Rate", refreshRateSteps,
@@ -362,11 +497,11 @@ if MCMLoaded then
--------Reset to default
MCM.AddSpace("EID", "General")
MCM.AddSpace("EID", EID.MCMTr("General"))
MCM.AddSetting(
"EID",
"General",
EID.MCMTr("General"),
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function() return true end,
@@ -391,13 +526,13 @@ if MCMLoaded then
EID:AddBooleanSetting("Display", "DisableStartOfRunWarnings", "Start of Run Warnings", {offText = "Enabled", onText = "Disabled",
repOnly = true, infoText = "Toggles warnings for achievements being disabled, the game being outdated, and modded crafting recipes."})
if EID.isRepentance then MCM.AddSpace("EID", "Display") end
MCM.AddText("EID", "Display", "Gameplay")
if EID.isRepentance then MCM.AddSpace("EID", EID.MCMTr("Display")) end
MCM.AddText("EID", EID.MCMTr("Display"), "Gameplay")
EID:AddBooleanSetting("Display", "HideInBattle", "Hide in Battle", {displayingTab = "", infoText = "Hides descriptions when enemies are present."})
EID:AddBooleanSetting("Display", "InitiallyHidden", "Is Initially Hidden", {infoText = "Hides descriptions by default. Press the Toggle key to show them again."})
MCM.AddSpace("EID", "Display")
MCM.AddSpace("EID", EID.MCMTr("Display"))
-- maxDistance
local distances = {1, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10}
@@ -409,23 +544,23 @@ if MCMLoaded then
EID:AddScrollSetting("Display", "MaxDescriptionsToDisplay", "Max Descriptions", descsToDisplaySteps,
{infoText = "Maximum number of descriptions to display at once."})
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Description visibility")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Description visibility")
EID:AddBooleanSetting("Display", "DisplayItemInfo", "Show Item Info")
EID:AddBooleanSetting("Display", "DisplayTrinketInfo", "Show Trinket Info")
EID:AddBooleanSetting("Display", "DisplayCardInfo", "Show Card Info")
EID:AddBooleanSetting("Display", "DisplayPillInfo", "Show Pill Info")
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Special rooms")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Special rooms")
EID:AddBooleanSetting("Display", "DisplaySacrificeInfo", "Show Sacrifice Room Info", {infoText = "Displays reward chances for the next sacrifice in sacrifice rooms."})
EID:AddBooleanSetting("Display", "DisplayDiceInfo", "Show Dice Room Info", {infoText = "Displays the effect of the big dice in dice rooms."})
EID:AddBooleanSetting("Display", "DisplaySanguineInfo", "Show Sanguine Bond Info", {repOnly = true, infoText = "Displays possible Sanguine Bond rewards while in a Devil Room."})
EID:AddBooleanSetting("Display", "PredictionSanguineBond", "Predict Sanguine Bond Result", {repOnly = true, infoText = "Highlights the next Sanguine Bond reward in the description."})
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Items and Machines")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Items and Machines")
EID:AddBooleanSetting("Display", "DisplayCraneInfo", "Show Crane Game Info", {repOnly = true, infoText = "Displays the description of items in Crane Games."})
EID:AddBooleanSetting("Display", "DisplayVoidStatInfo", "Show Void Stat Increases", {infoText = "Displays the stats that would be gained by consuming a passive item."})
@@ -434,16 +569,16 @@ if MCMLoaded then
EID:AddBooleanSetting("Display", "DisplayFlipItemDescriptions", "Show Flip Item Descriptions", {repOnly = true,
infoText = "Display the effect of ghostly items, when player has the Flip item (T-Lazarus)"})
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Hidden items")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Hidden items")
EID:AddBooleanSetting("Display", "DisableOnCurse", 'Show on "Curse of the Blind"', {offText = "True", onText = "False"})
EID:AddBooleanSetting("Display", "DisableOnAprilFoolsChallenge", "Show on April Fools Challenge", {offText = "True", onText = "False"})
EID:AddBooleanSetting("Display", "DisableOnAltPath", "Show Hidden Alt-Path Item", {offText = "True", onText = "False",
repOnly = true, infoText = "Shows the description for the blind item in alt path floors."})
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Co-op")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Co-op")
EID:AddBooleanSetting("Display", "CoopDescriptions", "Co-op Player Descriptions",
{infoText = "Allows Players 2, 3, and 4 to display descriptions in co-op."})
@@ -453,8 +588,8 @@ if MCMLoaded then
local diceSteps = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
-- Spindown Dice Settings
if EID.isRepentance then
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Spindown Dice")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Spindown Dice")
end
EID:AddScrollSetting("Display", "SpindownDiceResults", "Preview rerolls", diceSteps, {repOnly = true, label = " Items",
@@ -470,8 +605,8 @@ if MCMLoaded then
EID:AddBooleanSetting("Display", "SpindownDiceSkipLocked", "Skip Locked Items",
{repOnly = true, infoText = {"The preview skips locked items, like the dice does.", "(The unlock status check is not perfect and may be wrong)"}})
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Dynamic Descriptions")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Dynamic Descriptions")
EID:AddBooleanSetting("Display", "DynamicHealthUps", "Dynamic Health Up Text",
{infoText = "Changes Health Ups and removes healing effect text when playing as a character that can't have red health"})
@@ -482,23 +617,23 @@ if MCMLoaded then
--------Obstruction---------
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Unreachable items")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Unreachable items")
EID:AddBooleanSetting("Display", "DisplayObstructedCardInfo", "Show Unreachable Card Info", {infoText = "Hides the description of cards that can't be reached without breaking or flying over obstacles."})
EID:AddBooleanSetting("Display", "DisplayObstructedPillInfo", "Show Unreachable Pill Info", {infoText = "Hides the description of pills that can't be reached without breaking or flying over obstacles."})
EID:AddBooleanSetting("Display", "DisplayObstructedSoulstoneInfo", "Show Unreachable Soulstone Info", {repOnly = true, infoText = "Hides the description of soul stones that can't be reached without breaking or flying over obstacles."})
EID:AddBooleanSetting("Display", "DisableObstructionOnFlight", "Always show with flight", {infoText = "When Isaac has flight, considers all resources reachable and displays their descriptions"})
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Pills")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Pills")
EID:AddBooleanSetting("Display", "OnlyShowPillWhenUsedAtLeastOnce", "Show pill effect after one use", {infoText = "Keeps pills unidentified until Isaac has used them at least once in the run. PHD and False PHD identify pills regardless of this setting."})
EID:AddBooleanSetting("Display", "ShowUnidentifiedPillDescriptions", "Show Unidentified Pill Effects")
-------Shop Spoilers-------
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Consumables for Sale")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Consumables for Sale")
EID:AddBooleanSetting("Display", "DisplayCardInfoShop", "Purchaseable Card Info")
EID:AddBooleanSetting("Display", "DisplayPillInfoShop", "Purchaseable Pill Info")
@@ -506,8 +641,8 @@ if MCMLoaded then
----"Options?" Spoilers----
if EID.isRepentance then
MCM.AddSpace("EID", "Display")
MCM.AddText("EID", "Display", "Interaction with 'Options?'")
MCM.AddSpace("EID", EID.MCMTr("Display"))
MCM.AddText("EID", EID.MCMTr("Display"), "Interaction with 'Options?'")
end
EID:AddBooleanSetting("Display", "DisplayCardInfoOptions?", "'Options?' Card Info", {repOnly = true})
@@ -520,12 +655,12 @@ if MCMLoaded then
local transparencies = {0.1, 0.175, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 0.9, 1}
EID:AddScrollSetting("Visuals", "Transparency", "Opacity", transparencies)
MCM.AddSpace("EID", "Visuals")
MCM.AddSpace("EID", EID.MCMTr("Visuals"))
-- Font Type
MCM.AddSetting(
"EID",
"Visuals",
EID.MCMTr("Visuals"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -535,7 +670,7 @@ if MCMLoaded then
Maximum = #fontNames,
Display = function()
EID.MCMCompat_isDisplayingEIDTab = "Visuals";
return "Font Type: " .. EID.Config["FontType"]
return EID.MCMTr("Font Type") .. ": " .. EID.Config["FontType"]
end,
OnChange = function(currentNum)
if EID:canUseFontType(fontNames[currentNum]) then
@@ -561,8 +696,8 @@ if MCMLoaded then
EID:AddNumberSetting("Visuals", "Indicator", "Indicator", 1, 5, {indexOf = indicators,
infoText = {"Changes how the item being described is marked."}})
MCM.AddSpace("EID", "Visuals")
MCM.AddText("EID", "Visuals", "Position")
MCM.AddSpace("EID", EID.MCMTr("Visuals"))
MCM.AddText("EID", EID.MCMTr("Visuals"), "Position")
-- Position / Textbox Size
EID:AddNumberSetting("Visuals", "XPosition", "Position X", 0, 500, {modifyBy = 5, infoText = "Default = 60"})
@@ -570,8 +705,8 @@ if MCMLoaded then
EID:AddNumberSetting("Visuals", "LineHeight", "Line Height", 1, 30, {infoText = "Default = 11 (varies per language)"})
EID:AddNumberSetting("Visuals", "TextboxWidth", "Textbox Width", 1, 500, {modifyBy = 5, infoText = "Default = 130 (varies per language)"})
MCM.AddSpace("EID", "Visuals")
MCM.AddText("EID", "Visuals", "Size")
MCM.AddSpace("EID", EID.MCMTr("Visuals"))
MCM.AddText("EID", EID.MCMTr("Visuals"), "Size")
-- Scale/Size
EID:AddNumberSetting("Visuals", "Size", "Text Size", 0.5, 2, {modifyBy = 0.25, onChangeFunc =
@@ -591,8 +726,8 @@ if MCMLoaded then
"SizeHotkey", "Toggle Size (Keyboard)",
{"Press this key to change the text size.", "Hold this key to smoothly change the text size."}, false)
MCM.AddSpace("EID", "Visuals")
MCM.AddText("EID", "Visuals", "Icons")
MCM.AddSpace("EID", EID.MCMTr("Visuals"))
MCM.AddText("EID", EID.MCMTr("Visuals"), "Icons")
-------Markup icon Sizes---------
local markupSizes = {"default", "big", "small"}
@@ -601,8 +736,8 @@ if MCMLoaded then
EID:AddBooleanSetting("Visuals", "StatAndPickupBulletpoints", "Stat/Pickup Bulletpoint Icons")
MCM.AddSpace("EID", "Visuals")
MCM.AddText("EID", "Visuals", "Description elements")
MCM.AddSpace("EID", EID.MCMTr("Visuals"))
MCM.AddText("EID", EID.MCMTr("Visuals"), "Description elements")
-- Simple toggles of what is shown in the title and transformation lines of a description
EID:AddBooleanSetting("Visuals", "ShowItemName", "Display Name")
@@ -629,8 +764,8 @@ if MCMLoaded then
EID:AddBooleanSetting("Reminder", "ItemReminderEnabled", "Item Reminder", {displayingTab = "",offText = "Disabled", onText = "Enabled", infoText = "Allows you to see your active item's effect, recently picked up items, and much more from anywhere"})
MCM.AddSpace("EID", "Reminder")
MCM.AddText("EID", "Reminder", "Controls")
MCM.AddSpace("EID", EID.MCMTr("Reminder"))
MCM.AddText("EID", EID.MCMTr("Reminder"), "Controls")
local actionToName = { [0] = "Move Left", "Move Right", "Move Up", "Move Down", "Shoot Left", "Shoot Right", "Shoot Up", "Shoot Down", "Bomb", "Item", "Pill/Card", "Drop", "Pause", "Map" }
EID:AddNumberSetting("Reminder", "BagOfCraftingToggleKey", "Hold to Show", 8, 13, {displayTable = actionToName,
@@ -650,8 +785,8 @@ if MCMLoaded then
local itemReminderModes = {"All", "NoOverview", "Classic"}
MCM.AddSpace("EID", "Reminder")
MCM.AddText("EID", "Reminder", "Options")
MCM.AddSpace("EID", EID.MCMTr("Reminder"))
MCM.AddText("EID", EID.MCMTr("Reminder"), "Options")
EID:AddNumberSetting("Reminder", "ItemReminderDisplayMode", "Display Mode", 1, #itemReminderModes, {indexOf = itemReminderModes, infoText = "Changes the display mode. All = Overview + categories. NoOverview = Categories only. Classic = Overview only.", onChangeFunc =
function(currentNum)
EID.MCM_OptionChanged = true
@@ -665,8 +800,8 @@ if MCMLoaded then
MCM.AddSpace("EID", "Reminder")
MCM.AddText("EID", "Reminder", "Item Descriptions")
MCM.AddSpace("EID", EID.MCMTr("Reminder"))
MCM.AddText("EID", EID.MCMTr("Reminder"), "Item Descriptions")
EID:AddNumberSetting("Reminder", "ItemReminderMaxEntriesCount", "Max Entries", 0, 10, {infoText = {"Number of descriptions that can be displayed at once in the Item Reminder."}})
EID:AddNumberSetting("Reminder", "ItemReminderOverviewHideAfterRows", "Overview crop after X rows", 1, 20, {infoText = {"Reduces the length of descriptions that are too long in the overview category."}})
@@ -689,8 +824,8 @@ if MCMLoaded then
EID:AddBooleanSetting("Crafting", "BagOfCraftingHideInBattle", "Hide in Battle", {onText = "Yes", offText = "No",
infoText = "Hides the Bag of Crafting Helper when enemies are present."})
MCM.AddSpace("EID", "Crafting")
MCM.AddText("EID", "Crafting", function() return "Recipe List Options" end)
MCM.AddSpace("EID", EID.MCMTr("Crafting"))
MCM.AddText("EID", EID.MCMTr("Crafting"), function() return EID.MCMTr("Recipe List Options") end)
-- Bag of Crafting item names
local bagSortTypes = {"Quality", "Name"}
@@ -715,8 +850,8 @@ if MCMLoaded then
EID:AddBooleanSetting("Crafting", "BagOfCraftingDisplayIcons", "Show Recipes/Best Bag as", {onText = "8 Icons", offText = "Groups",
infoText = "Toggles whether recipes are shown as grouped ingredients or always 8 icons."})
MCM.AddSpace("EID", "Crafting")
MCM.AddText("EID", "Crafting", "Controls")
MCM.AddSpace("EID", EID.MCMTr("Crafting"))
MCM.AddText("EID", EID.MCMTr("Crafting"), "Controls")
-- Bag of Crafting Show Controls
EID:AddBooleanSetting("Crafting", "BagOfCraftingShowControls", "Show Controls", {onText = "Yes", offText = "No",
@@ -737,8 +872,8 @@ if MCMLoaded then
"CraftingSearchKey", "Search (Keyboard only)",
"Press this key to start searching the recipe list.", false)
MCM.AddSpace("EID", "Crafting")
MCM.AddText("EID", "Crafting", "Advanced")
MCM.AddSpace("EID", EID.MCMTr("Crafting"))
MCM.AddText("EID", EID.MCMTr("Crafting"), "Advanced")
-- Bag of Crafting thorough recipe checks
local combSteps = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}
@@ -749,12 +884,12 @@ if MCMLoaded then
EID:AddScrollSetting("Crafting", "BagOfCraftingRandomResults", "Random Calculations", calcSteps,
{ infoText = "Checks an additional X randomly chosen recipes on each pickup spawn/despawn/refresh."})
MCM.AddSpace("EID", "Crafting")
MCM.AddSpace("EID", EID.MCMTr("Crafting"))
--------Clear bag---------
MCM.AddSetting(
"EID",
"Crafting",
EID.MCMTr("Crafting"),
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function() return true end,
@@ -768,7 +903,7 @@ if MCMLoaded then
--------Clear Floor---------
MCM.AddSetting(
"EID",
"Crafting",
EID.MCMTr("Crafting"),
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function() return true end,
@@ -788,18 +923,18 @@ if MCMLoaded then
if EID.isRepentance then
if not REPENTOGON then
-- show disclaimer, but also show available features
MCM.AddText("EID", "Repentogon", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "You need to install REPENTOGON" end)
MCM.AddText("EID", "Repentogon", "to use the following features:")
MCM.AddSpace("EID", "Repentogon")
MCM.AddText("EID", EID.MCMTr("Repentogon"), function() EID.MCMCompat_isDisplayingEIDTab = ""; return "You need to install REPENTOGON" end)
MCM.AddText("EID", EID.MCMTr("Repentogon"), "to use the following features:")
MCM.AddSpace("EID", EID.MCMTr("Repentogon"))
end
MCM.AddText("EID", "Repentogon", "Uncollected Items")
MCM.AddText("EID", EID.MCMTr("Repentogon"), "Uncollected Items")
EID:AddBooleanSetting("Repentogon", "HideUncollectedItemDescriptions", "Hide uncollected items", {displayingTab = "", infoText = "Hide descriptions of items that are not yet on the collection page."})
EID:AddBooleanSetting("Repentogon", "ItemCollectionIndicator", "Highlight uncollected items", { infoText = "Highlights items that are not yet on the collection page."})
-- Needs collection Color
MCM.AddSetting(
"EID",
"Repentogon",
EID.MCMTr("Repentogon"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -809,7 +944,7 @@ if MCMLoaded then
Maximum = 1000,
Display = function()
if EID.Config["ItemCollectionColor"] == nil then EID.Config["ItemCollectionColor"] = EID.DefaultConfig["ItemCollectionColor"] end
return "Highlight color: " .. string.gsub(EID.Config["ItemCollectionColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"]).."/"..#colorNameArray..")"
return EID.MCMTr("Highlight color") .. ": " .. string.gsub(EID.Config["ItemCollectionColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"]).."/"..#colorNameArray..")"
end,
OnChange = function(currentNum)
EID.MCM_OptionChanged = true
@@ -820,26 +955,26 @@ if MCMLoaded then
Info = {"Highlight color for the names of items that need to be picked up for the collection page."}
}
)
MCM.AddSpace("EID", "Repentogon")
MCM.AddSpace("EID", EID.MCMTr("Repentogon"))
EID:AddBooleanSetting("Repentogon", "RGON_ShowOnCollectionPage", "Show descriptions on collection page", { infoText = "Displays item effects when navigating the collection page in the main menu."})
-- Achievement tracking section
MCM.AddSpace("EID", "Repentogon")
MCM.AddText("EID", "Repentogon", "Achievement tracking")
MCM.AddSpace("EID", EID.MCMTr("Repentogon"))
MCM.AddText("EID", EID.MCMTr("Repentogon"), "Achievement tracking")
EID:AddBooleanSetting("Repentogon", "RGON_DonationMachineDescriptions", "Donation machine progress", { infoText = "Displays the number of coins until the next donation machine achievement."})
end
---------------------------------------------------------------------------
----------------------------Savegame Config--------------------------------
if not REPENTOGON then
if EID.SaveGame then
MCM.AddText("EID", "Save Game", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "Loaded savegame data:" end)
MCM.AddText("EID", "Save Game", function() return EID.SaveGame.Platform .." User: "..EID.SaveGame.UserName.." ("..EID.SaveGame.UserID..")" end)
MCM.AddSpace("EID", "Save Game")
MCM.AddText("EID", EID.MCMTr("Save Game"), function() EID.MCMCompat_isDisplayingEIDTab = ""; return "Loaded savegame data:" end)
MCM.AddText("EID", EID.MCMTr("Save Game"), function() return EID.SaveGame.Platform .." User: "..EID.SaveGame.UserName.." ("..EID.SaveGame.UserID..")" end)
MCM.AddSpace("EID", EID.MCMTr("Save Game"))
-- Show Item needs Collection
MCM.AddSetting(
"EID",
"Save Game",
EID.MCMTr("Save Game"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -849,9 +984,9 @@ if MCMLoaded then
Maximum = 3,
Display = function()
if EID.Config["SaveGameNumber"] == 0 then
return "Current Save Game: 0 (Deactivated)"
return EID.MCMTr("Current Save Game") .. ": 0 (Deactivated)"
end
return "Current Save Game: " .. EID.Config["SaveGameNumber"]
return EID.MCMTr("Current Save Game") .. ": " .. EID.Config["SaveGameNumber"]
end,
OnChange = function(currentNum)
EID.MCM_OptionChanged = true
@@ -860,21 +995,21 @@ if MCMLoaded then
Info = {"Save game you are currently on. This info needs to be set to get the correct lookup tables."}
}
)
MCM.AddText("EID", "Save Game", function()
MCM.AddText("EID", EID.MCMTr("Save Game"), function()
if EID.Config["SaveGameNumber"] == 0 then return "" end
local count = 0
for k, v in pairs(EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup) do
count = count + 1
end
return "Collection page items missing: "..count end)
MCM.AddSpace("EID", "Save Game")
MCM.AddSpace("EID", EID.MCMTr("Save Game"))
EID:AddBooleanSetting("Save Game", "HideUncollectedItemDescriptions", "Hide uncollected items", { infoText = "Hide descriptions of items that are not yet on the collection page."})
EID:AddBooleanSetting("Save Game", "ItemCollectionIndicator", "Highlight uncollected items")
-- Needs collection Color
MCM.AddSetting(
"EID",
"Save Game",
EID.MCMTr("Save Game"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -884,7 +1019,7 @@ if MCMLoaded then
Maximum = 1000,
Display = function()
if EID.Config["ItemCollectionColor"] == nil then EID.Config["ItemCollectionColor"] = EID.DefaultConfig["ItemCollectionColor"] end
return "Collection Page Highlight color: " .. string.gsub(EID.Config["ItemCollectionColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"]).."/"..#colorNameArray..")"
return EID.MCMTr("Collection Page Highlight color") .. ": " .. string.gsub(EID.Config["ItemCollectionColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"]).."/"..#colorNameArray..")"
end,
OnChange = function(currentNum)
EID.MCM_OptionChanged = true
@@ -896,26 +1031,26 @@ if MCMLoaded then
}
)
else
MCM.AddSpace("EID", "Save Game")
MCM.AddSpace("EID", "Save Game")
MCM.AddText("EID", "Save Game", function() EID.MCMCompat_isDisplayingEIDTab = ""; return "To enable savegame related features," end)
MCM.AddText("EID", "Save Game", "please run \"scripts\\savegame_reader.exe\"")
MCM.AddText("EID", "Save Game", "found in the EID mod folder.")
MCM.AddSpace("EID", EID.MCMTr("Save Game"))
MCM.AddSpace("EID", EID.MCMTr("Save Game"))
MCM.AddText("EID", EID.MCMTr("Save Game"), function() EID.MCMCompat_isDisplayingEIDTab = ""; return "To enable savegame related features," end)
MCM.AddText("EID", EID.MCMTr("Save Game"), "please run \"scripts\\savegame_reader.exe\"")
MCM.AddText("EID", EID.MCMTr("Save Game"), "found in the EID mod folder.")
end
end -- if not repentogon
---------------------------------------------------------------------------
-----------------------------Mouse Controls--------------------------------
MCM.AddText("EID", "Mouse", function() EID.MCMCompat_isDisplayingEIDTab = "Mouse"; return "! THIS FEATURE IS IN EARLY DEVELOPMENT !" end )
MCM.AddSpace("EID", "Mouse")
MCM.AddText("EID", "Mouse", "MCM -> General -> Hud Offset")
MCM.AddText("EID", "Mouse", "to adjust Hud Offset")
MCM.AddSpace("EID", "Mouse")
MCM.AddText("EID", EID.MCMTr("Mouse"), function() EID.MCMCompat_isDisplayingEIDTab = "Mouse"; return "! THIS FEATURE IS IN EARLY DEVELOPMENT !" end )
MCM.AddSpace("EID", EID.MCMTr("Mouse"))
MCM.AddText("EID", EID.MCMTr("Mouse"), "MCM -> General -> Hud Offset")
MCM.AddText("EID", EID.MCMTr("Mouse"), "to adjust Hud Offset")
MCM.AddSpace("EID", EID.MCMTr("Mouse"))
-- Enable mouse controls
MCM.AddSetting(
"EID",
"Mouse",
EID.MCMTr("Mouse"),
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function()
@@ -937,7 +1072,7 @@ if MCMLoaded then
-- Enable mouse controls
MCM.AddSetting(
"EID",
"Mouse",
EID.MCMTr("Mouse"),
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function()
@@ -962,7 +1097,7 @@ if MCMLoaded then
-- Text Color
MCM.AddSetting(
"EID",
"Colors",
EID.MCMTr("Colors"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -987,7 +1122,7 @@ if MCMLoaded then
-- Name Color
MCM.AddSetting(
"EID",
"Colors",
EID.MCMTr("Colors"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -1011,7 +1146,7 @@ if MCMLoaded then
-- Transform Color
MCM.AddSetting(
"EID",
"Colors",
EID.MCMTr("Colors"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -1035,7 +1170,7 @@ if MCMLoaded then
-- Error Color
MCM.AddSetting(
"EID",
"Colors",
EID.MCMTr("Colors"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -1059,7 +1194,7 @@ if MCMLoaded then
-- Mod indicator Color
MCM.AddSetting(
"EID",
"Colors",
EID.MCMTr("Colors"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -1084,7 +1219,7 @@ if MCMLoaded then
if EID.isRepentance then
MCM.AddSetting(
"EID",
"Colors",
EID.MCMTr("Colors"),
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
@@ -1107,7 +1242,7 @@ if MCMLoaded then
)
end
MCM.AddSpace("EID", "Colors")
MCM.AddSpace("EID", EID.MCMTr("Colors"))
-- Color blind
local colorBlindModes = {[0] = "Off", "Protanopia (red weak)", "Deuteranopia (green weak)", "Tritanopia (blue weak)"}
EID:AddNumberSetting("Colors", "ColorblindMode", "Colorblind Mode", 0, #colorBlindModes, {displayTable = colorBlindModes, infoText = "Changes some colors to make the mod more colorblind-friendly."})
+29 -1
View File
@@ -1296,7 +1296,14 @@ EID.OptionChanged = false
EID.bagPlayer = nil
--- Render function that runs every frame and handles the main EID rendering logic.
function EID:OnRender()
-- Personal fork: render fault containment. The original OnRender body lives in
-- OnRender_Inner; the wrapper below converts a crash into an on-screen notice
-- instead of silently killing all EID output for the rest of the session.
EID.RenderErrorCount = 0
EID.RenderDisabled = false
EID.RenderErrorMsg = nil
function EID:OnRender_Inner()
-- Increases by 60 per second, ignores pauses
EID.GameRenderCount = EID.GameRenderCount + 1
EID.OptionChanged = EID.MCM_OptionChanged
@@ -1669,6 +1676,27 @@ function EID:OnRender()
EID:printDescriptions()
end
function EID:OnRender(...)
if EID.RenderDisabled then
pcall(Isaac.RenderText, "EID disabled after repeated render errors; restart the run", 60, 60, 1, 0, 0, 1)
return
end
local ok, err = pcall(EID.OnRender_Inner, ...)
if ok then
EID.RenderErrorCount = 0
EID.RenderErrorMsg = nil
else
EID.RenderErrorCount = EID.RenderErrorCount + 1
EID.RenderErrorMsg = tostring(err)
EID:WriteErrorMsg("Render error #" .. EID.RenderErrorCount .. ": " .. EID.RenderErrorMsg)
pcall(Isaac.RenderText, "EID render error (see log): " .. string.sub(EID.RenderErrorMsg, 1, 90), 60, 60, 1, 0, 0, 1)
if EID.RenderErrorCount >= 5 then
EID.RenderDisabled = true
EID:WriteErrorMsg("EID rendering disabled after 5 consecutive errors")
end
end
end
EID:AddCallback(ModCallbacks.MC_POST_RENDER, EID.OnRender)
--- Add active item progress to the player's transformation progress.
-28
View File
@@ -1,28 +0,0 @@
Changing a character:
1. open "PixelMplus10-Regular.sfd" in FontForge
2. edit the chars to your liking
3. Create .ttf file
4. install created .ttf file
5. open BMFont
6. set the settings / enable new characters
7. Export as .fnt file
-----Font Settings:
Font: PixelMplus10
Charset: unicode
Size: 10px
Height: 100%
Match char height: ON
Outline thickness: 1
Everything else: OFF
-----Export Options:
Spacing: A= 1 ; B = 1
Equalize the cell heights: ON
Width: 1024
Height: 1024
Bit depth: 32
Chnl A: Outline
Chnl RGB: Glyph
Font descriptor: Binary
Compression: Deflate
File diff suppressed because it is too large. Load diff
Binary file not shown.