Improved formatting of T-Cain Salvage description

This commit is contained in:
Wofsauge committed 2024-09-09 00:08:40 +02:00
1 parent fd4370df19
commit a6f59530d7
3 files changed
+14 -6

No files matched your search

+6 -3
View File
@@ -368,10 +368,13 @@ EID.UserConfig = {
-- Some descriptions can be completely different depending on what character you are, here you can disable the most extreme ones -- Some descriptions can be completely different depending on what character you are, here you can disable the most extreme ones
-- Changes Health Ups and removes healing effect text when playing as a character that can't have red health -- Changes Health Ups and removes healing effect text when playing as a character that can't have red health
-- Default = true
["DynamicHealthUps"] = true, ["DynamicHealthUps"] = true,
-- As Tainted Cain, replaces pedestal descriptions with what they will turn into -- As Tainted Cain, replaces pedestal descriptions with what they will turn
["DynamicSalvageResult"] = true, -- REPENTANCE ONLY!!!
-- Default = true
["DisplayTCainSalvageResults"] = true,
---------- Bag of Crafting ------------ ---------- Bag of Crafting ------------
@@ -642,7 +645,7 @@ EID.DefaultConfig = {
["ItemReminderShowRNGCheats"] = false, ["ItemReminderShowRNGCheats"] = false,
["DynamicHealthUps"] = true, ["DynamicHealthUps"] = true,
["DynamicSalvageResult"] = true, ["DisplayTCainSalvageResults"] = true,
["SpindownDiceResults"] = 3, ["SpindownDiceResults"] = 3,
["SpindownDiceDisplayID"] = false, ["SpindownDiceDisplayID"] = false,
+2 -2
View File
@@ -475,8 +475,8 @@ if MCMLoaded then
EID:AddBooleanSetting("Display", "DynamicHealthUps", "Dynamic Health Up Text", 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"}) {infoText = "Changes Health Ups and removes healing effect text when playing as a character that can't have red health"})
EID:AddBooleanSetting("Display", "DynamicSalvageResult", "Show Tainted Cain Salvage Result", EID:AddBooleanSetting("Display", "DisplayTCainSalvageResults", "Show Tainted Cain Salvage Results",
{repOnly = true, infoText = "As Tainted Cain, replaces pedestal descriptions with what they will turn into"}) {repOnly = true, infoText = "As Tainted Cain, replaces pedestal descriptions with what they will turn into on touch"})
--------Obstruction--------- --------Obstruction---------
+6 -1
View File
@@ -838,7 +838,7 @@ if EID.isRepentance then
-- Handle Tainted Cain pedestals -- Handle Tainted Cain pedestals
local function TaintedCainPedestalCallback(descObj) local function TaintedCainPedestalCallback(descObj)
if EID.isDeathCertRoom or not descObj.Entity or not EID.Config["DynamicSalvageResult"] then return descObj end if EID.isDeathCertRoom or not descObj.Entity or not EID.Config["DisplayTCainSalvageResults"] then return descObj end
local item = EID.itemConfig:GetCollectible(descObj.ObjSubType) local item = EID.itemConfig:GetCollectible(descObj.ObjSubType)
if (item.Tags and item.Tags & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST) then return descObj end if (item.Tags and item.Tags & ItemConfig.TAG_QUEST == ItemConfig.TAG_QUEST) then return descObj end
@@ -851,6 +851,9 @@ if EID.isRepentance then
local salvageDesc = hasBirthright and EID:getDescriptionEntry("TaintedCainPedestalBaseBirthright") or EID:getDescriptionEntry("TaintedCainPedestalBase") local salvageDesc = hasBirthright and EID:getDescriptionEntry("TaintedCainPedestalBaseBirthright") or EID:getDescriptionEntry("TaintedCainPedestalBase")
local pickupNames = EID:getDescriptionEntry("PickupNames") local pickupNames = EID:getDescriptionEntry("PickupNames")
-- add T-Cain icon at start of line
salvageDesc = "{{Player23}} ".. salvageDesc
-- Guaranteed items from room type -- Guaranteed items from room type
local roomType = game:GetLevel():GetCurrentRoomDesc().Data.Type local roomType = game:GetLevel():GetCurrentRoomDesc().Data.Type
local roomPool = game:GetItemPool():GetPoolForRoom(roomType, 69) local roomPool = game:GetItemPool():GetPoolForRoom(roomType, 69)
@@ -882,6 +885,8 @@ if EID.isRepentance then
salvageDesc = salvageDesc .. "#" .. newLine salvageDesc = salvageDesc .. "#" .. newLine
end end
descObj.Description = salvageDesc descObj.Description = salvageDesc
descObj.Transformation = nil -- remove transformation info. useless for T-Cain because item will not count towards transformations
for i = 1, #EID.coopAllPlayers do for i = 1, #EID.coopAllPlayers do
local t = EID.coopAllPlayers[i]:GetPlayerType() local t = EID.coopAllPlayers[i]:GetPlayerType()
if t ~= PlayerType.PLAYER_CAIN_B then if t ~= PlayerType.PLAYER_CAIN_B then