Update ExportToProject.csx
This commit is contained in:
parent
e147b07eeb
commit
4df8356b53
1 changed files with 12 additions and 12 deletions
|
@ -17,11 +17,11 @@ TextureWorker worker = new TextureWorker();
|
||||||
ThreadLocal<DecompileContext> DECOMPILE_CONTEXT = new ThreadLocal<DecompileContext>(() => new DecompileContext(Data, false));
|
ThreadLocal<DecompileContext> DECOMPILE_CONTEXT = new ThreadLocal<DecompileContext>(() => 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!";
|
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))
|
// if (Directory.Exists(projFolder))
|
||||||
{
|
// {
|
||||||
ScriptError("A project export already exists. Please remove it.", "Error");
|
// ScriptError("A project export already exists. Please remove it.", "Error");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
Directory.CreateDirectory(projFolder);
|
Directory.CreateDirectory(projFolder);
|
||||||
|
|
||||||
|
@ -37,14 +37,14 @@ var resourceNum = Data.Sprites.Count +
|
||||||
Data.Paths.Count +
|
Data.Paths.Count +
|
||||||
Data.Timelines.Count;
|
Data.Timelines.Count;
|
||||||
|
|
||||||
// Export sprites
|
// // Export sprites
|
||||||
await ExportSprites();
|
// await ExportSprites();
|
||||||
|
|
||||||
// Export backgrounds
|
// // Export backgrounds
|
||||||
await ExportBackground();
|
// await ExportBackground();
|
||||||
|
|
||||||
// Export objects
|
// // Export objects
|
||||||
await ExportGameObjects();
|
// await ExportGameObjects();
|
||||||
|
|
||||||
// Export rooms
|
// Export rooms
|
||||||
await ExportRooms();
|
await ExportRooms();
|
||||||
|
@ -380,7 +380,7 @@ void ExportRoom(UndertaleRoom room)
|
||||||
foreach (var i in room.Tiles)
|
foreach (var i in room.Tiles)
|
||||||
{
|
{
|
||||||
var tileNode = new XElement("tile",
|
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("x", i.X.ToString()),
|
||||||
new XAttribute("y", i.Y.ToString()),
|
new XAttribute("y", i.Y.ToString()),
|
||||||
new XAttribute("w", i.Width.ToString()),
|
new XAttribute("w", i.Width.ToString()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue