From 85ba90bef59b7f2c30204a75828fae76a7bebf6b Mon Sep 17 00:00:00 2001 From: HACKERPRO908 <130792075+HACKERPRO908@users.noreply.github.com> Date: Sat, 20 Jan 2024 08:13:24 +0000 Subject: [PATCH] Update 1.1 more_gold.js adds gold tree Signed-off-by: HACKERPRO908 <130792075+HACKERPRO908@users.noreply.github.com> --- mods/more_gold.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/mods/more_gold.js b/mods/more_gold.js index 0e7d944d..ec98ce31 100644 --- a/mods/more_gold.js +++ b/mods/more_gold.js @@ -15,4 +15,26 @@ elements.molten_green_gold = { density: 13000, conduct: 0.87, Hidden: true -}; \ No newline at end of file +}; +elements.gold_tree = { + color: "#f2e013", + tick: function (pixel) { + if (pixel.h > 0 && pixelTicks % (50+pixel.h) === 0) { + + if (isEmpty(pixel.x-1,pixel.y)) { + createPixel("gold",pixel.x-1,pixel.y); + pixelMap[pixel.x-1][pixel.y].h = pixel.h-2; + } + if (isEmpty(pixel.x+1,pixel.y)) { + createPixel("gold",pixel.x+1,pixel.y); + pixelMap[pixel.x+1][pixel.y].h = pixel.h-2; + } + } + doDefaults(pixel); + }, + category:"solid", + breakInto: "gold", + state: "solid", + density: 8000, + seed: "gold_coin", +},