Skip to content

Commit

Permalink
Disallow rotation of garage door
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklp09 committed Jun 17, 2024
1 parent e23201a commit ecd652d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ read_globals = {
"vector",
"default",
"doors",
"screwdriver",
"stairs",
"stairsplus",
"mesecon",
Expand Down
6 changes: 4 additions & 2 deletions my_garage_door/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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 = {
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ecd652d

Please sign in to comment.