fix: Fixes importing spawners (#1689)
This commit is contained in:
parent
1fdef9f389
commit
de0d205fd3
1 changed files with 15 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue