Move 'my_misc_doors' mod from 'buildings' modpack to original 'mydoors'.

This commit is contained in:
AntumDeluge
2016-08-31 14:28:50 -07:00
parent b88a700cc2
commit 3826c01e33
30 changed files with 0 additions and 0 deletions

View File

@@ -1,229 +0,0 @@
minetest.register_node("my_misc_doors:door2a", {
description = "Sliding Door",
inventory_image = "mydoors_bars.png",
tiles = {
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 3},
node_box = {
type = "fixed",
fixed = {
{-0.4375, -0.5, -0.0625, -0.3125, 0.5, 0.0625},
{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625},
{0.3125, -0.5, -0.0625, 0.4375, 0.5, 0.0625},
{0.125, -0.5, -0.0625, 0.25, 0.5, 0.0625},
{-0.25, -0.5, -0.0625, -0.125, 0.5, 0.0625},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.4375, -0.5, -0.0625, 0.4375, 1.5, 0.0625},
}
},
on_place = function(itemstack, placer, pointed_thing)
local pos1 = pointed_thing.above
local pos2 = {x=pos1.x, y=pos1.y, z=pos1.z}
pos2.y = pos2.y+1
if
not minetest.registered_nodes[minetest.get_node(pos1).name].buildable_to or
not minetest.registered_nodes[minetest.get_node(pos2).name].buildable_to or
not placer or
not placer:is_player() then
return
end
local pt = pointed_thing.above
local pt2 = {x=pt.x, y=pt.y, z=pt.z}
pt2.y = pt2.y+1
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
local pt3 = {x=pt.x, y=pt.y, z=pt.z}
local p4 = 0
if p2 == 0 then
pt3.x = pt3.x-1
p4 = 2
elseif p2 == 1 then
pt3.z = pt3.z+1
p4 = 3
elseif p2 == 2 then
pt3.x = pt3.x+1
p4 = 0
elseif p2 == 3 then
pt3.z = pt3.z-1
p4 = 1
end
if minetest.get_node(pt3).name == "my_misc_doors:door2a" then
minetest.set_node(pt, {name="my_misc_doors:door2a", param2=p4})
minetest.set_node(pt2, {name="my_misc_doors:door2b", param2=p4})
else
minetest.set_node(pt, {name="my_misc_doors:door2a", param2=p2})
minetest.set_node(pt2, {name="my_misc_doors:door2b", param2=p2})
end
end,
after_destruct = function(pos, oldnode)
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="air"})
end,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
local timer = minetest.get_node_timer(pos)
local a = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
local b = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
local c = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z})
local d = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z})
minetest.set_node(pos, {name="my_misc_doors:door2c", param2=node.param2})
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z}, {name="my_misc_doors:door2d", param2=node.param2})
if a.name == "my_misc_doors:door2a" then
minetest.set_node({x=pos.x, y=pos.y, z=pos.z-1}, {name="my_misc_doors:door2c", param2=a.param2})
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z-1}, {name="my_misc_doors:door2d", param2=a.param2})
end
if b.name == "my_misc_doors:door2a" then
minetest.set_node({x=pos.x, y=pos.y, z=pos.z+1}, {name="my_misc_doors:door2c", param2=b.param2})
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z+1}, {name="my_misc_doors:door2d", param2=b.param2})
end
if c.name == "my_misc_doors:door2a" then
minetest.set_node({x=pos.x+1, y=pos.y, z=pos.z}, {name="my_misc_doors:door2c", param2=c.param2})
minetest.set_node({x=pos.x+1,y=pos.y+1,z=pos.z}, {name="my_misc_doors:door2d", param2=c.param2})
end
if d.name == "my_misc_doors:door2a" then
minetest.set_node({x=pos.x-1, y=pos.y, z=pos.z}, {name="my_misc_doors:door2c", param2=d.param2})
minetest.set_node({x=pos.x-1,y=pos.y+1,z=pos.z}, {name="my_misc_doors:door2d", param2=d.param2})
end
timer:start(3)
end,
})
minetest.register_node("my_misc_doors:door2b", {
tiles = {
"mydoors_bars.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
node_box = {
type = "fixed",
fixed = {
{-0.4375, -0.5, -0.0625, -0.3125, 0.5, 0.0625},
{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625},
{0.3125, -0.5, -0.0625, 0.4375, 0.5, 0.0625},
{0.125, -0.5, -0.0625, 0.25, 0.5, 0.0625},
{-0.25, -0.5, -0.0625, -0.125, 0.5, 0.0625},
}
},
selection_box = {
type = "fixed",
fixed = {
{0, 0, 0, 0, 0, 0},
}
},
})
minetest.register_node("my_misc_doors:door2c", {
tiles = {
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png^[transformFX",
"mydoors_bars.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
node_box = {
type = "fixed",
fixed = {
{-0.4375, -0.375, -0.0625, -0.3125, -0.5, 0.0625},
{-0.0625, -0.375, -0.0625, 0.0625, -0.5, 0.0625},
{0.3125, -0.375, -0.0625, 0.4375, -0.5, 0.0625},
{0.125, -0.375, -0.0625, 0.25, -0.5, 0.0625},
{-0.25, -0.375, -0.0625, -0.125, -0.5, 0.0625},
}
},
selection_box = {
type = "fixed",
fixed = {
{0, 0, 0, 0, 0, 0},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="my_misc_doors:door2d",param2=nodeu.param2})
end,
after_destruct = function(pos, oldnode)
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="air"})
end,
on_timer = function(pos, elapsed)
local node = minetest.get_node(pos)
local a = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
local b = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
local c = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z})
local d = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z})
minetest.set_node(pos, {name="my_misc_doors:door2a", param2=node.param2})
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z}, {name="my_misc_doors:door2b", param2=node.param2})
if a.name == "my_misc_doors:door2c" then
minetest.set_node({x=pos.x, y=pos.y, z=pos.z-1}, {name="my_misc_doors:door2a", param2=a.param2})
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z-1}, {name="my_misc_doors:door2b", param2=a.param2})
end
if b.name == "my_misc_doors:door2c" then
minetest.set_node({x=pos.x, y=pos.y, z=pos.z+1}, {name="my_misc_doors:door2a", param2=b.param2})
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z+1}, {name="my_misc_doors:door2b", param2=b.param2})
end
if c.name == "my_misc_doors:door2c" then
minetest.set_node({x=pos.x+1, y=pos.y, z=pos.z}, {name="my_misc_doors:door2a", param2=c.param2})
minetest.set_node({x=pos.x+1,y=pos.y+1,z=pos.z}, {name="my_misc_doors:door2b", param2=c.param2})
end
if d.name == "my_misc_doors:door2c" then
minetest.set_node({x=pos.x-1, y=pos.y, z=pos.z}, {name="my_misc_doors:door2a", param2=d.param2})
minetest.set_node({x=pos.x-1,y=pos.y+1,z=pos.z}, {name="my_misc_doors:door2b", param2=d.param2})
end
end,
})
minetest.register_node("my_misc_doors:door2d", {
tiles = {
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png",
"mydoors_bars.png^[transformFX",
"mydoors_bars.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 1},
node_box = {
type = "fixed",
fixed = {
{-0.4375, 0.375, -0.0625, -0.3125, 0.5, 0.0625},
{-0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625},
{0.3125, 0.375, -0.0625, 0.4375, 0.5, 0.0625},
{0.125, 0.375, -0.0625, 0.25, 0.5, 0.0625},
{-0.25, 0.375, -0.0625, -0.125, 0.5, 0.0625},
}
},
selection_box = {
type = "fixed",
fixed = {
{0, 0, 0, 0, 0, 0},
}
},
})
minetest.register_craft({
output = "my_misc_doors:door2a 1",
recipe = {
{"default:steel_ingot", "default:steelblock", ""},
{"default:steel_ingot", "default:steel_ingot", ""},
{"default:steelblock", "default:steel_ingot", ""}
}
})

View File

@@ -1,5 +0,0 @@
default
mdoors
coloredwood
wool
craft_guide?

View File

@@ -1,5 +0,0 @@
dofile(minetest.get_modpath("my_misc_doors").."/locked.lua")
dofile(minetest.get_modpath("my_misc_doors").."/unlocked.lua")
dofile(minetest.get_modpath("my_misc_doors").."/bars.lua")

View File

@@ -1,81 +0,0 @@
local mdoor_list = { --Number , Description , Inven Image , Image
-- { "1" , "Misc Door 1" , "door1" , "door1"},
-- { "2" , "Misc Door 2" , "door2" , "door2"},
{ "3" , "Misc Door 3" , "door3" , "door3"},
{ "4" , "Misc Door 4" , "door4" , "door4"},
-- { "5" , "Misc Door 5" , "door5" , "door5"},
{ "6" , "Misc Door 6" , "door6" , "door6"},
}
for i in ipairs(mdoor_list) do
local num = mdoor_list[i][1]
local desc = mdoor_list[i][2]
local inv = mdoor_list[i][3]
local img = mdoor_list[i][4]
mdoors.register_door("my_misc_doors:door"..num.."_locked", {
description = desc.." Locked",
inventory_image = "mymdoors_"..inv.."_inv.png",
groups = {choppy=2,cracky=2,door=1},
tiles_bottom = {"mymdoors_"..img.."_bottom.png", "mymdoors_"..img.."_edge.png"},
tiles_top = {"mymdoors_"..img.."_top.png", "mymdoors_"..img.."_edge.png"},
only_placer_can_open = true,
})
end
-- Crafts
minetest.register_craft({
output = "my_misc_doors:door1_locked 1",
recipe = {
{"coloredwood:wood_white", "coloredwood:wood_white", ""},
{"coloredwood:wood_white", "coloredwood:wood_white", "default:steel_ingot"},
{"coloredwood:wood_white", "coloredwood:wood_white", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door2_locked 1",
recipe = {
{"coloredwood:wood_gray", "coloredwood:wood_gray", ""},
{"coloredwood:wood_gray", "coloredwood:wood_gray", "default:steel_ingot"},
{"coloredwood:wood_gray", "coloredwood:wood_gray", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door3_locked 1",
recipe = {
{"default:stone", "default:stone", ""},
{"default:stone", "default:stone", "default:steel_ingot"},
{"default:stone", "default:stone", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door4_locked 1",
recipe = {
{"default:cobble", "default:cobble", ""},
{"default:cobble", "default:cobble", "default:steel_ingot"},
{"default:cobble", "default:cobble", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door5_locked 1",
recipe = {
{"coloredwood:wood_white", "wool:red", ""},
{"coloredwood:wood_white", "coloredwood:wood_white", "default:steel_ingot"},
{"coloredwood:wood_white", "wool:red", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door6_locked 1",
recipe = {
{"default:steel_ingot", "default:iron_lump", ""},
{"default:steel_ingot", "default:iron_lump", "default:steel_ingot"},
{"default:steel_ingot", "default:iron_lump", ""}
}
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

View File

@@ -1,77 +0,0 @@
local mdoor_list = { --Number , Description , Inven Image , Image
{ "1" , "Misc Door 1" , "door1" , "door1"},
{ "2" , "Misc Door 2" , "door2" , "door2"},
-- { "3" , "Misc Door 3" , "door3" , "door3"},
-- { "4" , "Misc Door 4" , "door4" , "door4"},
{ "5" , "Misc Door 5" , "door5" , "door5"},
}
for i in ipairs(mdoor_list) do
local num = mdoor_list[i][1]
local desc = mdoor_list[i][2]
local inv = mdoor_list[i][3]
local img = mdoor_list[i][4]
mdoors.register_door("my_misc_doors:door"..num, {
description = desc,
inventory_image = "mymdoors_"..inv.."_inv.png",
groups = {choppy=2,cracky=2,door=1},
tiles_bottom = {"mymdoors_"..img.."_bottom.png", "mymdoors_"..img.."_edge.png"},
tiles_top = {"mymdoors_"..img.."_top.png", "mymdoors_"..img.."_edge.png"},
only_placer_can_open = false,
})
end
-- Crafts
minetest.register_craft({
output = "my_misc_doors:door1 1",
recipe = {
{"coloredwood:wood_white", "coloredwood:wood_white", ""},
{"coloredwood:wood_white", "coloredwood:wood_white", ""},
{"coloredwood:wood_white", "coloredwood:wood_white", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door2 1",
recipe = {
{"coloredwood:wood_gray", "coloredwood:wood_gray", ""},
{"coloredwood:wood_gray", "coloredwood:wood_gray", ""},
{"coloredwood:wood_gray", "coloredwood:wood_gray", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door3 1",
recipe = {
{"default:stone", "default:stone", ""},
{"default:stone", "default:stone", ""},
{"default:stone", "default:stone", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door4 1",
recipe = {
{"default:cobble", "default:cobble", ""},
{"default:cobble", "default:cobble", ""},
{"default:cobble", "default:cobble", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door5 1",
recipe = {
{"coloredwood:wood_white", "wool:red", ""},
{"coloredwood:wood_white", "coloredwood:wood_white", ""},
{"coloredwood:wood_white", "wool:red", ""}
}
})
minetest.register_craft({
output = "my_misc_doors:door6 1",
recipe = {
{"default:steel_ingot", "default:iron_lump", ""},
{"default:steel_ingot", "default:iron_lump", ""},
{"default:steel_ingot", "default:iron_lump", ""}
}
})