Skip to content

Commit

Permalink
Merge duplicate function
Browse files Browse the repository at this point in the history
  • Loading branch information
Barragek0 committed Jun 28, 2022
1 parent 15e036b commit 2bd356f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions ClickIt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,7 @@ private bool groundItemsVisible()
}
private bool isShrineVisible()
{
Entity shrine = null;
foreach (Entity validEntity in GameController.EntityListWrapper.OnlyValidEntities)
{
if (((validEntity.HasComponent<Shrine>() && validEntity.GetComponent<Shrine>().IsAvailable) || validEntity.Path == "Metadata/Shrines/Shrine") && validEntity.IsTargetable && !validEntity.IsOpened && !validEntity.IsHidden)
{
shrine = validEntity;
}
}
return shrine != null;
return getShrine() != null;

}
private Entity getShrine()
Expand Down

0 comments on commit 2bd356f

Please sign in to comment.