Esempio n. 1
0
        public static Piece ReloadPiece(string name)
        {
            var existingPiece = Pieces.FirstOrDefault(p => p.InnerName == name);

            if (existingPiece != null)
            {
                Pieces.Remove(existingPiece);
            }

            var path  = FileExplorer.FindPath(FileExplorer.Pieces, name, ".yaml");
            var nodes = TextNodeLoader.FromFile(path, name + ".yaml");

            var piece = new Piece(name, path, nodes);

            Pieces.Add(piece);

            return(piece);
        }
Esempio n. 2
0
 void savePiece()
 {
     PieceSaver.SaveWorld(game.World, FileExplorer.FindPath(FileExplorer.Pieces, game.MapType.OverridePiece, ".yaml"), game.MapType.OverridePiece);
     game.AddInfoMessage(150, "Map saved!");
 }