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)
|
public SpawnerEntry(BaseSpawner parent)
|
||||||
{
|
{
|
||||||
_parent = 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(
|
public SpawnerEntry(
|
||||||
BaseSpawner parent,
|
BaseSpawner parent,
|
||||||
string name,
|
string name,
|
||||||
int probability,
|
int probability = 100,
|
||||||
int maxcount,
|
int maxCount = 1,
|
||||||
string properties = null,
|
string properties = null,
|
||||||
string parameters = null
|
string parameters = null
|
||||||
) : this(parent)
|
) : this(parent)
|
||||||
{
|
{
|
||||||
SpawnedName = name;
|
SpawnedName = name;
|
||||||
SpawnedProbability = probability;
|
SpawnedProbability = probability;
|
||||||
SpawnedMaxCount = maxcount;
|
SpawnedMaxCount = maxCount;
|
||||||
Properties = properties;
|
Properties = properties;
|
||||||
Parameters = parameters;
|
Parameters = parameters;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue