public static string FreeModTypeToString(MultiplayerFreeModType type) { if (OnlineManager.CurrentGame.FreeModType.HasFlag(type)) { return("Yes"); } return("No"); }
public MultiplayerSettingsFreeModType(string name, string value, MultiplayerFreeModType type) : base(name, value) { Type = type; CreateDialog = () => { if (OnlineManager.CurrentGame.FreeModType.HasFlag(Type)) { OnlineManager.Client?.ChangeGameFreeModType((MultiplayerFreeModType)(OnlineManager.CurrentGame.FreeModType - Type)); } else { OnlineManager.Client?.ChangeGameFreeModType(OnlineManager.CurrentGame.FreeModType | Type); } return(null); }; OnlineManager.Client.OnFreeModTypeChanged += OnFreeModTypeChanged; }