updated to latest defaults
This commit is contained in:
parent
ef7a6692c2
commit
ffae26fd51
97
init.lua
97
init.lua
@ -330,6 +330,15 @@ function doors.register(name, def)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
def.inventory_image = nil
|
||||
|
||||
if def.recipe then
|
||||
minetest.register_craft({
|
||||
output = name,
|
||||
recipe = def.recipe,
|
||||
})
|
||||
end
|
||||
def.recipe = nil
|
||||
|
||||
local can_dig = function(pos, digger)
|
||||
if not def.protected then
|
||||
@ -395,76 +404,22 @@ function doors.register(name, def)
|
||||
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
|
||||
end
|
||||
|
||||
minetest.register_node(":" .. name .. "_a", {
|
||||
description = def.description,
|
||||
visual = "mesh",
|
||||
mesh = "door_a.obj",
|
||||
tiles = def.tiles,
|
||||
drawtype = "mesh",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
walkable = true,
|
||||
is_ground_content = false,
|
||||
buildable_to = false,
|
||||
drop = def.drop,
|
||||
groups = def.groups,
|
||||
sounds = def.sounds,
|
||||
door = def.door,
|
||||
on_rightclick = def.on_rightclick,
|
||||
after_dig_node = def.after_dig_node,
|
||||
can_dig = def.can_dig,
|
||||
on_rotate = def.on_rotate,
|
||||
on_blast = def.on_blast,
|
||||
on_destruct = def.on_destruct,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16}
|
||||
},
|
||||
})
|
||||
def.drawtype = "mesh"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.sunlight_propagates = true
|
||||
def.use_texture_alpha = true
|
||||
def.walkable = true
|
||||
def.is_ground_content = false
|
||||
def.buildable_to = false
|
||||
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} }
|
||||
|
||||
minetest.register_node(":" .. name .. "_b", {
|
||||
description = def.description,
|
||||
visual = "mesh",
|
||||
mesh = "door_b.obj",
|
||||
tiles = def.tiles,
|
||||
drawtype = "mesh",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
walkable = true,
|
||||
is_ground_content = false,
|
||||
buildable_to = false,
|
||||
drop = def.drop,
|
||||
groups = def.groups,
|
||||
sounds = def.sounds,
|
||||
door = def.door,
|
||||
on_rightclick = def.on_rightclick,
|
||||
after_dig_node = def.after_dig_node,
|
||||
can_dig = def.can_dig,
|
||||
on_rotate = def.on_rotate,
|
||||
on_blast = def.on_blast,
|
||||
on_destruct = def.on_destruct,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = { -1/2,-1/2,-1/2,1/2,3/2,-6/16}
|
||||
},
|
||||
})
|
||||
def.mesh = "door_a.obj"
|
||||
minetest.register_node(":" .. name .. "_a", def)
|
||||
|
||||
if def.recipe then
|
||||
minetest.register_craft({
|
||||
output = name,
|
||||
recipe = def.recipe,
|
||||
})
|
||||
end
|
||||
def.mesh = "door_b.obj"
|
||||
minetest.register_node(":" .. name .. "_b", def)
|
||||
|
||||
_doors.registered_doors[name .. "_a"] = true
|
||||
_doors.registered_doors[name .. "_b"] = true
|
||||
@ -488,6 +443,7 @@ doors.register("door_steel", {
|
||||
inventory_image = "doors_item_steel.png",
|
||||
protected = true,
|
||||
groups = { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 },
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sound_open = "doors_steel_door_open",
|
||||
sound_close = "doors_steel_door_close",
|
||||
recipe = {
|
||||
@ -503,6 +459,8 @@ doors.register("door_glass", {
|
||||
inventory_image = "doors_item_glass.png",
|
||||
groups = { snappy=1, cracky=1, oddly_breakable_by_hand=3 },
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sound_open = "doors_glass_door_open",
|
||||
sound_close = "doors_glass_door_close",
|
||||
recipe = {
|
||||
{"default:glass", "default:glass"},
|
||||
{"default:glass", "default:glass"},
|
||||
@ -516,6 +474,8 @@ doors.register("door_obsidian_glass", {
|
||||
inventory_image = "doors_item_obsidian_glass.png",
|
||||
groups = { snappy=1, cracky=1, oddly_breakable_by_hand=3 },
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
sound_open = "doors_glass_door_open",
|
||||
sound_close = "doors_glass_door_close",
|
||||
recipe = {
|
||||
{"default:obsidian_glass", "default:obsidian_glass"},
|
||||
{"default:obsidian_glass", "default:obsidian_glass"},
|
||||
@ -704,6 +664,7 @@ minetest.register_craft({
|
||||
|
||||
|
||||
-----key tool-----
|
||||
|
||||
minetest.register_tool("doors:key", {
|
||||
description = "Key Tool",
|
||||
inventory_image = "doors_key.png",
|
||||
|
BIN
sounds/doors_glass_door_close.ogg
Normal file
BIN
sounds/doors_glass_door_close.ogg
Normal file
Binary file not shown.
BIN
sounds/doors_glass_door_open.ogg
Normal file
BIN
sounds/doors_glass_door_open.ogg
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user