Xpanes: Add optional 'use_texture_alpha' parameter to registration
authorMarkuBu <markus.burrer@gmail.com>
Sun, 24 Dec 2017 21:36:41 +0000 (22:36 +0100)
committerparamat <mat.gregory@virginmedia.com>
Tue, 2 Jan 2018 22:43:42 +0000 (22:43 +0000)
game_api.txt
mods/xpanes/init.lua

index bc5a8c7a5a189e062daf9ce8786a7c9e7fc15c26..f7bcc1ebf0fbfb6066ec0e784c87892271a9c47d 100644 (file)
@@ -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
index 40fddba6740119e6acfdaa961f5228641c284478..755667de8446009633d67e42a638fbde25f5fa4c 100644 (file)
@@ -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}},