Skip to content

Commit faa088e

Browse files
MarkuBuparamat
authored andcommittedJan 2, 2018
Xpanes: Add optional 'use_texture_alpha' parameter to registration
1 parent bd0c627 commit faa088e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
 

Diff for: ‎game_api.txt

+1
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ Creates panes that automatically connect to each other
690690
groups = {group = rating}, -- Uses the known node groups, see [Known damage and digging time defining groups]
691691
sounds = SoundSpec, -- See [#Default sounds]
692692
recipe = {{"","","","","","","","",""}}, -- Recipe field only
693+
use_texture_alpha = true, -- Optional boolean (default: `false`) for colored glass panes
693694
}
694695

695696
Raillike definitions

Diff for: ‎mods/xpanes/init.lua

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ function xpanes.register_pane(name, def)
104104
groups = flatgroups,
105105
drop = "xpanes:" .. name .. "_flat",
106106
sounds = def.sounds,
107+
use_texture_alpha = def.use_texture_alpha or false,
107108
node_box = {
108109
type = "fixed",
109110
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
@@ -128,6 +129,7 @@ function xpanes.register_pane(name, def)
128129
groups = groups,
129130
drop = "xpanes:" .. name .. "_flat",
130131
sounds = def.sounds,
132+
use_texture_alpha = def.use_texture_alpha or false,
131133
node_box = {
132134
type = "connected",
133135
fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}},

0 commit comments

Comments
 (0)
Please sign in to comment.