mirror of
https://github.com/Sokomine/travelnet.git
synced 2024-11-19 22:03:46 +01:00
Merge pull request #36 from pandorabox-io/buildable-to-fix
check for buildable-to when placing not just air
This commit is contained in:
commit
b168efc6c4
@ -74,7 +74,9 @@ minetest.register_node("travelnet:travelnet", {
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
||||
local pos = pointed_thing.above;
|
||||
if( minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" ) then
|
||||
local def = minetest.registered_nodes[
|
||||
minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name]
|
||||
if not def or not def.buildable_to then
|
||||
|
||||
minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place the travelnet box!'))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user