From 741f9ede21a916de4ed5caa45d9c33b9f0082a40 Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Sat, 21 May 2022 23:18:22 +0200 Subject: [PATCH] Fix variable naming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The variable “color” was not holding a color, but a pixel. --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 52badc9..039fad7 100644 --- a/init.lua +++ b/init.lua @@ -141,8 +141,8 @@ xmaps.create_map_item = function(pos, properties) if pixels[z][x][1] >= 3 then pixels[z][x] = { 3 + ( z % 2 ) } -- stripes if pixels[z][x][1] == 4 then - local color = { 4 + ( ( math.floor( x / 7 ) + math.floor( 1.3 * z * z ) ) % 4 ) } - pixels[z][x] = color + local color = 4 + ( ( math.floor( x / 7 ) + math.floor( 1.3 * z * z ) ) % 4 ) + pixels[z][x] = { color } end if z > 1 and pixels[z-1][x][1] < 3 then pixels[z-1][x] = { 2 }