fix: Fixes duping of spawners (#1255)

This commit is contained in:
Mink80 2022-11-20 02:46:44 +01:00 committed by GitHub
parent 0abf72ed2f
commit 10446426c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,6 +314,10 @@ public abstract class BaseSpawner : Item, ISpawner
{
if (newItem is BaseSpawner newSpawner)
{
newSpawner._guid = Guid.NewGuid();
newSpawner.Spawned = new Dictionary<ISpawnable, SpawnerEntry>();
newSpawner.Entries = new List<SpawnerEntry>();
for (var i = 0; i < Entries.Count; i++)
{
newSpawner.AddEntry(