Item Reminder: Prevent display of the same poop spells twice
This commit is contained in:
1 parent
e271302f69
commit
9824b90361
1 file changed
+12
-3
@@ -596,10 +596,19 @@ end
|
||||
function EID:ItemReminderHandlePoopSpells(player)
|
||||
if EID.isRepentance and player:GetPlayerType() == 25 and EID:ItemReminderCanAddMoreToView() then
|
||||
local poopInfo = EID:getDescriptionEntry("poopSpells")
|
||||
for i = 0, numAvailableDescriptionSlots - 1 do
|
||||
local displayedPoopTypes = {}
|
||||
local descsAvailableToRender = numAvailableDescriptionSlots
|
||||
for i = 0, 9 do -- max 10 poop spell slots
|
||||
local nextPoop = player:GetPoopSpell(i)
|
||||
EID:ItemReminderAddTempDescriptionEntry("{{PoopSpell" .. nextPoop .. "}}", poopInfo[nextPoop][1],
|
||||
poopInfo[nextPoop][2])
|
||||
if not displayedPoopTypes[nextPoop] then
|
||||
EID:ItemReminderAddTempDescriptionEntry("{{PoopSpell" .. nextPoop .. "}}", poopInfo[nextPoop][1],
|
||||
poopInfo[nextPoop][2])
|
||||
displayedPoopTypes[nextPoop] = true
|
||||
descsAvailableToRender = descsAvailableToRender - 1
|
||||
end
|
||||
if descsAvailableToRender <= 0 then
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user