diff options
author | crazyginger72 <gingerpollard72@gmail.com> | 2014-11-10 22:49:12 -0500 |
---|---|---|
committer | crazyginger72 <gingerpollard72@gmail.com> | 2014-11-10 22:49:12 -0500 |
commit | 2cd7a757a4eb4341ebbb390308665885c4c0a5be (patch) | |
tree | 3aeaa11fc1fa53033043bf854f1a20d22d446bd7 | |
parent | 5b16bf2f41b1d2be8ff0c478a6b412a0385367a5 (diff) |
new priv for spawning
added a priv for spawning as the unrent priv isnt need by everyone who wants to spawn one
-rw-r--r-- | handle_schematics.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |