From 1abc960bff4c76924135609ab85cf9f4a9a00ab9 Mon Sep 17 00:00:00 2001 From: echo Date: Mon, 22 Jul 2024 17:12:24 +0330 Subject: [PATCH] js.js and shittyeditor.js - getting for vm in ComputerBlockEntity --- src/main/resources/assets/ajarc/bin/cat.js | 1 - src/main/resources/assets/ajarc/bin/js.js | 1 + src/main/resources/assets/ajarc/bin/shittyeditor.js | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/ajarc/bin/js.js create mode 100644 src/main/resources/assets/ajarc/bin/shittyeditor.js diff --git a/src/main/resources/assets/ajarc/bin/cat.js b/src/main/resources/assets/ajarc/bin/cat.js index 0ee0fc9..7cd9897 100644 --- a/src/main/resources/assets/ajarc/bin/cat.js +++ b/src/main/resources/assets/ajarc/bin/cat.js @@ -1,4 +1,3 @@ -fs.writeFile("/test.txt", "long hard text file") var fileContent = fs.readFile(process.args[0]) fileContent.split("\n").forEach(function (it) { screen.print(it) diff --git a/src/main/resources/assets/ajarc/bin/js.js b/src/main/resources/assets/ajarc/bin/js.js new file mode 100644 index 0000000..0d87f1f --- /dev/null +++ b/src/main/resources/assets/ajarc/bin/js.js @@ -0,0 +1 @@ +js.run(process.args[0]) \ No newline at end of file diff --git a/src/main/resources/assets/ajarc/bin/shittyeditor.js b/src/main/resources/assets/ajarc/bin/shittyeditor.js new file mode 100644 index 0000000..889f011 --- /dev/null +++ b/src/main/resources/assets/ajarc/bin/shittyeditor.js @@ -0,0 +1,4 @@ +var args = process.args +var file = args[0] +var content = args[1] +fs.writeFile(file, content) \ No newline at end of file