From 5ccfcd922d82836562a5bb8b3e1391d3406c5142 Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Thu, 19 May 2022 03:46:40 +0200 Subject: [PATCH] Ensure tree icons do not touch --- init.lua | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index 7b5a212..610a083 100644 --- a/init.lua +++ b/init.lua @@ -188,9 +188,10 @@ maps.create_map = function(pos, player_name) node.name, "tree" ) > 0 ) and ( - z < size - 6 and - x > 3 and - x < size - 3 + z > 1 and + z < size - 7 and + x > 4 and + x < size - 4 ) if draw_tree then local tree = {} @@ -199,29 +200,32 @@ maps.create_map = function(pos, player_name) local F = { 8 } -- filling if nil ~= node.name:find("pine") then tree = { - { _, _, O, _, _ }, - { O, O, O, O, O }, - { O, F, F, F, O }, - { _, O, F, O, _ }, - { _, O, F, O, _ }, - { _, _, O, _, _ }, + { _, _, _, _, _, _, _ }, + { _, _, _, O, _, _, _ }, + { _, O, O, O, O, O, _ }, + { _, O, F, F, F, O, _ }, + { _, _, O, F, O, _, _ }, + { _, _, O, F, O, _, _ }, + { _, _, _, O, _, _, _ }, + { _, _, _, _, _, _, _ }, } else tree = { - { _, _, O, _, _ }, - { _, _, O, _, _ }, - { _, O, O, O, _ }, - { O, F, F, F, O }, - { O, F, F, F, O }, - { O, F, F, F, O }, - { _, O, O, O, _ }, + { _, _, _, _, _, _, _ }, + { _, _, _, O, _, _, _ }, + { _, _, _, O, _, _, _ }, + { _, _, O, O, O, _, _ }, + { _, O, F, F, F, O, _ }, + { _, O, F, F, F, O, _ }, + { _, _, O, O, O, _, _ }, + { _, _, _, _, _, _, _ }, } end image:blit_icon( tree, { - x = x - 3, - z = z + x = x - 4, + z = z - 1, }, { [3] = true,