Rewrite to simplify adding descs
This commit is contained in:
1 parent
12e072e2d0
commit
4ae52df3ef
1 file changed
+120
-118
+120
-118
@@ -1,11 +1,35 @@
|
|||||||
local game = Game()
|
local game = Game()
|
||||||
local level
|
local level
|
||||||
local currentRoom
|
local currentRoom
|
||||||
|
local blacklist
|
||||||
|
local holdMapDesc
|
||||||
|
|
||||||
|
-- Rainbow Worm's trinket IDs it grants, in order
|
||||||
|
local rainbowWormEffects = { [0] = 9, 11, 65, 27, 10, 12, 26, 66, 96, 144 }
|
||||||
|
-- Mysterious Paper does not play well with displaying Error 404's effect
|
||||||
|
local mysteriousPaperBlacklist = { [23] = true, [48] = true }
|
||||||
|
|
||||||
|
-- Simple function to help with adding properly formatted sections to the desc
|
||||||
local function append(icon, title, newDesc)
|
local function append(icon, title, newDesc)
|
||||||
return (icon or "{{Blank}}") .. " {{ColorEIDObjName}}" .. title .. "#" .. newDesc .. "#"
|
holdMapDesc = holdMapDesc .. (icon or "{{Blank}}") .. " {{ColorEIDObjName}}" .. title .. "#" .. newDesc .. "#"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Helper function to easily add an item's stock description to the desc
|
||||||
|
-- Don't use if you need to customize the desc! (Like Sanguine Bond's result highlighting)
|
||||||
|
-- extraIcon is for when we want a special icon before the line (like {{Dice Bag Icon}} {{Dice Item Icon}})
|
||||||
|
local variantToName = { [70] = "Pill", [100] = "Collectible", [300] = "Card", [350] = "Trinket" }
|
||||||
|
local function addObjectDesc(type, variant, subtype, extraIcon)
|
||||||
|
local objectID = type .. "." .. variant .. "." .. subtype
|
||||||
|
if not blacklist[objectID] then
|
||||||
|
blacklist[objectID] = true
|
||||||
|
local demoDescObj = EID:getDescriptionObj(type, variant, subtype)
|
||||||
|
local iconString = "{{" .. variantToName[variant] .. subtype .. "}}"
|
||||||
|
if extraIcon then iconString = extraIcon .. " " .. iconString end
|
||||||
|
append(iconString, demoDescObj.Name, demoDescObj.Description)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- General RNG functions for RNG predicting
|
||||||
local function RNGNext(num, shift1, shift2, shift3)
|
local function RNGNext(num, shift1, shift2, shift3)
|
||||||
num = num ~ ((num >> shift1) & 4294967295)
|
num = num ~ ((num >> shift1) & 4294967295)
|
||||||
num = num ~ ((num << shift2) & 4294967295)
|
num = num ~ ((num << shift2) & 4294967295)
|
||||||
@@ -23,7 +47,7 @@ local teleport2GreedOrder = { 1,5,2,4,10,23,8,14,3 }
|
|||||||
local teleport2Icons = { "{{Room}}","{{BossRoom}}","{{SuperSecretRoom}}","{{Shop}}","{{TreasureRoom}}","{{SacrificeRoom}}","{{DiceRoom}}","{{Library}}","{{CursedRoom}}","{{MiniBoss}}","{{ChallengeRoom}}","{{IsaacsRoom}}","{{BarrenRoom}}","{{ArcadeRoom}}","{{ChestRoom}}","{{Planetarium}}","{{SecretRoom}}","{{RedRoom}}","{{AngelDevilChance}}","{{ErrorRoom}}" }
|
local teleport2Icons = { "{{Room}}","{{BossRoom}}","{{SuperSecretRoom}}","{{Shop}}","{{TreasureRoom}}","{{SacrificeRoom}}","{{DiceRoom}}","{{Library}}","{{CursedRoom}}","{{MiniBoss}}","{{ChallengeRoom}}","{{IsaacsRoom}}","{{BarrenRoom}}","{{ArcadeRoom}}","{{ChestRoom}}","{{Planetarium}}","{{SecretRoom}}","{{RedRoom}}","{{AngelDevilChance}}","{{ErrorRoom}}" }
|
||||||
local teleport2GreedIcons = { "{{RoomLongVertical}}","{{BossRoom}}","{{Shop}}","{{TreasureRoom}}","{{CursedRoom}}","{{Room}}","{{SuperSecretRoom}}","{{AngelDevilChance}}","{{ErrorRoom}}" }
|
local teleport2GreedIcons = { "{{RoomLongVertical}}","{{BossRoom}}","{{Shop}}","{{TreasureRoom}}","{{CursedRoom}}","{{Room}}","{{SuperSecretRoom}}","{{AngelDevilChance}}","{{ErrorRoom}}" }
|
||||||
|
|
||||||
local function teleport2Prediction(holdMapDesc)
|
local function teleport2Prediction()
|
||||||
local level = game:GetLevel()
|
local level = game:GetLevel()
|
||||||
local rooms = level:GetRooms()
|
local rooms = level:GetRooms()
|
||||||
--I AM ERROR Room always considered uncleared
|
--I AM ERROR Room always considered uncleared
|
||||||
@@ -46,24 +70,54 @@ local function teleport2Prediction(holdMapDesc)
|
|||||||
local roomNames = (greed and EID:getDescriptionEntry("Teleport2GreedRoomNames")) or EID:getDescriptionEntry("Teleport2RoomNames")
|
local roomNames = (greed and EID:getDescriptionEntry("Teleport2GreedRoomNames")) or EID:getDescriptionEntry("Teleport2RoomNames")
|
||||||
|
|
||||||
for i,v in ipairs(roomOrder) do
|
for i,v in ipairs(roomOrder) do
|
||||||
if unclearedTypes[v] then return append("{{Collectible419}}", EID:getObjectName(5, 100, 419) .. EID:getDescriptionEntry("HoldMapHeader"), roomIcons[i] .. " " .. roomNames[i]) end
|
if unclearedTypes[v] then
|
||||||
|
append("{{Collectible419}}", EID:getObjectName(5, 100, 419) .. EID:getDescriptionEntry("HoldMapHeader"), roomIcons[i] .. " " .. roomNames[i])
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--
|
|
||||||
|
|
||||||
--order of checking: 15, 48, 58, 63, 65
|
-- Sanguine Bond Chance Display / Prediction --
|
||||||
--(pennies, damage, hearts, item, leviathan, nothing)
|
--order of checking: 15% Pennies, 48% Damage, 58% Hearts, 63% Item, 65% Leviathan, 100% Nothing
|
||||||
local sanguineResults = { { 0.15, 3 }, { 0.48, 2 }, { 0.58, 4 }, { 0.63, 5 }, { 0.65, 6 }, { 1, 1 } }
|
local sanguineResults = { { 0.15, 3 }, { 0.48, 2 }, { 0.58, 4 }, { 0.63, 5 }, { 0.65, 6 }, { 1, 1 } }
|
||||||
|
|
||||||
-- Rainbow Worm's trinket IDs it grants, in order
|
local function sanguinePrediction()
|
||||||
local rainbowWormEffects = { [0] = 9, 11, 65, 27, 10, 12, 26, 66, 96, 144 }
|
local spikes = currentRoom:GetGridEntity(67)
|
||||||
-- Mysterious Paper does not play well with displaying Error 404's effect
|
if not spikes then return end -- don't display anything if we can't find the spikes!
|
||||||
local mysteriousPaperBlacklist = { [23] = true, [48] = true }
|
local cheatResult = nil
|
||||||
|
if spikes and EID.Config["ItemReminderShowRNGCheats"] then
|
||||||
|
local spikeSeed = currentRoom:GetGridEntity(67):GetRNG():GetSeed()
|
||||||
|
spikeSeed = RNGNext(spikeSeed, 5, 9, 7)
|
||||||
|
spikeSeed = RNGNext(spikeSeed, 1, 5, 0x13)
|
||||||
|
local nextFloat = SeedToFloat(spikeSeed)
|
||||||
|
|
||||||
|
for _,v in ipairs(sanguineResults) do
|
||||||
|
if nextFloat < v[1] then cheatResult = v[2] break end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local descObj = EID:getDescriptionObj(5, 100, 692)
|
||||||
|
local resultsDesc = ""
|
||||||
|
|
||||||
|
local lineCount = 0
|
||||||
|
-- separate sanguine's description by # or semicolons
|
||||||
|
for w in string.gmatch(descObj.Description, "([^#;]+)") do
|
||||||
|
-- we only care about groups that contain a percent sign
|
||||||
|
if string.find(w,"%%") then
|
||||||
|
lineCount = lineCount + 1
|
||||||
|
if cheatResult == lineCount then resultsDesc = resultsDesc .. "{{ColorBagComplete}}" end
|
||||||
|
resultsDesc = resultsDesc .. w .. "#"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
append("{{Collectible692}}", descObj.Name, resultsDesc)
|
||||||
|
end
|
||||||
|
|
||||||
function EID:getHoldMapDescription(player, checkingTwin)
|
function EID:getHoldMapDescription(player, checkingTwin)
|
||||||
local holdMapDesc = ""
|
-- Starting Blacklist: Recall, Hold
|
||||||
local activeBlacklist = {}
|
blacklist = { ["5.100.714"] = true, ["5.100.715"] = true, }
|
||||||
local trinketBlacklist = {}
|
holdMapDesc = ""
|
||||||
|
|
||||||
level = game:GetLevel()
|
level = game:GetLevel()
|
||||||
currentRoom = level:GetCurrentRoom()
|
currentRoom = level:GetCurrentRoom()
|
||||||
|
|
||||||
@@ -72,92 +126,26 @@ function EID:getHoldMapDescription(player, checkingTwin)
|
|||||||
-- (Zodiac and Modeling Clay have functions for it?)
|
-- (Zodiac and Modeling Clay have functions for it?)
|
||||||
-- pandora's box? it shows the whole desc which is kinda useful but too big
|
-- pandora's box? it shows the whole desc which is kinda useful but too big
|
||||||
-- Void's absorbed items list
|
-- Void's absorbed items list
|
||||||
-- Luna beam effect?
|
|
||||||
-- D Infinity current dice; track our Drop presses and resync it each time D Infinity is used by watching for the next dice effect triggered (Predict its next dice in AB+?)
|
-- D Infinity current dice; track our Drop presses and resync it each time D Infinity is used by watching for the next dice effect triggered (Predict its next dice in AB+?)
|
||||||
|
|
||||||
|
-- Tainted ??? Poop Descriptions
|
||||||
-- test how this works in co-op when co-op baby holds map! they should be ignored?
|
if REPENTANCE and EID.Config["ItemReminderShowPoopDesc"] > 0 and player:GetPlayerType() == 25 then
|
||||||
|
for i = 0, EID.Config["ItemReminderShowPoopDesc"]-1 do
|
||||||
|
local poopInfo = EID:getDescriptionEntry("poopSpells")
|
||||||
if REPENTANCE then
|
local nextPoop = player:GetPoopSpell(i)
|
||||||
-- Sanguine Bond reward reminder
|
append("{{PoopSpell" .. nextPoop .. "}}", poopInfo[nextPoop][1], poopInfo[nextPoop][2])
|
||||||
if player:HasCollectible(CollectibleType.COLLECTIBLE_SANGUINE_BOND) and game:GetRoom():GetType() == RoomType.ROOM_DEVIL then
|
|
||||||
local spikes = currentRoom:GetGridEntity(67)
|
|
||||||
local cheatResult = nil
|
|
||||||
-- we haven't made the setting for this stuff yet
|
|
||||||
if spikes and EID.Config["ItemReminderShowRNGCheats"] then
|
|
||||||
local spikeSeed = currentRoom:GetGridEntity(67):GetRNG():GetSeed()
|
|
||||||
spikeSeed = RNGNext(spikeSeed, 5, 9, 7)
|
|
||||||
spikeSeed = RNGNext(spikeSeed, 1, 5, 0x13)
|
|
||||||
|
|
||||||
for k,v in ipairs(sanguineResults) do
|
|
||||||
if SeedToFloat(spikeSeed) < v[1] then cheatResult = v[2] break end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local descObj = EID:getDescriptionObj(5, 100, 692)
|
|
||||||
local resultsDesc = ""
|
|
||||||
|
|
||||||
local lineCount = 0
|
|
||||||
-- separate sanguine's description by # or semicolons
|
|
||||||
for w in string.gmatch(descObj.Description, "([^#;]+)") do
|
|
||||||
-- we only care about groups that contain a percent sign
|
|
||||||
if string.find(w,"%%") then
|
|
||||||
lineCount = lineCount + 1
|
|
||||||
if cheatResult == lineCount then resultsDesc = resultsDesc .. "{{ColorGreen}}" end
|
|
||||||
resultsDesc = resultsDesc .. w .. "#"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
holdMapDesc = holdMapDesc .. append("{{Collectible692}}", descObj.Name, resultsDesc)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Tainted ??? Poop Descriptions
|
|
||||||
if EID.Config["ItemReminderShowPoopDesc"] > 0 and player:GetPlayerType() == 25 then
|
|
||||||
activeBlacklist[715] = true --blacklist Hold
|
|
||||||
for i = 0, EID.Config["ItemReminderShowPoopDesc"]-1 do
|
|
||||||
local poopInfo = EID:getDescriptionEntry("poopSpells")
|
|
||||||
local nextPoop = player:GetPoopSpell(i)
|
|
||||||
holdMapDesc = holdMapDesc .. append("{{PoopSpell" .. nextPoop .. "}}", poopInfo[nextPoop][1], poopInfo[nextPoop][2])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Show Hidden Info
|
-- Sanguine Bond Possible Results
|
||||||
if EID.Config["ItemReminderShowHiddenInfo"] then
|
if REPENTANCE and player:HasCollectible(CollectibleType.COLLECTIBLE_SANGUINE_BOND) and game:GetRoom():GetType() == RoomType.ROOM_DEVIL then
|
||||||
-- Rainbow Worm
|
sanguinePrediction()
|
||||||
-- should move this down to the normal trinket displaying code?
|
|
||||||
if player:HasTrinket(64) then
|
|
||||||
trinketBlacklist[64] = true
|
|
||||||
local rainbowWormEffect = rainbowWormEffects[math.floor(game.TimeCounter / 30 / 3) % (REPENTANCE and 10 or 8)]
|
|
||||||
if not trinketBlacklist[rainbowWormEffect] then
|
|
||||||
trinketBlacklist[rainbowWormEffect] = true
|
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 350, rainbowWormEffect)
|
|
||||||
holdMapDesc = holdMapDesc .. append("{{Trinket64}}", "{{Trinket"..rainbowWormEffect.."}} " .. demoDescObj.Name, demoDescObj.Description)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- 404 Error (And any other temporary trinket givers, such as Glitched Items)
|
|
||||||
-- Unfortunately, HasTrinket can't differentiate between real and fake trinkets in AB+
|
|
||||||
if REPENTANCE and player:HasTrinket(75) then
|
|
||||||
trinketBlacklist[75] = true
|
|
||||||
-- Don't display Mysterious Paper's 1-frame temporary trinket granting
|
|
||||||
local hasPaper = player:HasTrinket(21)
|
|
||||||
-- is this var in AB+?
|
|
||||||
for i = 1, TrinketType.NUM_TRINKETS - 1 do
|
|
||||||
local tempTrinketFound = EID.player:HasTrinket(i, true) ~= EID.player:HasTrinket(i, false)
|
|
||||||
if tempTrinketFound and not trinketBlacklist[i] and (not mysteriousPaperBlacklist[i] or not hasPaper) then
|
|
||||||
trinketBlacklist[i] = true
|
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 350, i)
|
|
||||||
holdMapDesc = holdMapDesc .. append("{{Trinket"..i.."}}", demoDescObj.Name, demoDescObj.Description)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Teleport 2.0 location
|
-- Teleport 2.0 location
|
||||||
if player:HasCollectible(CollectibleType.COLLECTIBLE_TELEPORT_2) and not EID.isMirrorRoom then
|
if player:HasCollectible(CollectibleType.COLLECTIBLE_TELEPORT_2) and not EID.isMirrorRoom then
|
||||||
holdMapDesc = holdMapDesc .. teleport2Prediction(holdMapDesc)
|
blacklist["5.100.419"] = true
|
||||||
activeBlacklist[CollectibleType.COLLECTIBLE_TELEPORT_2] = true
|
teleport2Prediction()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Recently Acquired Item Descriptions
|
-- Recently Acquired Item Descriptions
|
||||||
@@ -169,9 +157,7 @@ function EID:getHoldMapDescription(player, checkingTwin)
|
|||||||
if printedItems >= EID.Config["ItemReminderShowRecentItem"] then break end
|
if printedItems >= EID.Config["ItemReminderShowRecentItem"] then break end
|
||||||
printedItems = printedItems + 1
|
printedItems = printedItems + 1
|
||||||
local recentID = EID.RecentlyTouchedItems[playerNum][i] % 4294967296
|
local recentID = EID.RecentlyTouchedItems[playerNum][i] % 4294967296
|
||||||
activeBlacklist[recentID] = true
|
addObjectDesc(5, 100, recentID)
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 100, recentID)
|
|
||||||
holdMapDesc = holdMapDesc .. append("{{Collectible"..recentID.."}}", demoDescObj.Name, demoDescObj.Description)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -180,10 +166,8 @@ function EID:getHoldMapDescription(player, checkingTwin)
|
|||||||
if EID.Config["ItemReminderShowActiveDesc"] > 0 then
|
if EID.Config["ItemReminderShowActiveDesc"] > 0 then
|
||||||
for i = 0, EID.Config["ItemReminderShowActiveDesc"]-1 do
|
for i = 0, EID.Config["ItemReminderShowActiveDesc"]-1 do
|
||||||
local heldActive = player:GetActiveItem(i) % 4294967296
|
local heldActive = player:GetActiveItem(i) % 4294967296
|
||||||
if heldActive > 0 and not activeBlacklist[heldActive] then
|
if heldActive > 0 then
|
||||||
activeBlacklist[heldActive] = true
|
addObjectDesc(5, 100, heldActive)
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 100, heldActive)
|
|
||||||
holdMapDesc = holdMapDesc .. append("{{Collectible"..heldActive.."}}", demoDescObj.Name, demoDescObj.Description)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -201,28 +185,22 @@ function EID:getHoldMapDescription(player, checkingTwin)
|
|||||||
local heldCard = player:GetCard(i)
|
local heldCard = player:GetCard(i)
|
||||||
local heldPill = player:GetPill(i)
|
local heldPill = player:GetPill(i)
|
||||||
if heldCard > 0 then
|
if heldCard > 0 then
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 300, heldCard)
|
addObjectDesc(5, 300, heldCard)
|
||||||
holdMapDesc = holdMapDesc .. append("{{Card"..heldCard.."}}", demoDescObj.Name, demoDescObj.Description)
|
|
||||||
elseif heldPill > 0 then
|
elseif heldPill > 0 then
|
||||||
-- Check if our held pill is identified
|
-- Check if our held pill is identified
|
||||||
EID.pillPlayer = player
|
EID.pillPlayer = player
|
||||||
local identified = game:GetItemPool():IsPillIdentified(heldPill)
|
local identified = game:GetItemPool():IsPillIdentified(heldPill)
|
||||||
if REPENTANCE and heldPill % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then identified = true end
|
if REPENTANCE and heldPill % PillColor.PILL_GIANT_FLAG == PillColor.PILL_GOLD then identified = true end
|
||||||
if (identified or EID.Config["ShowUnidentifiedPillDescriptions"]) then
|
if (identified or EID.Config["ShowUnidentifiedPillDescriptions"]) then
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 70, heldPill)
|
addObjectDesc(5, 70, heldPill)
|
||||||
holdMapDesc = holdMapDesc .. append("{{Pill"..heldPill.."}}", demoDescObj.Name, demoDescObj.Description)
|
|
||||||
end
|
end
|
||||||
EID.pillPlayer = nil
|
EID.pillPlayer = nil
|
||||||
elseif diceBag > 0 and not activeBlacklist[diceBag] and not dicePrinted then
|
elseif diceBag > 0 and not dicePrinted then
|
||||||
dicePrinted = true
|
dicePrinted = true
|
||||||
activeBlacklist[diceBag] = true
|
addObjectDesc(5, 100, diceBag, "{{Trinket154}}")
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 100, diceBag)
|
elseif pocketActive > 0 and not pocketPrinted then
|
||||||
holdMapDesc = holdMapDesc .. append("{{Trinket154}}", demoDescObj.Name, demoDescObj.Description)
|
|
||||||
elseif pocketActive > 0 and not activeBlacklist[pocketActive] and not pocketPrinted then
|
|
||||||
pocketPrinted = true
|
pocketPrinted = true
|
||||||
activeBlacklist[pocketActive] = true
|
addObjectDesc(5, 100, pocketActive)
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 100, pocketActive)
|
|
||||||
holdMapDesc = holdMapDesc .. append("{{Collectible"..pocketActive.."}}", demoDescObj.Name, demoDescObj.Description)
|
|
||||||
-- we'll have to add tainted char specific text for their actives with unique effects for that character!
|
-- we'll have to add tainted char specific text for their actives with unique effects for that character!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -232,11 +210,29 @@ function EID:getHoldMapDescription(player, checkingTwin)
|
|||||||
if EID.Config["ItemReminderShowTrinketDesc"] > 0 then
|
if EID.Config["ItemReminderShowTrinketDesc"] > 0 then
|
||||||
for i = 0, EID.Config["ItemReminderShowTrinketDesc"]-1 do
|
for i = 0, EID.Config["ItemReminderShowTrinketDesc"]-1 do
|
||||||
local heldActive = player:GetTrinket(i)
|
local heldActive = player:GetTrinket(i)
|
||||||
if heldActive > 0 and not trinketBlacklist[heldActive] then
|
if heldActive > 0 and not blacklist["5.350." .. heldActive] then
|
||||||
-- test this with golden trinkets / mom's box!!!
|
-- Rainbow Worm
|
||||||
trinketBlacklist[heldActive] = true
|
if EID.Config["ItemReminderShowHiddenInfo"] and heldActive == 64 then
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 350, heldActive)
|
blacklist["5.350.64"] = true
|
||||||
holdMapDesc = holdMapDesc .. append("{{Trinket"..heldActive.."}}", demoDescObj.Name, demoDescObj.Description)
|
local rainbowWormEffect = rainbowWormEffects[math.floor(game.TimeCounter / 30 / 3) % (REPENTANCE and 10 or 8)]
|
||||||
|
addObjectDesc(5, 350, rainbowWormEffect, "{{Trinket64}}")
|
||||||
|
-- 404 Error
|
||||||
|
-- Unfortunately, includes other temporary trinket givers, such as Glitched Items. We'd need to predict 404's result using RNG to actually know which it specifically is granting
|
||||||
|
-- And unfortunately, HasTrinket can't differentiate between real and fake trinkets in AB+
|
||||||
|
elseif EID.Config["ItemReminderShowHiddenInfo"] and REPENTANCE and heldActive == 75 then
|
||||||
|
blacklist["5.350.75"] = true
|
||||||
|
-- Don't display Mysterious Paper's 1-frame temporary trinket granting
|
||||||
|
local hasPaper = player:HasTrinket(21)
|
||||||
|
for i = 1, TrinketType.NUM_TRINKETS - 1 do
|
||||||
|
local tempTrinketFound = EID.player:HasTrinket(i, true) ~= EID.player:HasTrinket(i, false)
|
||||||
|
if tempTrinketFound and (not mysteriousPaperBlacklist[i] or not hasPaper) then
|
||||||
|
addObjectDesc(5, 350, i, "{{Trinket75}}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
addObjectDesc(5, 350, heldActive)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -247,16 +243,22 @@ function EID:getHoldMapDescription(player, checkingTwin)
|
|||||||
-- If both twins have a desc, show their player icon / name to separate the two descs
|
-- If both twins have a desc, show their player icon / name to separate the two descs
|
||||||
if REPENTANCE and not checkingTwin then
|
if REPENTANCE and not checkingTwin then
|
||||||
local twin = player:GetOtherTwin()
|
local twin = player:GetOtherTwin()
|
||||||
|
local mainTwinDesc = holdMapDesc
|
||||||
local otherTwinDesc = ""
|
local otherTwinDesc = ""
|
||||||
if twin then otherTwinDesc = EID:getHoldMapDescription(twin, true) end
|
if twin then otherTwinDesc = EID:getHoldMapDescription(twin, true) end
|
||||||
if otherTwinDesc ~= "" then
|
if otherTwinDesc ~= "" then
|
||||||
if holdMapDesc == "" then holdMapDesc = otherTwinDesc
|
-- Only the other twin had a desc
|
||||||
|
if mainTwinDesc == "" then holdMapDesc = otherTwinDesc
|
||||||
else
|
else
|
||||||
holdMapDesc = (EID:getIcon("Player"..player:GetPlayerType()) ~= EID.InlineIcons["ERROR"] and "{{Player"..player:GetPlayerType().."}}" or "{{CustomTransformation}}") .. " {{ColorGray}}" .. player:GetName() .. "#" .. holdMapDesc .. "#"
|
-- Both twins had a desc; merge them with player icon headers
|
||||||
|
holdMapDesc = (EID:getIcon("Player"..player:GetPlayerType()) ~= EID.InlineIcons["ERROR"] and "{{Player"..player:GetPlayerType().."}}" or "{{CustomTransformation}}") .. " {{ColorGray}}" .. player:GetName() .. "#" .. mainTwinDesc .. "#"
|
||||||
holdMapDesc = holdMapDesc .. (EID:getIcon("Player"..twin:GetPlayerType()) ~= EID.InlineIcons["ERROR"] and "{{Player"..twin:GetPlayerType().."}}" or "{{CustomTransformation}}") .. " {{ColorGray}}" .. twin:GetName() .. "#" .. otherTwinDesc
|
holdMapDesc = holdMapDesc .. (EID:getIcon("Player"..twin:GetPlayerType()) ~= EID.InlineIcons["ERROR"] and "{{Player"..twin:GetPlayerType().."}}" or "{{CustomTransformation}}") .. " {{ColorGray}}" .. twin:GetName() .. "#" .. otherTwinDesc
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
-- Only the main twin had a desc
|
||||||
|
holdMapDesc = mainTwinDesc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return holdMapDesc
|
return holdMapDesc
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user