From a2c2f899ca4f209dc53bd246291b75ee525fb52c Mon Sep 17 00:00:00 2001 From: Skyline300 Date: Mon, 22 Apr 2024 23:45:34 +0800 Subject: [PATCH] Create Output.scala --- .../scala/com/skyline/warlangmod/Output.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/main/scala/com/skyline/warlangmod/Output.scala diff --git a/src/main/scala/com/skyline/warlangmod/Output.scala b/src/main/scala/com/skyline/warlangmod/Output.scala new file mode 100644 index 0000000..b421964 --- /dev/null +++ b/src/main/scala/com/skyline/warlangmod/Output.scala @@ -0,0 +1,16 @@ +package com.skyline.warlangmod + +trait Output { + def write(filename: String): Unit +} + +object Output { + def apply(): Output = new Output { + import java.io.FileWriter + override def write(filename: String): Unit = { + val updatedFile = new FileWriter(filename) + updatedFile.write(uptodateModdedTranslationFile.render()) + updatedFile.close() + } + } +}