Brain behavior (#2284)
* brain moment + zoom is 0.5 by default * Address reviews
This commit is contained in:
committed by
GitHub
parent
5732421519
commit
7053352e18
@@ -1,15 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Body.Behavior
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class BrainBehaviorComponent : MechanismBehaviorComponent
|
||||
{
|
||||
public override string Name => "Brain";
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
// TODO BODY
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user