fix: Removes GetObjectsInRange and fixes boat planks closing (#1579)
## BREAKING CHANGE - Deletes `map.GetObjectsInRange` and `map.GetObejctsInBounds` ### Notes Developers are expected to enumerate mobiles and items separately now using `map.GetMobilesInRange` and `map.GetItemsInRange`. This helps keep the code streamlined so we don't have to maintain multiple copies of ref struct enumerators that do the same thing. ### Fixes - [X] Fixes bug with planks closing - [X] Fixes issue with iterating items/mobiles from a null map
This commit is contained in:
parent
cb1638591b
commit
977fdc2c5a
21 changed files with 543 additions and 461 deletions
|
|
@ -2445,15 +2445,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static bool GetSaveFlag(SaveFlag flags, SaveFlag toGet) => (flags & toGet) != 0;
|
||||
|
||||
public IPooledEnumerable<IEntity> GetObjectsInRange(int range)
|
||||
{
|
||||
var map = m_Map;
|
||||
|
||||
return map == null
|
||||
? PooledEnumeration.NullEnumerable<IEntity>.Instance
|
||||
: map.GetObjectsInRange(m_Parent == null ? m_Location : GetWorldLocation(), range);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public Map.ItemAtEnumerable<Item> GetItemsAt() =>
|
||||
m_Map == null ? Map.ItemAtEnumerable<Item>.Empty : m_Map.GetItemsAt(m_Parent == null ? m_Location : GetWorldLocation());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue