diff --git a/lc-hax/Scripts/Commands/LockCommand.cs b/lc-hax/Scripts/Commands/LockCommand.cs index 07c54811..b3798288 100644 --- a/lc-hax/Scripts/Commands/LockCommand.cs +++ b/lc-hax/Scripts/Commands/LockCommand.cs @@ -1,13 +1,25 @@ +using System.Collections.Generic; using System.Linq; using UnityEngine; namespace Hax; public class LockCommand : ICommand { - public void Execute(string[] _) { + public void Execute(string[] args) { + List doors = [.. Object.FindObjectsOfType()]; + + _ = Helper.CreateComponent().Init((_) => { + doors.ForEach(door => { + AnimatedObjectTrigger animatedObjectTrigger = door.gameObject.GetComponent(); + animatedObjectTrigger.boolValue = false; + animatedObjectTrigger.TriggerAnimation(Helper.GetPlayer(0)); + }); + }, 60.0f); + Object.FindObjectsOfType() .ToList() .ForEach(terminalAccessibleObject => terminalAccessibleObject.SetDoorOpenServerRpc(false)); + } }