Add new entity spawn test & fix misc bugs (#19953)

This commit is contained in:
Leon Friedrich
2023-10-16 16:54:10 +11:00
committed by GitHub
parent 1f0c9314fd
commit 00e274ea38
14 changed files with 149 additions and 36 deletions

View File

@@ -70,7 +70,7 @@ public sealed partial class GatherableSystem : EntitySystem
continue;
}
var getLoot = _prototypeManager.Index<EntityLootTablePrototype>(table);
var spawnLoot = getLoot.GetSpawns();
var spawnLoot = getLoot.GetSpawns(_random);
var spawnPos = pos.Offset(_random.NextVector2(0.3f));
Spawn(spawnLoot[0], spawnPos);
}