Improve pickup history tracking

This commit is contained in:
Buurazu authored and GitHub committed 2023-05-06 18:57:45 -04:00
1 parent 61b5aaa3c7
commit 55b38e2c74
1 file changed
+6 -3
+6 -3
View File
@@ -1880,8 +1880,11 @@ end
-- Add pickup usage to history of pickups used by the player -- Add pickup usage to history of pickups used by the player
function EID:AddPickupToHistory(pickupType, effectID, player, useFlags, pillColorID) function EID:AddPickupToHistory(pickupType, effectID, player, useFlags, pillColorID)
-- don't add mimiced or noannouncer cards/pills to history -- don't add mimiced or noannouncer cards/pills to Echo Chamber history
if EID.isRepentance and (useFlags & UseFlag.USE_MIMIC == UseFlag.USE_MIMIC or useFlags & UseFlag.USE_NOANNOUNCER == UseFlag.USE_NOANNOUNCER) then return end local allowEchoChamber = true
if EID.isRepentance and (useFlags & UseFlag.USE_MIMIC == UseFlag.USE_MIMIC or useFlags & UseFlag.USE_NOANNOUNCER == UseFlag.USE_NOANNOUNCER) then
allowEchoChamber = false
end
local playerID = EID:getPlayerID(player) local playerID = EID:getPlayerID(player)
EID:InitItemInteractionIfAbsent(playerID) EID:InitItemInteractionIfAbsent(playerID)
@@ -1892,7 +1895,7 @@ function EID:AddPickupToHistory(pickupType, effectID, player, useFlags, pillColo
end end
-- pickupType = ["pill","card"], pillColorID, effectID, hadEchoChamberWhenUsed -- pickupType = ["pill","card"], pillColorID, effectID, hadEchoChamberWhenUsed
table.insert(historyTable, 1, {pickupType, pillColorID, effectID, EID.isRepentance and player:HasCollectible(700)}) table.insert(historyTable, 1, {pickupType, pillColorID, effectID, EID.isRepentance and player:HasCollectible(700) and allowEchoChamber})
end end
-- Render a sprite of an entity -- Render a sprite of an entity