Skip to content

Commit 6539835

Browse files
authored
Merge branch 'master' into fix_boom_center
2 parents 40ea705 + 75f9575 commit 6539835

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

game_api.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,9 @@ The doors mod allows modders to register custom doors and trapdoors.
228228
gain_open = 0.3, -- optional, defaults to 0.3
229229
gain_close = 0.3, -- optional, defaults to 0.3
230230
protected = false, -- If true, only placer can open the door (locked for others)
231-
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
231+
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing),
232232
-- optional function containing the on_rightclick callback, defaults to a doors.door_toggle-wrapper
233+
use_texture_alpha = "clip",
233234

234235
### Trapdoor definition
235236

@@ -249,10 +250,9 @@ The doors mod allows modders to register custom doors and trapdoors.
249250
gain_open = 0.3, -- optional, defaults to 0.3
250251
gain_close = 0.3, -- optional, defaults to 0.3
251252
protected = false, -- If true, only placer can open the door (locked for others)
252-
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
253-
-- function containing the on_rightclick callback
254-
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
253+
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing),
255254
-- function containing the on_rightclick callback
255+
use_texture_alpha = "clip",
256256

257257
### Fence gate definition
258258

mods/doors/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ function doors.register(name, def)
446446
def.buildable_to = false
447447
def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
448448
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
449-
def.use_texture_alpha = "clip"
449+
def.use_texture_alpha = def.use_texture_alpha or "clip"
450450

451451
def.mesh = "door_a.b3d"
452452
minetest.register_node(":" .. name .. "_a", table.copy(def))
@@ -600,7 +600,7 @@ function doors.register_trapdoor(name, def)
600600
def.paramtype = "light"
601601
def.paramtype2 = "facedir"
602602
def.is_ground_content = false
603-
def.use_texture_alpha = "clip"
603+
def.use_texture_alpha = def.use_texture_alpha or "clip"
604604

605605
if def.protected then
606606
def.can_dig = can_dig_door

0 commit comments

Comments
 (0)