From d521b6f1dc1a96e04bbd649159c83f513e96d194 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 25 Mar 2021 01:07:11 -0400 Subject: [PATCH] round the given size to the nearest integer --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a0d63cf..e8dfbc1 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,7 @@ end local function validate_size(s) local size = s and tonumber(s) or 16 - return math.max(1, math.min(size, 32)) + return math.floor(0.5 + math.max(1, math.min(size, 32))) end local hotbar_size_default = validate_size(minetest.settings:get("hotbar_size"))