From 9d18b314735fb417e968aee732159cab8a72c810 Mon Sep 17 00:00:00 2001 From: O-01-67 <68935009+O-01-67@users.noreply.github.com> Date: Fri, 20 May 2022 19:18:07 -0400 Subject: [PATCH] simple invisible wall element invisible_wall is wall but sets itself to the bg color --- mods/invisible_wall.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 mods/invisible_wall.js diff --git a/mods/invisible_wall.js b/mods/invisible_wall.js new file mode 100644 index 00000000..7edeb535 --- /dev/null +++ b/mods/invisible_wall.js @@ -0,0 +1,20 @@ +if(!settings) { + settings = {} +} + +if(!settings.bg) { + settings.bg = "#000000" +} + +elements.invisible_wall = { + color: settings.bg, + behavior: behaviors.WALL, + tick: function(pixel) { + var backgroundColor = hexToRGB(settings.bg); + var rgbValue = "rgb("+backgroundColor.r+","+backgroundColor.g+","+backgroundColor.b+")"; + pixel.color = rgbValue; + }, + hardness: 1, + category: "special", + state: "solid", +}; \ No newline at end of file