mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 22:22:25 +01:00
Allow to set use_texture_alpha when registering a door
Co-Authored-By: Gregor Parzefall <gregor.parzefall@posteo.de>
This commit is contained in:
parent
78de12d6b4
commit
75f9575557
10
game_api.txt
10
game_api.txt
@ -228,8 +228,9 @@ The doors mod allows modders to register custom doors and trapdoors.
|
|||||||
gain_open = 0.3, -- optional, defaults to 0.3
|
gain_open = 0.3, -- optional, defaults to 0.3
|
||||||
gain_close = 0.3, -- optional, defaults to 0.3
|
gain_close = 0.3, -- optional, defaults to 0.3
|
||||||
protected = false, -- If true, only placer can open the door (locked for others)
|
protected = false, -- If true, only placer can open the door (locked for others)
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing),
|
||||||
-- optional function containing the on_rightclick callback, defaults to a doors.door_toggle-wrapper
|
-- optional function containing the on_rightclick callback, defaults to a doors.door_toggle-wrapper
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
|
||||||
### Trapdoor definition
|
### Trapdoor definition
|
||||||
|
|
||||||
@ -249,10 +250,9 @@ The doors mod allows modders to register custom doors and trapdoors.
|
|||||||
gain_open = 0.3, -- optional, defaults to 0.3
|
gain_open = 0.3, -- optional, defaults to 0.3
|
||||||
gain_close = 0.3, -- optional, defaults to 0.3
|
gain_close = 0.3, -- optional, defaults to 0.3
|
||||||
protected = false, -- If true, only placer can open the door (locked for others)
|
protected = false, -- If true, only placer can open the door (locked for others)
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) ,
|
||||||
-- function containing the on_rightclick callback
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
-- function containing the on_rightclick callback
|
-- function containing the on_rightclick callback
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
|
||||||
### Fence gate definition
|
### Fence gate definition
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ The doors mod allows modders to register custom doors and trapdoors.
|
|||||||
material = "default:wood",
|
material = "default:wood",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
sounds = default.node_sound_wood_defaults(), -- optional
|
sounds = default.node_sound_wood_defaults(), -- optional
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
-- function containing the on_rightclick callback
|
-- function containing the on_rightclick callback
|
||||||
|
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ function doors.register(name, def)
|
|||||||
def.buildable_to = false
|
def.buildable_to = false
|
||||||
def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
|
def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
|
||||||
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
|
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
|
||||||
def.use_texture_alpha = "clip"
|
def.use_texture_alpha = def.use_texture_alpha or "clip"
|
||||||
|
|
||||||
def.mesh = "door_a.b3d"
|
def.mesh = "door_a.b3d"
|
||||||
minetest.register_node(":" .. name .. "_a", table.copy(def))
|
minetest.register_node(":" .. name .. "_a", table.copy(def))
|
||||||
@ -600,7 +600,7 @@ function doors.register_trapdoor(name, def)
|
|||||||
def.paramtype = "light"
|
def.paramtype = "light"
|
||||||
def.paramtype2 = "facedir"
|
def.paramtype2 = "facedir"
|
||||||
def.is_ground_content = false
|
def.is_ground_content = false
|
||||||
def.use_texture_alpha = "clip"
|
def.use_texture_alpha = def.use_texture_alpha or "clip"
|
||||||
|
|
||||||
if def.protected then
|
if def.protected then
|
||||||
def.can_dig = can_dig_door
|
def.can_dig = can_dig_door
|
||||||
|
Loading…
Reference in New Issue
Block a user