fix: Fixes region duplicates (#1684)

This commit is contained in:
Kamron Batman 2024-02-18 12:01:16 -08:00 • committed by GitHub
parent d0d7be8de0
commit 0d5aa1d022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 17 deletions

View file

@ -1450,6 +1450,11 @@ public sealed partial class Map : IComparable<Map>, ISpanFormattable, ISpanParsa
public void OnEnter(Region region, Rectangle3D rect)
{
if (_regions?.Contains(region) == true)
{
return;
}
Utility.Add(ref _regions, region);
_regions.Sort();