Skip to content

Commit 4df8356

Browse files
committed
Update ExportToProject.csx
1 parent e147b07 commit 4df8356

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

ExportToProject.csx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ TextureWorker worker = new TextureWorker();
1717
ThreadLocal<DecompileContext> DECOMPILE_CONTEXT = new ThreadLocal<DecompileContext>(() => new DecompileContext(Data, false));
1818
string gmxDeclaration = "This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!";
1919

20-
if (Directory.Exists(projFolder))
21-
{
22-
ScriptError("A project export already exists. Please remove it.", "Error");
23-
return;
24-
}
20+
// if (Directory.Exists(projFolder))
21+
// {
22+
// ScriptError("A project export already exists. Please remove it.", "Error");
23+
// return;
24+
// }
2525

2626
Directory.CreateDirectory(projFolder);
2727

@@ -37,14 +37,14 @@ var resourceNum = Data.Sprites.Count +
3737
Data.Paths.Count +
3838
Data.Timelines.Count;
3939

40-
// Export sprites
41-
await ExportSprites();
40+
// // Export sprites
41+
// await ExportSprites();
4242

43-
// Export backgrounds
44-
await ExportBackground();
43+
// // Export backgrounds
44+
// await ExportBackground();
4545

46-
// Export objects
47-
await ExportGameObjects();
46+
// // Export objects
47+
// await ExportGameObjects();
4848

4949
// Export rooms
5050
await ExportRooms();
@@ -380,7 +380,7 @@ void ExportRoom(UndertaleRoom room)
380380
foreach (var i in room.Tiles)
381381
{
382382
var tileNode = new XElement("tile",
383-
new XAttribute("bgName", i.BackgroundDefinition.Name.Content),
383+
new XAttribute("bgName", i.BackgroundDefinition is null ? "" : i.BackgroundDefinition.Name.Content),
384384
new XAttribute("x", i.X.ToString()),
385385
new XAttribute("y", i.Y.ToString()),
386386
new XAttribute("w", i.Width.ToString()),

0 commit comments

Comments
 (0)