From e7423c86220caed272d7256d4427f12e20789374 Mon Sep 17 00:00:00 2001 From: Ilikepizza2006 <146470829+Ilikepizza2006@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:38:10 +0100 Subject: [PATCH] =?UTF-8?q?added=20a=20=E2=9C=A8new=20mod=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wowie --- mods/franklin.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 mods/franklin.js diff --git a/mods/franklin.js b/mods/franklin.js new file mode 100644 index 00000000..b8ced093 --- /dev/null +++ b/mods/franklin.js @@ -0,0 +1,44 @@ +/* +function close_window() { + if (confirm("Reflect Test?")) { + close(); + } + } + */ + +elements.franklin_badge = { //basic element properties + color: "#0300b0", + behavior: behaviors.WALL, + category: "special", + insulate: true, + hardness: 1, + noMix: true, + tick: function(pixel){ + if (!isEmpty(pixel.x, pixel.y-1, true)){ + if (pixelMap[pixel.x][pixel.y-1].element === "lightning") { + //console.log("holy shit oh wow") + //close_window + //close(); + //window.open('','_self').close(); + //window.location = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"; + var delayInMilliseconds = 60; //1 second + + setTimeout(function() { + window.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ", "_blank"); + }, delayInMilliseconds); + } + } + } + + +}; + + + +/* +behaviors.franklin_badge.tick = function(pixel) { + if (pixel.y-1 == "lightning") { + console.log("Lightning detected") + } +}; +*/ \ No newline at end of file