Exemplo n.º 1
0
        // Function from file: swapmaps.dm
        public bool Save(  )
        {
            SaveFile S = null;


            if (this.id == this)
            {
                return(false);
            }
            S = (this.mode ? new SaveFile() : new SaveFile("map_" + this.id + ".sav"));
            ((dynamic)S).WriteMsg(this);

            while (this.locked)
            {
                Task13.Sleep(1);
            }

            if (this.mode)
            {
                File13.Delete("map_" + this.id + ".txt");
                S.ExportText("/", "map_" + this.id + ".txt");
            }
            return(true);
        }