Brain behavior (#2284)

* brain moment + zoom is 0.5 by default

* Address reviews
This commit is contained in:
Víctor Aguilera Puerto
2020-10-17 18:12:16 +02:00
committed by GitHub
parent 5732421519
commit 7053352e18
4 changed files with 77 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
#nullable enable
using System.Collections.Generic;
using System.Linq;
using Content.Shared.GameObjects.Components.Body.Behavior;
using Content.Shared.GameObjects.Components.Body.Part;
using Robust.Shared.GameObjects;
@@ -132,7 +133,7 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism
Owner.Transform.AttachParent(Part!.Owner);
OnAddedToPart();
foreach (var behavior in Owner.GetAllComponents<IMechanismBehavior>())
foreach (var behavior in Owner.GetAllComponents<IMechanismBehavior>().ToArray())
{
behavior.AddedToPart();
}