From 2cd7a757a4eb4341ebbb390308665885c4c0a5be Mon Sep 17 00:00:00 2001 From: crazyginger72 Date: Mon, 10 Nov 2014 22:49:12 -0500 Subject: new priv for spawning added a priv for spawning as the unrent priv isnt need by everyone who wants to spawn one --- handle_schematics.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handle_schematics.lua b/handle_schematics.lua index 3567123..a80daf6 100644 --- a/handle_schematics.lua +++ b/handle_schematics.lua @@ -6,6 +6,8 @@ handle_schematics.SCAFFOLDING = 'random_buildings:support'; handle_schematics.AUTODECAY = 'apartment:autodecay'; +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 @@ -520,7 +522,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 -- cgit v1.2.3