From b0d487312e9c2c00387eb1d7c58939509ee2e234 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Sat, 25 Feb 2017 22:16:40 +0000 Subject: [PATCH] Fix crash with composited textures --- api.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index c9ed567..90728a6 100644 --- a/api.lua +++ b/api.lua @@ -35,7 +35,13 @@ local function connects_to_group(pos, groups) end end -local function get_tile_textures(t, facedir) +local function get_tile_textures(tiles, facedir) + local t = table.copy(tiles) + for i, v in pairs(t) do + if type(v) == "table" then + t[i] = v.name or "blank.png" + end + end local textures = {t[1], t[1], t[1], t[1], t[1], t[1]} if #t == 3 then textures = {t[1], t[2], t[3], t[3], t[3], t[3]}