Example #1
0
        internal static bool SetMissingRace()
        {
            var gameID = Core.Game.CurrentGameStats.GameId;

            HashSet <Race> bannedTribe = Tribes.GetBannedTribes(gameID, _view, _config, _tribes);

            if (bannedTribe != null)
            {
                Tribes.SetBannedTribes(gameID, _view, _config, _tribes);

                if (_config.showTribeImages == true)
                {
                    if (!Core.OverlayCanvas.Children.Contains(_tribes))
                    {
                        Core.OverlayCanvas.Children.Add(_tribes);
                    }
                }
                else
                {
                    Log.Info($" KEKL.");
                    if (Core.OverlayCanvas.Children.Contains(_tribes))
                    {
                        Core.OverlayCanvas.Children.Remove(_tribes);
                    }
                }

                return(true);
            }
            return(false);
        }
Example #2
0
        //Most of this should be in another class KEKL
        internal static bool SetMissingRace()
        {
            var gameID = Core.Game.CurrentGameStats.GameId;

            _avaiableTribes = Tribes.GetTribes(gameID, _view, _config, _tribes);


            if (_avaiableTribes != null && _avaiableTribes.Count > 0)
            {
                if (!_avaiableTribes.Contains(Race.INVALID))
                {
                    Tribes.SetBannedTribes(gameID, _view, _config, _tribes);

                    if (_config.showTribeImages == true)
                    {
                        if (!Core.OverlayCanvas.Children.Contains(_tribes))
                        {
                            Core.OverlayCanvas.Children.Add(_tribes);
                        }
                    }
                    else
                    {
                        if (Core.OverlayCanvas.Children.Contains(_tribes))
                        {
                            Core.OverlayCanvas.Children.Remove(_tribes);
                        }
                    }
                    return(true);
                }
                return(false);
            }
            return(false);
        }