Exemplo n.º 1
0
        public bool LoadGameInitialization(Ruleset ruleset, string saveFileName)
        {
            var rules = RulesParser.ParseRules(ruleset);

            CityLoader.LoadCities(ruleset);

            MenuLoader.LoadMenus(ruleset);
            // Read SAV file & RULES.txt
            CurrentPlayer = new LocalPlayer(this);

            ClassicSaveLoader.LoadSave(ruleset, saveFileName, rules, CurrentPlayer);
            Images.LoadGraphicsAssetsFromFiles(ruleset, rules);
            //ViewPiece.ActiveXY = gameData.ActiveCursorXY;
            return(true);
        }
Exemplo n.º 2
0
        internal static bool StartPreMade(Main mainForm, Ruleset ruleset, string mapFileName)
        {
            Labels.UpdateLabels(ruleset);
            MenuLoader.LoadMenus(ruleset);
            CityLoader.LoadCities(ruleset);
            var config = new GameInitializationConfig {
                RuleSet = ruleset
            };

            config.PopUps = PopupBoxReader.LoadPopupBoxes(config.RuleSet.Root);
            try
            {
                PopupBox CorrectedPopup(string popupId)
                {
                    var popUp = config.PopUps[popupId];

                    if (popUp.Options != null && popUp.Options.Count != 0)
                    {
                        return(popUp);
                    }
                    popUp.Options = new[] { popUp.Text[^ 2], popUp.Text[^ 1] };