feat: synergy notes for owned items (RU, prebuilt from dead-god.ru)
Check Localization / Check Localization process (push) Canceled after 0s
Check Localization / Check Localization process (push) Canceled after 0s
This commit is contained in:
1 parent
88d2ba6154
commit
74fcf726a4
5 files changed
+2715
No files matched your search
@@ -324,6 +324,11 @@ EID.UserConfig = {
|
|||||||
-- Default = true
|
-- Default = true
|
||||||
["DisplayFlipItemDescriptions"] = true,
|
["DisplayFlipItemDescriptions"] = true,
|
||||||
|
|
||||||
|
---------- Synergy Notes (personal fork) ----------
|
||||||
|
-- If enabled, displays synergy notes for owned items under the description (Russian language only)
|
||||||
|
-- Default = true
|
||||||
|
["DisplaySynergies"] = true,
|
||||||
|
|
||||||
---------- Item Reminder Description ------------
|
---------- Item Reminder Description ------------
|
||||||
-- Enable/Disable item reminder feature.
|
-- Enable/Disable item reminder feature.
|
||||||
-- Hold Map (or the button action chosen below) to show a description of your active item's effect, recently picked up items, and things like Teleport 2.0's destination and Void's absorbed items
|
-- Hold Map (or the button action chosen below) to show a description of your active item's effect, recently picked up items, and things like Teleport 2.0's destination and Void's absorbed items
|
||||||
@@ -625,6 +630,7 @@ EID.DefaultConfig = {
|
|||||||
["DisplayCraneInfo"] = true,
|
["DisplayCraneInfo"] = true,
|
||||||
["DisplayVoidStatInfo"] = false,
|
["DisplayVoidStatInfo"] = false,
|
||||||
["DisplayFlipItemDescriptions"] = true,
|
["DisplayFlipItemDescriptions"] = true,
|
||||||
|
["DisplaySynergies"] = true,
|
||||||
["BagOfCraftingResults"] = 7,
|
["BagOfCraftingResults"] = 7,
|
||||||
["BagOfCraftingCombinationMax"] = 12,
|
["BagOfCraftingCombinationMax"] = 12,
|
||||||
["BagOfCraftingRandomResults"] = 400,
|
["BagOfCraftingRandomResults"] = 400,
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ EID.MCM_RU_Labels = {
|
|||||||
["Show Glitched Item Info"] = "Инфо о глитч-артефактах",
|
["Show Glitched Item Info"] = "Инфо о глитч-артефактах",
|
||||||
["Show Glitched Crown Summary"] = "Сводка Глитч-короны",
|
["Show Glitched Crown Summary"] = "Сводка Глитч-короны",
|
||||||
["Show Sacrifice Room Info"] = "Инфо о комнате жертвоприношений",
|
["Show Sacrifice Room Info"] = "Инфо о комнате жертвоприношений",
|
||||||
|
["Show Synergies"] = "Показывать синергии",
|
||||||
["Show Sanguine Bond Info"] = "Инфо о Кровавых узах",
|
["Show Sanguine Bond Info"] = "Инфо о Кровавых узах",
|
||||||
["Show Void Stat Increases"] = "Прирост статов от Бездны",
|
["Show Void Stat Increases"] = "Прирост статов от Бездны",
|
||||||
["Show Tainted Cain Salvage Results"] = "Результаты разбора Порченого Каина",
|
["Show Tainted Cain Salvage Results"] = "Результаты разбора Порченого Каина",
|
||||||
@@ -568,6 +569,8 @@ if MCMLoaded then
|
|||||||
infoText = "Note: Installing REPENTOGON is required for more detailed glitched item descriptions!"})
|
infoText = "Note: Installing REPENTOGON is required for more detailed glitched item descriptions!"})
|
||||||
EID:AddBooleanSetting("Display", "DisplayFlipItemDescriptions", "Show Flip Item Descriptions", {repOnly = true,
|
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)"})
|
infoText = "Display the effect of ghostly items, when player has the Flip item (T-Lazarus)"})
|
||||||
|
EID:AddBooleanSetting("Display", "DisplaySynergies", "Show Synergies",
|
||||||
|
{infoText = "Display synergy notes for owned items under the description (Russian language only)."})
|
||||||
|
|
||||||
MCM.AddSpace("EID", EID.MCMTr("Display"))
|
MCM.AddSpace("EID", EID.MCMTr("Display"))
|
||||||
MCM.AddText("EID", EID.MCMTr("Display"), "Hidden items")
|
MCM.AddText("EID", EID.MCMTr("Display"), "Hidden items")
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
-- Personal fork: synergy notes for owned items (Russian).
|
||||||
|
-- Data comes prebuilt from dead_god_items.json, see
|
||||||
|
-- EID-localization-audit/build_synergy_table.py and features/eid_synergy_data.lua.
|
||||||
|
-- When the player owns item A and looks at item B that synergizes with A,
|
||||||
|
-- the relevant note is appended to B's description.
|
||||||
|
|
||||||
|
local MAX_SYNERGY_LINES = 3
|
||||||
|
|
||||||
|
local function synergyTableFor(desc)
|
||||||
|
if EID.SynergyDataRU == nil then return nil end
|
||||||
|
if desc.ObjType ~= EntityType.ENTITY_PICKUP then return nil end
|
||||||
|
if desc.ObjVariant == PickupVariant.PICKUP_COLLECTIBLE then
|
||||||
|
return EID.SynergyDataRU.coll[desc.ObjSubType]
|
||||||
|
elseif desc.ObjVariant == PickupVariant.PICKUP_TRINKET then
|
||||||
|
return EID.SynergyDataRU.trink[desc.ObjSubType]
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local function anyPartnerOwned(entry)
|
||||||
|
for _, partner in ipairs(entry.partners) do
|
||||||
|
if EID:PlayersHaveCollectible(partner) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local function synergyCondition(desc)
|
||||||
|
if EID:getLanguage() ~= "ru" then return false end
|
||||||
|
if EID.Config["DisplaySynergies"] == false then return false end
|
||||||
|
local list = synergyTableFor(desc)
|
||||||
|
if not list then return false end
|
||||||
|
for _, entry in ipairs(list) do
|
||||||
|
if anyPartnerOwned(entry) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local function synergyCallback(desc)
|
||||||
|
local list = synergyTableFor(desc)
|
||||||
|
if not list then return desc end
|
||||||
|
-- collect (partner, text) pairs for owned partners only
|
||||||
|
local lines = {}
|
||||||
|
for _, entry in ipairs(list) do
|
||||||
|
for _, partner in ipairs(entry.partners) do
|
||||||
|
if EID:PlayersHaveCollectible(partner) then
|
||||||
|
lines[#lines + 1] = { partner = partner, text = entry.text }
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #lines == 0 then return desc end
|
||||||
|
desc.Description = desc.Description .. "{{CR}}#Синергии:"
|
||||||
|
for i = 1, math.min(#lines, MAX_SYNERGY_LINES) do
|
||||||
|
-- NOTE: {{CollectibleID}} already renders the item's icon AND its name,
|
||||||
|
-- so no explicit name is added here
|
||||||
|
desc.Description = desc.Description .. "#{{Collectible" .. lines[i].partner .. "}}: " .. lines[i].text
|
||||||
|
end
|
||||||
|
if #lines > MAX_SYNERGY_LINES then
|
||||||
|
desc.Description = desc.Description .. "#…и ещё синергий: " .. (#lines - MAX_SYNERGY_LINES)
|
||||||
|
end
|
||||||
|
return desc
|
||||||
|
end
|
||||||
|
|
||||||
|
EID:addDescriptionModifier("EID Personal Synergy Notes", synergyCondition, synergyCallback)
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -126,6 +126,8 @@ else
|
|||||||
end
|
end
|
||||||
require("features.eid_conditionals")
|
require("features.eid_conditionals")
|
||||||
require("features.eid_modifiers")
|
require("features.eid_modifiers")
|
||||||
|
require("features.eid_synergy_data")
|
||||||
|
require("features.eid_synergies")
|
||||||
require("features.eid_holdmapdesc")
|
require("features.eid_holdmapdesc")
|
||||||
require("features.eid_itemprediction")
|
require("features.eid_itemprediction")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user