/// <summary> /// Not sending updates and closing tab for players that don't pass the validation anymore /// </summary> public void ValidatePeepers() { foreach (var peeper in Peepers.ToArray()) { bool validate = peeper.Script && Validations.CanApply(peeper.Script, Provider, NetworkSide.Server); if (!validate) { TabUpdateMessage.Send(peeper.GameObject, Provider, Type, TabAction.Close); } } }
/// <summary> /// Not sending updates and closing tab for players that don't pass the validation anymore /// </summary> public void ValidatePeepers() { foreach (var peeper in Peepers.ToArray()) { bool validate = peeper.Script && !peeper.Script.canNotInteract() && peeper.Script.IsInReach(Provider, true); if (!validate) { TabUpdateMessage.Send(peeper.GameObject, Provider, Type, TabAction.Close); } } }
/// <summary> /// Not sending updates and closing tab for players that don't pass the validation anymore /// </summary> public void ValidatePeepers() { foreach (var peeper in Peepers.ToArray()) { bool canApply = Validations.CanApply(peeper.Script, Provider, NetworkSide.Server); if (peeper.Script == false || canApply == false) { //Validate for AI if (peeper.Script.PlayerState == PlayerScript.PlayerStates.Ai) { if (Validations.CanApply(new AiActivate(peeper.GameObject, null, Provider, Intent.Help, AiActivate.ClickTypes.NormalClick), NetworkSide.Server)) { continue; } } TabUpdateMessage.Send(peeper.GameObject, Provider, Type, TabAction.Close); } } }