Build 0.20.4.0

This commit is contained in:
Markus Isberg
2022-11-11 17:57:23 +02:00
parent edaf4b09fe
commit 54712b5dc9
201 changed files with 7618 additions and 2020 deletions
@@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
namespace Barotrauma
{
[NetworkSerialize]
public readonly record struct NetCollection<T>(ImmutableArray<T> Array) : INetSerializableStruct, IEnumerable<T>
{
public static readonly NetCollection<T> Empty = new(ImmutableArray<T>.Empty);
public NetCollection(params T[] elements) : this(elements.ToImmutableArray()) { }
IEnumerator<T> IEnumerable<T>.GetEnumerator() => ((IEnumerable<T>)Array).GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable)Array).GetEnumerator();
}
}