From e6cb0d1dba70a59be36b9f03588cffd590e0d707 Mon Sep 17 00:00:00 2001 From: Lemon-King Date: Sat, 22 Jun 2024 20:44:49 -0400 Subject: [PATCH] PackageBuilder: Filter skies for PWAD Mode TODO: Find a way via zscript --- .../lemon/hxdd/builder/PackageBuilder.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/lemon/hxdd/builder/PackageBuilder.java b/src/main/java/lemon/hxdd/builder/PackageBuilder.java index 35ab42a..e7429ee 100644 --- a/src/main/java/lemon/hxdd/builder/PackageBuilder.java +++ b/src/main/java/lemon/hxdd/builder/PackageBuilder.java @@ -402,6 +402,26 @@ private void FixPatches() { PostProcessImageData(path, set.getValue()[0], set.getValue()[1]); this.app.controller.SetCurrentProgress(++count / (float)colorSwap.size()); } + + // Move conflicting patches to filter + File SKY1 = new File(pathTemporary + "/patches/SKY1.png"); + File SKY2 = new File(pathTemporary + "/patches/SKY2.png"); + File SKY3 = new File(pathTemporary + "/patches/SKY3.png"); + try { + File dirFile = new File(pathTemporary + "/filter/game-raven/patches"); + if (!dirFile.exists()) { + dirFile.mkdirs(); + } + Path target = new File(pathTemporary + "/filter/game-raven/patches/SKY1.png").toPath(); + Files.move(SKY1.toPath(), target, REPLACE_EXISTING); + target = new File(pathTemporary + "/filter/game-raven/patches/SKY2.png").toPath(); + Files.move(SKY2.toPath(), target, REPLACE_EXISTING); + target = new File(pathTemporary + "/filter/game-raven/patches/SKY3.png").toPath(); + Files.move(SKY3.toPath(), target, REPLACE_EXISTING); + } catch (IOException e) { + e.printStackTrace(); + } + } private void ExtractFilesFromGZDoom() {