示例#1
0
文件: Swapmap.cs 项目: Somnium13/SS13
        // 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);
        }