Add a settingtypes.txt file

This commit is contained in:
upsilon
2017-02-11 14:01:20 +01:00
parent b341335d3b
commit 795146a83e
7 changed files with 113 additions and 22 deletions

View File

@ -1,5 +1,8 @@
local kill_nearest_player = function(pos)
local MAX_DISTANCE = 8 -- Use this number to set maximal distance to kill
local MAX_DISTANCE = tonumber(minetest.setting_get("moremesecons_playerkiller.max_distance")) or 8 -- Use this number to set maximal distance to kill
if MAX_DISTANCE <= 0 then
MAX_DISTANCE = 8
end
-- Search the nearest player
local nearest
@ -22,7 +25,7 @@ local kill_nearest_player = function(pos)
-- maybe some mod placed it
return
end
if owner == nearest:get_player_name() then
-- don't kill the owner !
return