Skip to content

Commit

Permalink
fix: Fixes importing spawners (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamronbatman authored Feb 19, 2024
1 parent 1fdef9f commit de0d205
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Projects/UOContent/Engines/Spawners/SpawnerEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,32 @@ public partial class SpawnerEntry
public SpawnerEntry(BaseSpawner parent)
{
_parent = parent;
_spawned = new List<ISpawnable>();
_spawned = [];
}

[JsonConstructor]
public SpawnerEntry(
string spawnedName,
int spawnedProbability = 100,
int spawnedMaxCount = 1,
string properties = null,
string parameters = null
) : this(null, spawnedName, spawnedProbability, spawnedMaxCount, properties, parameters)
{
}

public SpawnerEntry(
BaseSpawner parent,
string name,
int probability,
int maxcount,
int probability = 100,
int maxCount = 1,
string properties = null,
string parameters = null
) : this(parent)
{
SpawnedName = name;
SpawnedProbability = probability;
SpawnedMaxCount = maxcount;
SpawnedMaxCount = maxCount;
Properties = properties;
Parameters = parameters;
}
Expand Down

0 comments on commit de0d205

Please sign in to comment.