Skip to content

Commit

Permalink
Xpanes: Add optional 'use_texture_alpha' parameter to registration
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkuBu authored and paramat committed Jan 2, 2018
1 parent bd0c627 commit faa088e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions game_api.txt
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions mods/xpanes/init.lua
Expand Up @@ -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}},
Expand All @@ -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}},
Expand Down

0 comments on commit faa088e

Please sign in to comment.