Disallow rotation of various doors (#36)
Rotating them would result in a strange-looking state.
This commit is contained in:
parent
e23201a251
commit
79547ede26
@ -6,6 +6,7 @@ read_globals = {
|
||||
"vector",
|
||||
"default",
|
||||
"doors",
|
||||
"screwdriver",
|
||||
"stairs",
|
||||
"stairsplus",
|
||||
"mesecon",
|
||||
|
@ -36,7 +36,7 @@ local function add_door(col)
|
||||
{-0.625, 1.4375,-0.5625, 0.625, 1.625, 0.5625}, --top
|
||||
}
|
||||
},
|
||||
|
||||
on_rotate = screwdriver.disallow,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos1 = pointed_thing.above
|
||||
local pos2 = vector.add(pos1, {x=0,y=1,z=0})
|
||||
@ -112,6 +112,7 @@ local function add_door(col)
|
||||
{-0.5, -0.5, -0.5, -0.5, -0.5, -0.5},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node("my_future_doors:door1c_"..col, {
|
||||
tiles = {
|
||||
@ -146,6 +147,7 @@ local function add_door(col)
|
||||
}
|
||||
},
|
||||
drop = "my_future_doors:door1a_"..col,
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
local node = minetest.get_node(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
@ -194,6 +196,7 @@ local function add_door(col)
|
||||
{-0.5, -0.5, -0.5, -0.5, -0.5, -0.5},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "my_future_doors:door1a_"..col.." 1",
|
||||
|
@ -1,3 +1,3 @@
|
||||
name = my_future_doors
|
||||
description = Futuristic style doors.
|
||||
depends = my_door_wood
|
||||
depends = my_door_wood, screwdriver
|
@ -147,6 +147,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
|
||||
{-0.5, -0.5, -0.0625, 0.5, 1.5, 0.0625}
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
|
||||
on_place = onplace,
|
||||
|
||||
@ -179,6 +180,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node(doorc, {
|
||||
tiles = {
|
||||
@ -209,6 +211,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
|
||||
after_place_node = afterplace,
|
||||
after_destruct = afterdestruct,
|
||||
on_timer = ontimer,
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node(doord, {
|
||||
tiles = {
|
||||
@ -235,6 +238,7 @@ local function add_door(doora, doorb, doorc, doord, num, des, recipe)
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "my_future_doors:door"..num.."a 2",
|
||||
|
@ -31,6 +31,7 @@ minetest.register_node("my_garage_door:garage_door", {
|
||||
{-1.5, -0.5, -0.1875, 1.5, 1.5, -0.0625},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos1 = pointed_thing.above
|
||||
local pos2 = vector.add(pos1, {x=0,y=1,z=0})
|
||||
@ -124,6 +125,7 @@ minetest.register_node("my_garage_door:garage_door_top", {
|
||||
}
|
||||
},
|
||||
selection_box = {type = "fixed",fixed = {{0, 0, 0, 0, 0, 0},}},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node("my_garage_door:garage_door_open", {
|
||||
tiles = {
|
||||
@ -146,7 +148,7 @@ minetest.register_node("my_garage_door:garage_door_open", {
|
||||
}
|
||||
},
|
||||
selection_box = {type = "fixed",fixed = {{-1.5, 0.375, -0.5, 1.5, 0.5, 1.5},}},
|
||||
|
||||
on_rotate = screwdriver.disallow,
|
||||
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
local p2 = node.param2
|
||||
local dir = minetest.facedir_to_dir((p2+2)%4)
|
||||
@ -204,7 +206,7 @@ minetest.register_node("my_garage_door:garage_door_open2", {
|
||||
}
|
||||
},
|
||||
selection_box = {type = "fixed",fixed = {{0, 0, 0, 0, 0, 0},}},
|
||||
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
|
||||
-- craft
|
||||
|
@ -29,6 +29,7 @@ minetest.register_node("my_misc_doors:door2a", {
|
||||
{-0.4375, -0.5, -0.0625, 0.4375, 1.5, 0.0625},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos1 = pointed_thing.above
|
||||
@ -117,6 +118,7 @@ minetest.register_node("my_misc_doors:door2b", {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node("my_misc_doors:door2c", {
|
||||
tiles = {
|
||||
@ -148,6 +150,7 @@ minetest.register_node("my_misc_doors:door2c", {
|
||||
}
|
||||
},
|
||||
drop = "my_misc_doors:door2a",
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
local node = minetest.get_node(pos)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
@ -203,6 +206,7 @@ minetest.register_node("my_misc_doors:door2d", {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "my_misc_doors:door2a 1",
|
||||
|
@ -1,3 +1,3 @@
|
||||
name = my_misc_doors
|
||||
description = Some misc. doors.
|
||||
depends = default, my_door_wood, doors, wool
|
||||
depends = default, my_door_wood, doors, wool, screwdriver
|
@ -37,6 +37,7 @@ local function add_door(col, des, tint, craft)
|
||||
{-0.5, -0.1875, -0.0625, 0.5, 1, 0.0625},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos1 = pointed_thing.above
|
||||
@ -106,6 +107,7 @@ local function add_door(col, des, tint, craft)
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_timer = function(pos, elapsed)
|
||||
local node = minetest.get_node(pos)
|
||||
minetest.set_node(pos, {name="my_saloon_doors:door1a_"..col, param2=node.param2})
|
||||
|
@ -1,3 +1,3 @@
|
||||
name = my_saloon_doors
|
||||
description = Saloon style doors.
|
||||
depends = default, my_door_wood, doors
|
||||
depends = default, my_door_wood, doors, screwdriver
|
@ -130,6 +130,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
{-0.5, -0.5, 0.0625, 0.5, 1.5, 0.1875}
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
|
||||
on_place = onplace,
|
||||
|
||||
@ -173,6 +174,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node(doorc, {
|
||||
tiles = {
|
||||
@ -211,6 +213,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
{-1.5, -0.5, -0.0625, -0.5, 1.5, 0.1875}
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = afterplace,
|
||||
after_destruct = afterdestruct,
|
||||
on_rightclick = rightclick,
|
||||
@ -251,6 +254,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node("my_sliding_doors:jpanel"..num, {
|
||||
description = des.." Panel",
|
||||
@ -280,6 +284,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
},
|
||||
selection_box = {type = "fixed", fixed = {{-0.5, -0.5, -0.0625, 0.5, 1.5, 0.0625}}},
|
||||
collision_box = {type = "fixed", fixed = {{-0.5, -0.5, -0.0625, 0.5, 1.5, 0.0625}}},
|
||||
on_rotate = screwdriver.disallow,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
@ -353,6 +358,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
{0, 0, 0, 0, 0, 0}
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node("my_sliding_doors:jpanel_corner_"..num, {
|
||||
description = des.." Panel Corner",
|
||||
@ -389,6 +395,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
{-0.5, -0.5, -0.0625, 0, 1.5, 0.0625},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local pos = pointed_thing.above
|
||||
@ -463,6 +470,7 @@ local function add_door(doora, doorb, doorc, doord, num, des)
|
||||
{0, 0, 0, 0, 0, 0}
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -133,6 +133,7 @@ local function add_door(doora, doorb, doorc, doord, num)
|
||||
{-0.5, -0.5, -0.0625, 0.5, 1.5, -0.1875}
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
|
||||
on_place = onplace,
|
||||
|
||||
@ -176,6 +177,7 @@ local function add_door(doora, doorb, doorc, doord, num)
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
minetest.register_node(doorc.."2", {
|
||||
tiles = {
|
||||
@ -214,6 +216,7 @@ local function add_door(doora, doorb, doorc, doord, num)
|
||||
{-1.5, -0.5, 0.0625, -0.5, 1.5, -0.1875}
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = afterplace,
|
||||
after_destruct = afterdestruct,
|
||||
on_rightclick = rightclick,
|
||||
@ -254,6 +257,7 @@ local function add_door(doora, doorb, doorc, doord, num)
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
on_rotate = screwdriver.disallow,
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
name = my_sliding_doors
|
||||
description = Shoji sliding doors and panels.
|
||||
depends = default, flowers
|
||||
depends = default, flowers, screwdriver
|
Loading…
x
Reference in New Issue
Block a user