Skip to content

Commit

Permalink
Merge pull request #27 from OgelGames/master
Browse files Browse the repository at this point in the history
Make doors top not diggable
  • Loading branch information
thomasrudin committed Dec 11, 2019
2 parents 44fccd5 + 8e22656 commit d1f0a8f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions doors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ for _, current_door in ipairs(doors) do
},
}

local function nodig(pos, digger)
return false
end

local doors_rightclick = nil -- Crashes serv if empty table !
if not scifi_nodes.doors_open_with_mesecon_only then doors_rightclick = open_door end

Expand Down Expand Up @@ -327,6 +331,7 @@ for _, current_door in ipairs(doors) do
{0, 0, 0, 0, 0, 0},
}
},
can_dig = nodig,
})

minetest.register_node(opened, {
Expand Down Expand Up @@ -355,9 +360,9 @@ for _, current_door in ipairs(doors) do
{-0.5, -0.5, -0.0625, -0.25, 1.5, 0.0625},
}
},
after_place_node = afterplace,
after_destruct = afterdestruct,
on_timer = ontimer,
after_place_node = afterplace,
after_destruct = afterdestruct,
on_timer = ontimer,
})

minetest.register_node(opened_top, {
Expand Down Expand Up @@ -385,5 +390,6 @@ for _, current_door in ipairs(doors) do
{0, 0, 0, 0, 0, 0},
}
},
can_dig = nodig,
})
end -- end of doors table browsing

0 comments on commit d1f0a8f

Please sign in to comment.