diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -943,8 +943,13 @@ if apartment_give_player then minetest.register_on_newplayer(function(player) for k,v in pairs( apartment.apartments ) do if (v.owner == '' and v.category == 'apartment') then + local meta = minetest.get_meta( v.pos ); local node = minetest.get_node( v.pos ); + if node.name == "ignore" then -- deal with unloaded nodes. + minetest.get_voxel_manip():read_from_map(pos, pos) + node = minetest.get_node(pos) + end if (node.name == 'apartment:apartment_free' and apartment.rent( v.pos, player:get_player_name(), nil, player )) then player:moveto( v.pos, false); meta:set_string( 'formspec', apartment.get_formspec( v.pos, player )); |