From: MarkuBu Date: Sun, 24 Dec 2017 21:36:41 +0000 (+0100) Subject: Xpanes: Add optional 'use_texture_alpha' parameter to registration X-Git-Tag: 5.0.0~129 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=faa088e2c5a9ddc4e73f2353c1217d105c78fda5;p=oweals%2Fminetest_game.git Xpanes: Add optional 'use_texture_alpha' parameter to registration --- diff --git a/game_api.txt b/game_api.txt index bc5a8c7a..f7bcc1eb 100644 --- a/game_api.txt +++ b/game_api.txt @@ -690,6 +690,7 @@ Creates panes that automatically connect to each other groups = {group = rating}, -- Uses the known node groups, see [Known damage and digging time defining groups] sounds = SoundSpec, -- See [#Default sounds] recipe = {{"","","","","","","","",""}}, -- Recipe field only + use_texture_alpha = true, -- Optional boolean (default: `false`) for colored glass panes } Raillike definitions diff --git a/mods/xpanes/init.lua b/mods/xpanes/init.lua index 40fddba6..755667de 100644 --- a/mods/xpanes/init.lua +++ b/mods/xpanes/init.lua @@ -104,6 +104,7 @@ function xpanes.register_pane(name, def) groups = flatgroups, drop = "xpanes:" .. name .. "_flat", sounds = def.sounds, + use_texture_alpha = def.use_texture_alpha or false, node_box = { type = "fixed", fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, @@ -128,6 +129,7 @@ function xpanes.register_pane(name, def) groups = groups, drop = "xpanes:" .. name .. "_flat", sounds = def.sounds, + use_texture_alpha = def.use_texture_alpha or false, node_box = { type = "connected", fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}},