Skip to content

Commit

Permalink
fxied an InvalidOperationException
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikihero committed Sep 9, 2023
1 parent 6581540 commit 43c50c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion BetterCoinflips/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,16 @@ public void OnInteractingDoorEventArgs(InteractingDoorEventArgs ev)
{
return;
}
foreach (Pickup pickup in ev.Door.Room.Pickups)

for (int i = 0; i < Pickup.List.Count(); i++)
{
Pickup pickup = Pickup.List.ElementAt(i);

if (pickup == null)
{
return;
}

if (pickup.IsLocked && pickup.Type == Cfg.ItemToReplace.ElementAt(0).Key && Cfg.ItemToReplace.ElementAt(0).Key != ItemType.None && pickup.Type == Cfg.ItemToReplace.ElementAt(0).Key && Cfg.ItemToReplace.ElementAt(0).Value != 0)
{
pickup.Destroy();
Expand Down

0 comments on commit 43c50c8

Please sign in to comment.