feat: Replaces params array with params ReadOnlySpan (#2125)
This commit is contained in:
parent
90059c5e74
commit
279b10dd0f
15 changed files with 36 additions and 35 deletions
|
|
@ -85,7 +85,7 @@ public abstract partial class BaseSpawner : Item, ISpawner
|
|||
|
||||
public BaseSpawner(
|
||||
int amount, int minDelay, int maxDelay, int team, int homeRange,
|
||||
params string[] spawnedNames
|
||||
params ReadOnlySpan<string> spawnedNames
|
||||
) : this(
|
||||
amount,
|
||||
TimeSpan.FromMinutes(minDelay),
|
||||
|
|
@ -99,7 +99,7 @@ public abstract partial class BaseSpawner : Item, ISpawner
|
|||
|
||||
public BaseSpawner(
|
||||
int amount, TimeSpan minDelay, TimeSpan maxDelay, int team, int homeRange,
|
||||
params string[] spawnedNames
|
||||
params ReadOnlySpan<string> spawnedNames
|
||||
) : base(0x1f13)
|
||||
{
|
||||
_guid = Guid.NewGuid();
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public partial class ProximitySpawner : Spawner
|
|||
[Constructible(AccessLevel.Developer)]
|
||||
public ProximitySpawner(
|
||||
int amount, TimeSpan minDelay, TimeSpan maxDelay, int team, int homeRange,
|
||||
params string[] spawnedNames
|
||||
params ReadOnlySpan<string> spawnedNames
|
||||
) : base(amount, minDelay, maxDelay, team, homeRange, spawnedNames)
|
||||
{
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ public partial class ProximitySpawner : Spawner
|
|||
[Constructible(AccessLevel.Developer)]
|
||||
public ProximitySpawner(
|
||||
int amount, TimeSpan minDelay, TimeSpan maxDelay, int team, int homeRange, int triggerRange,
|
||||
TextDefinition spawnMessage, bool instantFlag, params string[] spawnedNames
|
||||
TextDefinition spawnMessage, bool instantFlag, params ReadOnlySpan<string> spawnedNames
|
||||
) : base(amount, minDelay, maxDelay, team, homeRange, spawnedNames)
|
||||
{
|
||||
TriggerRange = triggerRange;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public partial class RegionSpawner : Spawner
|
|||
[Constructible(AccessLevel.Developer)]
|
||||
public RegionSpawner(
|
||||
int amount, int minDelay, int maxDelay, int team, int homeRange,
|
||||
params string[] spawnedNames
|
||||
params ReadOnlySpan<string> spawnedNames
|
||||
) : this(
|
||||
amount,
|
||||
TimeSpan.FromMinutes(minDelay),
|
||||
|
|
@ -57,7 +57,7 @@ public partial class RegionSpawner : Spawner
|
|||
[Constructible(AccessLevel.Developer)]
|
||||
public RegionSpawner(
|
||||
int amount, TimeSpan minDelay, TimeSpan maxDelay, int team, int homeRange,
|
||||
params string[] spawnedNames
|
||||
params ReadOnlySpan<string> spawnedNames
|
||||
) : base(amount, minDelay, maxDelay, team, homeRange, spawnedNames)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public partial class Spawner : BaseSpawner
|
|||
[Constructible(AccessLevel.Developer)]
|
||||
public Spawner(
|
||||
int amount, int minDelay, int maxDelay, int team, int homeRange,
|
||||
params string[] spawnedNames
|
||||
params ReadOnlySpan<string> spawnedNames
|
||||
) : this(
|
||||
amount,
|
||||
TimeSpan.FromMinutes(minDelay),
|
||||
|
|
@ -36,7 +36,7 @@ public partial class Spawner : BaseSpawner
|
|||
[Constructible(AccessLevel.Developer)]
|
||||
public Spawner(
|
||||
int amount, TimeSpan minDelay, TimeSpan maxDelay, int team, int homeRange,
|
||||
params string[] spawnedNames
|
||||
params ReadOnlySpan<string> spawnedNames
|
||||
) : base(amount, minDelay, maxDelay, team, homeRange, spawnedNames)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue