diff options
-rw-r--r-- | handle_schematics.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/handle_schematics.lua b/handle_schematics.lua index 4f0efda..bd443d7 100644 --- a/handle_schematics.lua +++ b/handle_schematics.lua @@ -8,6 +8,10 @@ handle_schematics.AUTODECAY = 'apartment:autodecay'; handle_schematics.ENABLE_SLOW_DECAY = false + +minetest.register_privilege("apartment_spawn", { description = "allows you to spawn apartments", give_to_singleplayer = false}); + + -- taken from https://github.com/MirceaKitsune/minetest_mods_structures/blob/master/structures_io.lua (Taokis Sructures I/O mod) -- gets the size of a structure file -- nodenames: contains all the node names that are used in the schematic @@ -541,7 +545,7 @@ handle_schematics.on_receive_fields = function(pos, formname, fields, sender) end pname = sender:get_player_name(); - if( not( minetest.check_player_privs(pname, {apartment_unrent=true}))) then + if( not( minetest.check_player_privs(pname, {apartment_spawn=true}))) then minetest.chat_send_player( pname, 'You do not have the necessary privileges.'); return; end |