Example #1
0
        public static string FreeModTypeToString(MultiplayerFreeModType type)
        {
            if (OnlineManager.CurrentGame.FreeModType.HasFlag(type))
            {
                return("Yes");
            }

            return("No");
        }
Example #2
0
        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;
        }