public override IEnumerator Respond(string[] split, string command) { if (split.Length != 2 || split[0] != "appreciate") { yield break; } var targetModule = TwitchGame.Instance.Modules.Find(module => module.Code.EqualsIgnoreCase(split[1])); if (targetModule == null) { yield break; } if (Art.TryGetValue(targetModule, out Component artComponent)) { LocalAppreciationReqTime = artComponent.GetValue <float>("_appreciationRequiredDuration"); artComponent.CallMethod("StartAppreciatingArt"); } // If we're going to appreciate Art but we are also Art, don't allow the Show/HideAppreciation methods to appreciate ourselves. // Which would lead to appreciating two things at the same time. avoidDoubleAppreciation = artComponent != null && Art.ContainsKey(Module); yield return(null); yield return(ModuleCommands.Zoom(targetModule, new SuperZoomData(1, 0.5f, 0.5f), LocalAppreciationReqTime)); if (targetModule.Solved) { ModuleCommands.Unview(targetModule); } if (CoroutineCanceller.ShouldCancel || artComponent == null) { if (artComponent != null) { artComponent.CallMethod("StopAppreciatingArt"); } yield return($"sendtochat The appreciation of module ID {split[1]} was cancelled."); yield break; } artComponent.CallMethod("Enlighten"); }