Fix TEG assert (#26881)
It's possible to trigger this by stacking it weirdly with the spawn panel. Just make it bail instead.
This commit is contained in:
committed by
GitHub
parent
2bcdb608a3
commit
210ed3ece4
@@ -66,11 +66,16 @@ public sealed class TegNodeGroup : BaseNodeGroup
|
||||
|
||||
public override void LoadNodes(List<Node> groupNodes)
|
||||
{
|
||||
DebugTools.Assert(groupNodes.Count <= 3, "The TEG has at most 3 parts");
|
||||
DebugTools.Assert(_entityManager != null);
|
||||
|
||||
base.LoadNodes(groupNodes);
|
||||
|
||||
if (groupNodes.Count > 3)
|
||||
{
|
||||
// Somehow got more TEG parts. Probably shenanigans. Bail.
|
||||
return;
|
||||
}
|
||||
|
||||
Generator = groupNodes.OfType<TegNodeGenerator>().SingleOrDefault();
|
||||
if (Generator != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user