added two more config options; visit command may now be used by default

This commit is contained in:
Sokomine 2014-10-16 03:25:53 +02:00
parent c8df6dc186
commit a9cb821dc6
2 changed files with 10 additions and 2 deletions

View File

@ -14,7 +14,7 @@ mg_villages.list_villages_formspec = function( player, formname, fields )
local radius = 1000000;
-- without the special priv, players can only obtain informatoin about villages which are very close by
if( not( minetest.check_player_privs( pname, {mg_villages=true}))) then
radius = 100;
radius = mg_villages.VILLAGE_DETECT_RANGE;
end
local formspec = 'size[12,12]'..
@ -74,7 +74,7 @@ minetest.register_chatcommand( 'visit', {
func = function(name, param)
if( not( minetest.check_player_privs( name, {mg_villages=true}))) then
if( mg_villages.REQUIRE_PRIV_FOR_TELEPORT and not( minetest.check_player_privs( name, {mg_villages=true}))) then
minetest.chat_send_player( name, "You need the 'mg_villages' priv in order to teleport to villages using this command.");
return;
end

View File

@ -10,6 +10,14 @@ mg_villages.ENABLE_TERRAIN_BLEND = true;
-- if set to false, holes digged by cavegen and mudflow inside the village will not be repaired; houses will be destroyed
mg_villages.UNDO_CAVEGEN_AND_MUDFLOW = true;
-- players without the mg_villages priv can only see villages which are less than that many blocks away
-- from them when using the /vmap command
mg_villages.VILLAGE_DETECT_RANGE = 400;
-- if set to true, only players which have the mg_villages priv can use the "/visit <village nr>"
-- command which allows teleporting to the village with the given number
mg_villages.REQUIRE_PRIV_FOR_TELEPORT = false;
-- background image for the /vmap command
-- RealTest comes with a diffrent texture
if( minetest.get_modpath('grounds') and minetest.get_modpath('joiner_table')) then