diff --git a/ExportToProject.csx b/ExportToProject.csx index fe9f6e8..be65705 100644 --- a/ExportToProject.csx +++ b/ExportToProject.csx @@ -17,11 +17,11 @@ TextureWorker worker = new TextureWorker(); ThreadLocal DECOMPILE_CONTEXT = new ThreadLocal(() => new DecompileContext(Data, false)); string gmxDeclaration = "This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!"; -if (Directory.Exists(projFolder)) -{ - ScriptError("A project export already exists. Please remove it.", "Error"); - return; -} +// if (Directory.Exists(projFolder)) +// { +// ScriptError("A project export already exists. Please remove it.", "Error"); +// return; +// } Directory.CreateDirectory(projFolder); @@ -37,14 +37,14 @@ var resourceNum = Data.Sprites.Count + Data.Paths.Count + Data.Timelines.Count; -// Export sprites -await ExportSprites(); +// // Export sprites +// await ExportSprites(); -// Export backgrounds -await ExportBackground(); +// // Export backgrounds +// await ExportBackground(); -// Export objects -await ExportGameObjects(); +// // Export objects +// await ExportGameObjects(); // Export rooms await ExportRooms(); @@ -380,7 +380,7 @@ void ExportRoom(UndertaleRoom room) foreach (var i in room.Tiles) { var tileNode = new XElement("tile", - new XAttribute("bgName", i.BackgroundDefinition.Name.Content), + new XAttribute("bgName", i.BackgroundDefinition is null ? "" : i.BackgroundDefinition.Name.Content), new XAttribute("x", i.X.ToString()), new XAttribute("y", i.Y.ToString()), new XAttribute("w", i.Width.ToString()),