nullable parts in body prototypes (#12935)

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
Nemanja
2022-12-09 20:07:09 -05:00
committed by GitHub
parent 4a17d2cb33
commit 45b72d4852
4 changed files with 25 additions and 25 deletions

View File

@@ -88,6 +88,9 @@ public partial class SharedBodySystem
foreach (var connection in connections)
{
var childSlot = prototype.Slots[connection];
if (childSlot.Part == null)
continue;
var childPart = Spawn(childSlot.Part, coordinates);
var childPartComponent = Comp<BodyPartComponent>(childPart);
var slot = CreatePartSlot(connection, parent.Owner, childPartComponent.PartType, parent);