public override void ProcessClient() { //update the fields if (FieldsToUpdate.HasFlag(ChangedFields.Content)) { CommandMessageOfTheDay.Content = Content; } if (FieldsToUpdate.HasFlag(ChangedFields.HeadLine)) { CommandMessageOfTheDay.HeadLine = HeadLine; } CommandMessageOfTheDay.ReplaceUserVariables(); if (FieldsToUpdate.HasFlag(ChangedFields.ShowInChat)) { CommandMessageOfTheDay.ShowInChat = ShowInChat; } //show the motd if we just received it for the first time if (!CommandMessageOfTheDay.Received) { CommandMessageOfTheDay.Received = true; if (ChatCommandLogic.Instance.ShowDialogsOnReceive && !String.IsNullOrEmpty(CommandMessageOfTheDay.Content)) { CommandMessageOfTheDay.ShowMotd(); } return; } //let the player know if there were changes if (FieldsToUpdate.HasFlag(ChangedFields.Content)) { MyAPIGateway.Utilities.ShowMessage("Motd", "The message of the day was updated just now. To see what is new use '/motd'."); } }
/// <summary> /// Checks whether a specific field changed in this diff. /// </summary> /// <param name="field">Field to be checked.</param> /// <returns>True if the field was changed, otherwise false.</returns> public bool IsChanged(TagEditableFields field) { return(ChangedFields.HasFlag(field)); }
private bool IsChanged(SongEditableFields field) { return(ChangedFields.HasFlag(field)); }
/// <summary> /// Checks whether a specific field changed in this diff. /// </summary> /// <param name="field">Field to be checked.</param> /// <returns>True if the field was changed, otherwise false.</returns> public bool IsChanged(ReleaseEventEditableFields field) { return(ChangedFields.HasFlag(field)); }