Merge pull request #371 from kittenchilly/master

Add failsafe to prevent achievement helper trinket from spawning
This commit is contained in:
wofsauge authored and GitHub committed 2022-02-03 15:42:39 +01:00
commit 6807934430
1 file changed
+8
+8
View File
@@ -921,6 +921,14 @@ if Encyclopedia then
})
end
-- if the helper trinket somehow does spawn, replace it with a random trinket from the pool
function EID:PreventHelperTrinketSpawn(entity)
if entity.SubType == achievementTrinket then
entity:Morph(entity.Type, entity.Variant, game:GetItemPool():GetTrinket())
end
end
EID:AddCallback(ModCallbacks.MC_POST_PICKUP_INIT, EID.PreventHelperTrinketSpawn, PickupVariant.PICKUP_TRINKET)
local hasShownAchievementWarning = false
local function renderAchievementInfo()
if REPENTANCE and not EID.Config.DisableAchievementCheck and game:GetFrameCount() < 10*30 then