Make xpanes thicker, add side textures

master
Wuzzy 2022-02-15 06:40:59 +01:00
parent c33d4bfbbf
commit fc6c9be6bb
4 changed files with 10 additions and 9 deletions

View File

@ -24,10 +24,9 @@ end
local function register_pane(name, desc, def) local function register_pane(name, desc, def)
xpanes.register_pane(name, { xpanes.register_pane(name, {
description = desc, description = desc,
tiles = {"xdecor_" .. name .. ".png"},
drawtype = "airlike", drawtype = "airlike",
paramtype = "light", paramtype = "light",
textures = {"xdecor_" .. name .. ".png", "" ,"xdecor_" .. name .. ".png"}, textures = {"xdecor_"..name..".png", "", "xdecor_"..name.."_top.png"},
inventory_image = "xdecor_" .. name .. ".png", inventory_image = "xdecor_" .. name .. ".png",
wield_image = "xdecor_" .. name .. ".png", wield_image = "xdecor_" .. name .. ".png",
groups = def.groups, groups = def.groups,

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

View File

@ -3,6 +3,8 @@
-- Load support for MT game translation. -- Load support for MT game translation.
local S = minetest.get_translator("xpanes") local S = minetest.get_translator("xpanes")
local HTHICK = 1/16 -- half pane thickness
local function is_pane(pos) local function is_pane(pos)
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0 return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
@ -119,11 +121,11 @@ function xpanes.register_pane(name, def)
use_texture_alpha = def.use_texture_alpha and "blend" or "clip", use_texture_alpha = def.use_texture_alpha and "blend" or "clip",
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, fixed = {{-1/2, -1/2, -HTHICK, 1/2, 1/2, HTHICK}},
}, },
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, fixed = {{-1/2, -1/2, -HTHICK, 1/2, 1/2, HTHICK}},
}, },
connect_sides = { "left", "right" }, connect_sides = { "left", "right" },
}) })
@ -148,11 +150,11 @@ function xpanes.register_pane(name, def)
use_texture_alpha = def.use_texture_alpha and "blend" or "clip", use_texture_alpha = def.use_texture_alpha and "blend" or "clip",
node_box = { node_box = {
type = "connected", type = "connected",
fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}}, fixed = {{-HTHICK, -1/2, -HTHICK, HTHICK, 1/2, HTHICK}},
connect_front = {{-1/32, -1/2, -1/2, 1/32, 1/2, -1/32}}, connect_front = {{-HTHICK, -1/2, -1/2, HTHICK, 1/2, -HTHICK}},
connect_left = {{-1/2, -1/2, -1/32, -1/32, 1/2, 1/32}}, connect_left = {{-1/2, -1/2, -HTHICK, -HTHICK, 1/2, HTHICK}},
connect_back = {{-1/32, -1/2, 1/32, 1/32, 1/2, 1/2}}, connect_back = {{-HTHICK, -1/2, HTHICK, HTHICK, 1/2, 1/2}},
connect_right = {{1/32, -1/2, -1/32, 1/2, 1/2, 1/32}}, connect_right = {{HTHICK, -1/2, -HTHICK, 1/2, 1/2, HTHICK}},
}, },
connects_to = {"group:pane", "group:stone", "group:glass", "group:wood", "group:tree"}, connects_to = {"group:pane", "group:stone", "group:glass", "group:wood", "group:tree"},
}) })