BoC P2 takes precedence over P1's desc

This commit is contained in:
Buurazu authored and GitHub committed 2023-01-21 07:07:03 -05:00
1 parent 74d46c64f1
commit 243bacf027
1 file changed
+16 -13
+16 -13
View File
@@ -1291,21 +1291,24 @@ local function onRender()
elseif EID.Config["PairedPlayerDescriptions"] then elseif EID.Config["PairedPlayerDescriptions"] then
playerSearch = EID.players playerSearch = EID.players
end end
-- Check for descriptions to print per player local displayedDesc = {}
for _,player in ipairs(playerSearch) do -- Check for Bag of Crafting per player
local displayedDesc = false -- (Do this first because it can't be Local Mode, and should take precedence over other descriptions, even as Player 2+)
if REPENTANCE then
-- Check if this player has the Bag of Crafting for playerNum,player in ipairs(playerSearch) do
local craftingSuccess = false if player:HasCollectible(710) then
if REPENTANCE and player:HasCollectible(710) then local craftingSuccess = EID:handleBagOfCraftingRendering()
craftingSuccess = EID:handleBagOfCraftingRendering() if craftingSuccess then
if craftingSuccess then displayedDesc[playerNum] = true
displayedDesc = true end
end end
end end
end
if (not displayedDesc or EID.Config["DisplayAllNearby"]) and
-- Check for descriptions to print per player
for playerNum,player in ipairs(playerSearch) do
if (not displayedDesc[playerNum] or EID.Config["DisplayAllNearby"]) and
#EID.descriptionsToPrint < EID.Config["MaxDescriptionsToDisplay"] then #EID.descriptionsToPrint < EID.Config["MaxDescriptionsToDisplay"] then
-- Searching for the closest describable entity to this player -- Searching for the closest describable entity to this player
EID.lastDescriptionEntity = nil EID.lastDescriptionEntity = nil