Exemplo n.º 1
0
        //call on loading to set up the project
        //return a string message if there is a problem or null if everything is okay
        public string Setup()
        {
            //Game.ini
            Ini = new GameIni();
            if (File.Exists(System.IO.Path.Combine(Directory, "Game.ini")))
            {
                Ini.Deserialize(File.ReadAllText(System.IO.Path.Combine(Directory, "Game.ini")));
            }
            else
            {
                return("There was an error reading Game.ini");
            }

            //Load RTP(s)
            FindRTPs();

            //Ruby
            Ruby = new Ruby();

            //Scripts.rxdata
            Scripts = new ScriptHive();
            Ruby.PopulateScriptHive(Scripts);

            //MapInfos.rxdata
            Maps = new MapInfos();
            Ruby.PopulateMapInfos(Maps);
            Maps.FinishedLoading();

            return(null);
        }
Exemplo n.º 2
0
        //call on loading to set up the project
        //return a string message if there is a problem or null if everything is okay
        public string Setup()
        {
            //Game.ini
            Ini = new GameIni();
            if (File.Exists(System.IO.Path.Combine(Directory, "Game.ini")))
            {
                Ini.Deserialize(File.ReadAllText(System.IO.Path.Combine(Directory, "Game.ini")));
            }
            else
            {
                return("There was an error reading Game.ini");
            }

            //Load RTP(s)
            FindRTPs();

            //Ruby
            Ruby = new Ruby();

            //Scripts.rxdata
            Scripts = new ScriptHive();
            Ruby.PopulateScriptHive(Scripts);

            //Database
            Database = new Database();
            Ruby.PopulateDatabase(Database);

            //MapInfos.rxdata
            Maps = new MapInfos();
            Ruby.PopulateMapInfos(Maps);
            Maps.FinishedLoading();

            //setup starting position
            MapHandler.startMapId = Database.System.start_map_id;
            MapHandler.startMapX  = Database.System.start_x;
            MapHandler.startMapY  = Database.System.start_y;

            return(null);
        }