From 32779ab56f5f74f15c3fa9c089ec21d9d2749b46 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Fri, 1 Jul 2022 03:01:31 +0200 Subject: [PATCH] Add comments --- init.lua | 2 +- src/caches.lua | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 0cd28d7..ef2143f 100644 --- a/init.lua +++ b/init.lua @@ -28,7 +28,7 @@ i3 = { max_waypoints = 30, min_fs_version = 4, item_btn_size = 1.1, - sprite_resolution = 1024, + sprite_resolution = 256, drop_bag_on_die = true, save_interval = 600, -- Player data save interval (in seconds) diff --git a/src/caches.lua b/src/caches.lua index 1891a4a..409e86a 100644 --- a/src/caches.lua +++ b/src/caches.lua @@ -45,7 +45,12 @@ local function cache_groups(group, groups) if def.drawtype and is_cube(def.drawtype) then texture = get_cube(tiles) elseif texture then + -- Buggy, it disforms the texture but can handle any sequence texture = texture:gsub("%^", "\\^"):gsub(":", "\\:") .. "\\^[resize\\:146x146" + + --[[ Alternative, it scales a flat texture perfectly but does not + handle correctly mixed sequence like: inv cube -> flat texture -> inv cube ]] + -- px = 112 end if texture then